From a7f89980e5b3f4b9a74c70dbc5ffe8aabd28be28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 6 Jul 2014 18:04:32 +0200 Subject: Imported Upstream version 2.9.3 --- AUTHORS | 10 + COPYING | 31 + ChangeLog | 3981 +++++ INSTALL | 224 + Makefile.am | 60 + Makefile.in | 687 + NEWS | 74 + README | 156 + TODO | 293 + aclocal.m4 | 7261 +++++++++ beforeconf.sh | 55 + buildsamp.cmd | 13 + buildwin.cmd | 45 + buildwin2.cmd | 31 + cleanwin.cmd | 23 + config.guess | 1411 ++ config.h.in | 118 + config.sub | 1500 ++ configure | 22199 +++++++++++++++++++++++++++ configure.ac | 441 + debian/changelog | 272 + debian/compat | 1 + debian/control | 27 + debian/copyright | 129 + debian/dirs | 2 + debian/docs | 2 + debian/files | 1 + debian/ipmiutil.cron.daily | 1 + debian/ipmiutil.lintian-overrides | 4 + debian/ipmiutil.substvars | 2 + debian/postinst | 41 + debian/prerm | 26 + debian/rules | 23 + debian/source/format | 1 + debian/watch | 2 + depcomp | 530 + doc/Makefile | 383 + doc/Makefile.am | 61 + doc/Makefile.in | 383 + doc/UserGuide | 6497 ++++++++ doc/bmclanaol.mib | 210 + doc/bmclanpet.mib | 1083 ++ doc/ialarms.8 | 103 + doc/icmd.8 | 113 + doc/iconfig.8 | 96 + doc/idcmi.8 | 122 + doc/idelloem.8 | 177 + doc/idiscover.8 | 92 + doc/iekanalyzer.8 | 251 + doc/ievents.8 | 93 + doc/ifirewall.8 | 152 + doc/ifru.8 | 111 + doc/ifruset.8 | 122 + doc/ifwum.8 | 124 + doc/igetevent.8 | 154 + doc/ihealth.8 | 93 + doc/ihpm.8 | 185 + doc/ilan.8 | 305 + doc/ipicmg.8 | 157 + doc/ipmi_port.8 | 44 + doc/ipmiutil.8 | 116 + doc/ipmiutil.spec | 424 + doc/ireset.8 | 118 + doc/isel.8 | 137 + doc/iseltime.8 | 79 + doc/isensor.8 | 213 + doc/iserial.8 | 251 + doc/ismcoem.8 | 104 + doc/isol.8 | 133 + doc/isunoem.8 | 135 + doc/itsol.8 | 66 + doc/iwdt.8 | 113 + doc/rh.patch | 111 + doc/rh_spec.patch | 111 + doc/winsockerr.txt | 301 + hpiutil/COPYING | 28 + hpiutil/ChangeLog | 106 + hpiutil/INSTALL | 27 + hpiutil/Makefile | 77 + hpiutil/README | 249 + hpiutil/SaHpi.h | 4509 ++++++ hpiutil/SaHpi.h-A | 4509 ++++++ hpiutil/SaHpi.h-B | 6785 ++++++++ hpiutil/TODO | 65 + hpiutil/env.hpi | 11 + hpiutil/env.openhpi | 2 + hpiutil/hpialarmpanel.c | 373 + hpiutil/hpievent.c | 621 + hpiutil/hpifru.c | 19 + hpiutil/hpifrua.c | 550 + hpiutil/hpifrub.c | 619 + hpiutil/hpiinit.sh | 69 + hpiutil/hpireset.c | 225 + hpiutil/hpisel.c | 934 ++ hpiutil/hpisensor.c | 467 + hpiutil/hpiutil.spec | 199 + hpiutil/hpiwdt.c | 272 + hpiutil/mkrpm | 135 + hpiutil/upd | 24 + install-sh | 323 + kern/alarms.h | 43 + kern/bmcpanic-2.4.18.patch | 997 ++ kern/bmcpanic-2.4.19.patch | 997 ++ kern/bmcpanic-2.4.20.patch | 1000 ++ kern/bmcpanic-2.5.44.patch | 795 + kern/bmcpanic-2.5.62.patch | 830 + kern/bmcpanic-2.6.0.patch | 162 + kern/ipmi_kcs.patch | 1592 ++ kern/linux-ipmi-2.4.20-v17.diff | 6647 ++++++++ kern/linux-ipmi-2.5.44-v12.diff | 7362 +++++++++ kern/linux-ipmi-emu-2.4.20-v17.diff | 2776 ++++ kern/openipmi-emu-rh80.patch | 1904 +++ kern/openipmi-rh80.patch | 6633 ++++++++ lib/Makefile | 73 + lib/ipmilib.mak | 37 + lib/lanplus/Makefile.am | 55 + lib/lanplus/Makefile.in | 532 + lib/lanplus/README | 19 + lib/lanplus/asf.h | 82 + lib/lanplus/helper.c | 480 + lib/lanplus/inc/config.h | 144 + lib/lanplus/inc/inttypes-win.h | 30 + lib/lanplus/inc/ipmitool/bswap.h | 53 + lib/lanplus/inc/ipmitool/helper.h | 102 + lib/lanplus/inc/ipmitool/ipmi.h | 267 + lib/lanplus/inc/ipmitool/ipmi_cc.h | 76 + lib/lanplus/inc/ipmitool/ipmi_channel.h | 229 + lib/lanplus/inc/ipmitool/ipmi_chassis.h | 55 + lib/lanplus/inc/ipmitool/ipmi_constants.h | 136 + lib/lanplus/inc/ipmitool/ipmi_entity.h | 47 + lib/lanplus/inc/ipmitool/ipmi_event.h | 60 + lib/lanplus/inc/ipmitool/ipmi_firewall.h | 106 + lib/lanplus/inc/ipmitool/ipmi_fru.h | 381 + lib/lanplus/inc/ipmitool/ipmi_fwum.h | 46 + lib/lanplus/inc/ipmitool/ipmi_hpmfwupg.h | 45 + lib/lanplus/inc/ipmitool/ipmi_intf.h | 224 + lib/lanplus/inc/ipmitool/ipmi_isol.h | 56 + lib/lanplus/inc/ipmitool/ipmi_kontronoem.h | 49 + lib/lanplus/inc/ipmitool/ipmi_lanp.h | 132 + lib/lanplus/inc/ipmitool/ipmi_main.h | 42 + lib/lanplus/inc/ipmitool/ipmi_mc.h | 103 + lib/lanplus/inc/ipmitool/ipmi_oem.h | 47 + lib/lanplus/inc/ipmitool/ipmi_pef.h | 784 + lib/lanplus/inc/ipmitool/ipmi_picmg.h | 90 + lib/lanplus/inc/ipmitool/ipmi_raw.h | 44 + lib/lanplus/inc/ipmitool/ipmi_sdr.h | 876 ++ lib/lanplus/inc/ipmitool/ipmi_sel.h | 542 + lib/lanplus/inc/ipmitool/ipmi_sensor.h | 84 + lib/lanplus/inc/ipmitool/ipmi_session.h | 125 + lib/lanplus/inc/ipmitool/ipmi_sol.h | 84 + lib/lanplus/inc/ipmitool/ipmi_strings.h | 60 + lib/lanplus/inc/ipmitool/ipmi_sunoem.h | 57 + lib/lanplus/inc/ipmitool/ipmi_tsol.h | 46 + lib/lanplus/inc/ipmitool/ipmi_user.h | 89 + lib/lanplus/inc/ipmitool/log.h | 74 + lib/lanplus/ipmi_strings.c | 348 + lib/lanplus/ipmiplus.mak | 67 + lib/lanplus/lanplus.c | 4036 +++++ lib/lanplus/lanplus.h | 135 + lib/lanplus/lanplus_crypt.c | 1038 ++ lib/lanplus/lanplus_crypt.h | 79 + lib/lanplus/lanplus_crypt_impl.c | 320 + lib/lanplus/lanplus_crypt_impl.h | 66 + lib/lanplus/lanplus_defs.h | 376 + lib/lanplus/lanplus_dump.c | 174 + lib/lanplus/lanplus_dump.h | 45 + lib/lanplus/lanplus_strings.c | 45 + lib/lanplus/libipmi_lanplus.la | 35 + lib/lanplus/rmcp.h | 88 + lib/libimbapi64.a.redhat | Bin 0 -> 47244 bytes lib/libimbapi64.a.suse | Bin 0 -> 11644 bytes ltconfig | 3114 ++++ ltmain.sh | 6911 +++++++++ missing | 360 + mkinstalldirs | 158 + scripts/Makefile | 381 + scripts/Makefile.am | 60 + scripts/Makefile.in | 381 + scripts/checksel | 30 + scripts/checksel.cmd | 15 + scripts/evt.sh | 45 + scripts/ialarms | 2 + scripts/ialarms.cmd | 1 + scripts/icmd | 2 + scripts/icmd.cmd | 1 + scripts/iconfig | 2 + scripts/iconfig.cmd | 1 + scripts/idiscover.cmd | 1 + scripts/ifirewall | 2 + scripts/ifru | 2 + scripts/ifru.cmd | 1 + scripts/ifwum | 2 + scripts/igetevent | 2 + scripts/igetevent.cmd | 1 + scripts/ihealth | 2 + scripts/ihealth.cmd | 1 + scripts/ihpm | 2 + scripts/ilan | 2 + scripts/ilan.cmd | 1 + scripts/init.sh | 36 + scripts/install-solaris.sh | 20 + scripts/install.cmd | 26 + scripts/install.vbs | 47 + scripts/ipdiff.sh | 31 + scripts/ipicmg | 2 + scripts/ipmi.init.basic | 80 + scripts/ipmi_if.sh | 66 + scripts/ipmi_info | 124 + scripts/ipmi_port.service | 15 + scripts/ipmi_port.sh | 187 + scripts/ipmiutil.env | 22 + scripts/ipmiutil.pre | 12 + scripts/ipmiutil.setup | 47 + scripts/ipmiutil_asy | 155 + scripts/ipmiutil_asy.service | 14 + scripts/ipmiutil_evt | 158 + scripts/ipmiutil_evt.service | 15 + scripts/ipmiutil_wdt | 146 + scripts/ipmiutil_wdt.cmd | 10 + scripts/ipmiutil_wdt.service | 14 + scripts/ireset | 2 + scripts/ireset.cmd | 1 + scripts/isel | 2 + scripts/isel.cmd | 1 + scripts/isensor | 2 + scripts/isensor.cmd | 1 + scripts/iserial | 2 + scripts/iserial.cmd | 1 + scripts/isol | 2 + scripts/isol.cmd | 1 + scripts/iwdt | 2 + scripts/iwdt.cmd | 1 + scripts/setlib.sh | 38 + scripts/showsel.mc | 29 + scripts/showsel.reg | 10 + scripts/showselun.reg | 4 + scripts/startsol | 16 + scripts/uninstall.cmd | 31 + scripts/uninstall.vbs | 63 + setver | 271 + stamp-h | 1 + stamp-h.in | 1 + test/Kconfig | 12 + test/Makefile | 325 + test/Makefile-24 | 63 + test/Makefile-26 | 9 + test/dopanic.8 | 33 + test/dopanic_drv.c | 51 + test/ipmievt.sh | 45 + test/make260 | 17 + test/panicsel-c.sh | 19 + test/panicsel-k.sh | 13 + test/panicsel_apptool_test.sh | 550 + test/panicsel_test_needreboot.sh | 162 + test/retro.sh | 37 + test/sensor-CG2100.txt | 148 + test/sensor-TIGW1U.txt | 106 + test/testipmi.sh | 400 + test/unittest.cmd | 125 + test/unittest.sh | 254 + util/AnsiTerm.cpp | 1892 +++ util/AnsiTerm.h | 316 + util/Makefile.am | 200 + util/Makefile.am-so | 241 + util/Makefile.in | 766 + util/Makefile.sample | 28 + util/ialarms.c | 689 + util/icmd.c | 366 + util/iconfig.c | 2680 ++++ util/idcmi.c | 976 ++ util/idcmi.h | 69 + util/idiscover.c | 1055 ++ util/iekanalyzer.c | 4131 +++++ util/iekanalyzer.h | 521 + util/ievents.c | 2505 +++ util/ievents.h | 64 + util/ifirewall.c | 1154 ++ util/ifirewall.h | 111 + util/ifru.c | 2123 +++ util/ifru.h | 13 + util/ifru_picmg.c | 486 + util/ifruset.c | 1658 ++ util/ifwum.c | 1697 ++ util/ifwum.h | 76 + util/igetevent.c | 1439 ++ util/ihealth.c | 1153 ++ util/ihpm.c | 4003 +++++ util/ihpm.h | 117 + util/ilan.c | 5149 +++++++ util/imb_api.h | 708 + util/imbapi.c | 2594 ++++ util/ipicmg.c | 1911 +++ util/ipicmg.h | 313 + util/ipmi_port.c | 146 + util/ipmi_sample.c | 312 + util/ipmi_sample.mak | 57 + util/ipmi_sample_evt.c | 445 + util/ipmibmc.c | 231 + util/ipmicmd.c | 1429 ++ util/ipmicmd.h | 543 + util/ipmidir.c | 1513 ++ util/ipmidir.h | 301 + util/ipmilan.c | 2430 +++ util/ipmilan.h | 83 + util/ipmilan2.c | 68 + util/ipmilan2.h | 62 + util/ipmilanplus.c | 790 + util/ipmilanplus.h | 64 + util/ipmild.c | 250 + util/ipmilipmi.c | 182 + util/ipmims.cpp | 638 + util/ipmimv.c | 784 + util/ipmiutil.c | 229 + util/ipmiutil.h | 66 + util/ipmiutil.mak | 424 + util/ipmiutil2-64.mak | 425 + util/ipmiutil2.mak | 425 + util/ipmiutil64.mak | 423 + util/ipmiutillib.def | 31 + util/ireset.c | 751 + util/isel.c | 884 ++ util/iseltime.c | 260 + util/isensor.c | 3680 +++++ util/isensor.h | 176 + util/iserial.c | 1592 ++ util/isol.c | 1347 ++ util/isolwin.c | 293 + util/itsol.c | 725 + util/itsol.h | 66 + util/iwdt.c | 415 + util/md2.c | 99 + util/md2.h | 269 + util/md5.c | 413 + util/mem_if.c | 900 ++ util/mem_if_cpp.cpp | 5 + util/oem_dell.c | 6095 ++++++++ util/oem_dell.h | 629 + util/oem_fujitsu.c | 773 + util/oem_fujitsu.h | 130 + util/oem_hp.c | 149 + util/oem_intel.c | 1842 +++ util/oem_intel.h | 79 + util/oem_kontron.c | 1107 ++ util/oem_kontron.h | 80 + util/oem_newisys.c | 129 + util/oem_quanta.c | 142 + util/oem_sun.c | 1058 ++ util/oem_sun.h | 137 + util/oem_supermicro.c | 595 + util/oem_supermicro.h | 56 + util/subs.c | 848 + 351 files changed, 214491 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100755 INSTALL create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 README create mode 100644 TODO create mode 100644 aclocal.m4 create mode 100755 beforeconf.sh create mode 100644 buildsamp.cmd create mode 100644 buildwin.cmd create mode 100644 buildwin2.cmd create mode 100644 cleanwin.cmd create mode 100755 config.guess create mode 100644 config.h.in create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.ac create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100644 debian/files create mode 120000 debian/ipmiutil.cron.daily create mode 100644 debian/ipmiutil.lintian-overrides create mode 100644 debian/ipmiutil.substvars create mode 100755 debian/postinst create mode 100755 debian/prerm create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch create mode 100755 depcomp create mode 100644 doc/Makefile create mode 100644 doc/Makefile.am create mode 100644 doc/Makefile.in create mode 100644 doc/UserGuide create mode 100644 doc/bmclanaol.mib create mode 100644 doc/bmclanpet.mib create mode 100644 doc/ialarms.8 create mode 100644 doc/icmd.8 create mode 100644 doc/iconfig.8 create mode 100644 doc/idcmi.8 create mode 100644 doc/idelloem.8 create mode 100644 doc/idiscover.8 create mode 100644 doc/iekanalyzer.8 create mode 100644 doc/ievents.8 create mode 100644 doc/ifirewall.8 create mode 100644 doc/ifru.8 create mode 100644 doc/ifruset.8 create mode 100644 doc/ifwum.8 create mode 100644 doc/igetevent.8 create mode 100644 doc/ihealth.8 create mode 100644 doc/ihpm.8 create mode 100644 doc/ilan.8 create mode 100644 doc/ipicmg.8 create mode 100644 doc/ipmi_port.8 create mode 100644 doc/ipmiutil.8 create mode 100644 doc/ipmiutil.spec create mode 100644 doc/ireset.8 create mode 100644 doc/isel.8 create mode 100644 doc/iseltime.8 create mode 100644 doc/isensor.8 create mode 100644 doc/iserial.8 create mode 100644 doc/ismcoem.8 create mode 100644 doc/isol.8 create mode 100644 doc/isunoem.8 create mode 100644 doc/itsol.8 create mode 100644 doc/iwdt.8 create mode 100644 doc/rh.patch create mode 100644 doc/rh_spec.patch create mode 100644 doc/winsockerr.txt create mode 100644 hpiutil/COPYING create mode 100644 hpiutil/ChangeLog create mode 100644 hpiutil/INSTALL create mode 100644 hpiutil/Makefile create mode 100644 hpiutil/README create mode 100644 hpiutil/SaHpi.h create mode 100644 hpiutil/SaHpi.h-A create mode 100644 hpiutil/SaHpi.h-B create mode 100644 hpiutil/TODO create mode 100755 hpiutil/env.hpi create mode 100755 hpiutil/env.openhpi create mode 100644 hpiutil/hpialarmpanel.c create mode 100644 hpiutil/hpievent.c create mode 100644 hpiutil/hpifru.c create mode 100644 hpiutil/hpifrua.c create mode 100644 hpiutil/hpifrub.c create mode 100755 hpiutil/hpiinit.sh create mode 100644 hpiutil/hpireset.c create mode 100644 hpiutil/hpisel.c create mode 100644 hpiutil/hpisensor.c create mode 100644 hpiutil/hpiutil.spec create mode 100644 hpiutil/hpiwdt.c create mode 100755 hpiutil/mkrpm create mode 100755 hpiutil/upd create mode 100755 install-sh create mode 100644 kern/alarms.h create mode 100644 kern/bmcpanic-2.4.18.patch create mode 100644 kern/bmcpanic-2.4.19.patch create mode 100644 kern/bmcpanic-2.4.20.patch create mode 100644 kern/bmcpanic-2.5.44.patch create mode 100644 kern/bmcpanic-2.5.62.patch create mode 100644 kern/bmcpanic-2.6.0.patch create mode 100644 kern/ipmi_kcs.patch create mode 100644 kern/linux-ipmi-2.4.20-v17.diff create mode 100644 kern/linux-ipmi-2.5.44-v12.diff create mode 100644 kern/linux-ipmi-emu-2.4.20-v17.diff create mode 100644 kern/openipmi-emu-rh80.patch create mode 100644 kern/openipmi-rh80.patch create mode 100644 lib/Makefile create mode 100644 lib/ipmilib.mak create mode 100644 lib/lanplus/Makefile.am create mode 100644 lib/lanplus/Makefile.in create mode 100644 lib/lanplus/README create mode 100644 lib/lanplus/asf.h create mode 100644 lib/lanplus/helper.c create mode 100644 lib/lanplus/inc/config.h create mode 100644 lib/lanplus/inc/inttypes-win.h create mode 100644 lib/lanplus/inc/ipmitool/bswap.h create mode 100644 lib/lanplus/inc/ipmitool/helper.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_cc.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_channel.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_chassis.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_constants.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_entity.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_event.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_firewall.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_fru.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_fwum.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_hpmfwupg.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_intf.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_isol.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_kontronoem.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_lanp.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_main.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_mc.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_oem.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_pef.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_picmg.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_raw.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_sdr.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_sel.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_sensor.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_session.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_sol.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_strings.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_sunoem.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_tsol.h create mode 100644 lib/lanplus/inc/ipmitool/ipmi_user.h create mode 100644 lib/lanplus/inc/ipmitool/log.h create mode 100644 lib/lanplus/ipmi_strings.c create mode 100644 lib/lanplus/ipmiplus.mak create mode 100644 lib/lanplus/lanplus.c create mode 100644 lib/lanplus/lanplus.h create mode 100644 lib/lanplus/lanplus_crypt.c create mode 100644 lib/lanplus/lanplus_crypt.h create mode 100644 lib/lanplus/lanplus_crypt_impl.c create mode 100644 lib/lanplus/lanplus_crypt_impl.h create mode 100644 lib/lanplus/lanplus_defs.h create mode 100644 lib/lanplus/lanplus_dump.c create mode 100644 lib/lanplus/lanplus_dump.h create mode 100644 lib/lanplus/lanplus_strings.c create mode 100644 lib/lanplus/libipmi_lanplus.la create mode 100644 lib/lanplus/rmcp.h create mode 100644 lib/libimbapi64.a.redhat create mode 100644 lib/libimbapi64.a.suse create mode 100755 ltconfig create mode 100644 ltmain.sh create mode 100755 missing create mode 100755 mkinstalldirs create mode 100644 scripts/Makefile create mode 100644 scripts/Makefile.am create mode 100644 scripts/Makefile.in create mode 100755 scripts/checksel create mode 100644 scripts/checksel.cmd create mode 100755 scripts/evt.sh create mode 100755 scripts/ialarms create mode 100644 scripts/ialarms.cmd create mode 100755 scripts/icmd create mode 100644 scripts/icmd.cmd create mode 100755 scripts/iconfig create mode 100644 scripts/iconfig.cmd create mode 100644 scripts/idiscover.cmd create mode 100755 scripts/ifirewall create mode 100755 scripts/ifru create mode 100644 scripts/ifru.cmd create mode 100755 scripts/ifwum create mode 100755 scripts/igetevent create mode 100644 scripts/igetevent.cmd create mode 100755 scripts/ihealth create mode 100644 scripts/ihealth.cmd create mode 100755 scripts/ihpm create mode 100755 scripts/ilan create mode 100644 scripts/ilan.cmd create mode 100755 scripts/init.sh create mode 100755 scripts/install-solaris.sh create mode 100644 scripts/install.cmd create mode 100644 scripts/install.vbs create mode 100755 scripts/ipdiff.sh create mode 100755 scripts/ipicmg create mode 100755 scripts/ipmi.init.basic create mode 100755 scripts/ipmi_if.sh create mode 100755 scripts/ipmi_info create mode 100644 scripts/ipmi_port.service create mode 100755 scripts/ipmi_port.sh create mode 100644 scripts/ipmiutil.env create mode 100755 scripts/ipmiutil.pre create mode 100755 scripts/ipmiutil.setup create mode 100755 scripts/ipmiutil_asy create mode 100644 scripts/ipmiutil_asy.service create mode 100755 scripts/ipmiutil_evt create mode 100644 scripts/ipmiutil_evt.service create mode 100755 scripts/ipmiutil_wdt create mode 100755 scripts/ipmiutil_wdt.cmd create mode 100644 scripts/ipmiutil_wdt.service create mode 100755 scripts/ireset create mode 100644 scripts/ireset.cmd create mode 100755 scripts/isel create mode 100644 scripts/isel.cmd create mode 100755 scripts/isensor create mode 100644 scripts/isensor.cmd create mode 100755 scripts/iserial create mode 100644 scripts/iserial.cmd create mode 100755 scripts/isol create mode 100644 scripts/isol.cmd create mode 100755 scripts/iwdt create mode 100644 scripts/iwdt.cmd create mode 100755 scripts/setlib.sh create mode 100644 scripts/showsel.mc create mode 100644 scripts/showsel.reg create mode 100644 scripts/showselun.reg create mode 100755 scripts/startsol create mode 100644 scripts/uninstall.cmd create mode 100644 scripts/uninstall.vbs create mode 100755 setver create mode 100644 stamp-h create mode 100644 stamp-h.in create mode 100644 test/Kconfig create mode 100644 test/Makefile create mode 100644 test/Makefile-24 create mode 100644 test/Makefile-26 create mode 100644 test/dopanic.8 create mode 100644 test/dopanic_drv.c create mode 100755 test/ipmievt.sh create mode 100755 test/make260 create mode 100755 test/panicsel-c.sh create mode 100755 test/panicsel-k.sh create mode 100644 test/panicsel_apptool_test.sh create mode 100644 test/panicsel_test_needreboot.sh create mode 100755 test/retro.sh create mode 100644 test/sensor-CG2100.txt create mode 100644 test/sensor-TIGW1U.txt create mode 100755 test/testipmi.sh create mode 100644 test/unittest.cmd create mode 100755 test/unittest.sh create mode 100644 util/AnsiTerm.cpp create mode 100644 util/AnsiTerm.h create mode 100644 util/Makefile.am create mode 100644 util/Makefile.am-so create mode 100644 util/Makefile.in create mode 100644 util/Makefile.sample create mode 100644 util/ialarms.c create mode 100644 util/icmd.c create mode 100644 util/iconfig.c create mode 100644 util/idcmi.c create mode 100644 util/idcmi.h create mode 100644 util/idiscover.c create mode 100644 util/iekanalyzer.c create mode 100644 util/iekanalyzer.h create mode 100644 util/ievents.c create mode 100644 util/ievents.h create mode 100644 util/ifirewall.c create mode 100644 util/ifirewall.h create mode 100755 util/ifru.c create mode 100644 util/ifru.h create mode 100644 util/ifru_picmg.c create mode 100644 util/ifruset.c create mode 100644 util/ifwum.c create mode 100644 util/ifwum.h create mode 100644 util/igetevent.c create mode 100644 util/ihealth.c create mode 100644 util/ihpm.c create mode 100644 util/ihpm.h create mode 100644 util/ilan.c create mode 100644 util/imb_api.h create mode 100644 util/imbapi.c create mode 100644 util/ipicmg.c create mode 100644 util/ipicmg.h create mode 100644 util/ipmi_port.c create mode 100644 util/ipmi_sample.c create mode 100644 util/ipmi_sample.mak create mode 100644 util/ipmi_sample_evt.c create mode 100644 util/ipmibmc.c create mode 100644 util/ipmicmd.c create mode 100644 util/ipmicmd.h create mode 100644 util/ipmidir.c create mode 100644 util/ipmidir.h create mode 100644 util/ipmilan.c create mode 100644 util/ipmilan.h create mode 100644 util/ipmilan2.c create mode 100644 util/ipmilan2.h create mode 100644 util/ipmilanplus.c create mode 100644 util/ipmilanplus.h create mode 100644 util/ipmild.c create mode 100644 util/ipmilipmi.c create mode 100644 util/ipmims.cpp create mode 100644 util/ipmimv.c create mode 100644 util/ipmiutil.c create mode 100644 util/ipmiutil.h create mode 100644 util/ipmiutil.mak create mode 100644 util/ipmiutil2-64.mak create mode 100644 util/ipmiutil2.mak create mode 100644 util/ipmiutil64.mak create mode 100644 util/ipmiutillib.def create mode 100644 util/ireset.c create mode 100644 util/isel.c create mode 100644 util/iseltime.c create mode 100644 util/isensor.c create mode 100644 util/isensor.h create mode 100644 util/iserial.c create mode 100644 util/isol.c create mode 100644 util/isolwin.c create mode 100644 util/itsol.c create mode 100644 util/itsol.h create mode 100644 util/iwdt.c create mode 100644 util/md2.c create mode 100644 util/md2.h create mode 100644 util/md5.c create mode 100644 util/mem_if.c create mode 100644 util/mem_if_cpp.cpp create mode 100644 util/oem_dell.c create mode 100644 util/oem_dell.h create mode 100644 util/oem_fujitsu.c create mode 100644 util/oem_fujitsu.h create mode 100644 util/oem_hp.c create mode 100644 util/oem_intel.c create mode 100644 util/oem_intel.h create mode 100644 util/oem_kontron.c create mode 100644 util/oem_kontron.h create mode 100644 util/oem_newisys.c create mode 100644 util/oem_quanta.c create mode 100644 util/oem_sun.c create mode 100644 util/oem_sun.h create mode 100644 util/oem_supermicro.c create mode 100644 util/oem_supermicro.h create mode 100644 util/subs.c diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..2d377e6 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,10 @@ +ipmiutil: + Andy Cress +util/AnsiTerm.cpp + Robert Nelson +util/oem_dell.c + Harsha S +util/ihpm.c + Frederic.Lelievre@ca.kontron.com, Francois.Isabelle@ca.kontron.com, + Jean-Michel.Audet@ca.kontron.com, MarieJosee.Blais@ca.kontron.com + diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..13a56a9 --- /dev/null +++ b/COPYING @@ -0,0 +1,31 @@ + + The BSD 2.0 License + + Copyright (c) 2001-2008 Intel Corporation + (c) 2009-2012 Kontron America, Inc. + (c) 2013 Andy Cress + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + a. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + c. Neither the name of Kontron, nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..ebf3c29 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,3981 @@ +----------------------------- + ipmiutil project ChangeLog + (formerly panicsel project) + CHANGE HISTORY: + (oldest to newest) +----------------------------- + 10/24/01 ARCress ver 0.8.1 + panicsel kernel patches submitted (ksyms.c, panic.c) + 11/02/01 ARCress ver 0.8.2 + mkrpm - changed mkrpm to isolate $HOME + panicsel.spec - changed to edit lilo.conf for panic timeout + 11/07/01 ARCress ver 0.8.3 + added showsel.8 & selpef.8 man pages + 11/15/01 ARCress ver 0.8.4 + fixed panicsel.spec for 'file exists' errors (bug 32) + 11/16/01 ARCress ver 0.8.5 + fixed panicsel.spec to require isc package (bug 32) + fixed panicsel.spec for extra debug output (bug 38) + 11/19/01 ARCress ver 0.9.0-1 + Updated panicsel kernel module to use special open source ipmi driver. + Enhanced panicsel utilities also (showsel & selpef). + Utilities still do require the /dev/imb driver from ISC, however. + 11/28/01 ARCress ver 0.9.0-2 + Modified LICENSE file to include official ISC license text. + 12/06/01 ARCress ver 0.9.0-3 + Updated README & panicsel.spec for better documentation + 12/14/01 ARCress ver 1.0.0 + Updated man pages for cosmetic issues + 01/16/02 ARCress ver 1.1.0 + Added hwreset, moved to kernel 2.4.16 + 02/06/02 ARCress ver 1.1.1 + Changed selpef to pefconfig, some functions added. + 03/05/02 ARCress ver 1.1.2 + Updated pefconfig to set all LAN Params, + added tmconfig (but not currently included in rpm), + updated hwreset with -s option. + updated all utils to use either Intel or valinux IPMI. + 04/16/02 ACress ver 1.1.3 + showsel: decode time field in SEL records + showsel: add display of avail space in SEL and ability to clear SEL + pefconfig: add SetUser capability if that option is specified + tmconfig: add shared BasicMode/BiosConsole option (-s), which is + supported in TSRLT2 P10 BIOS build 44 and greater. + 05/09/02 ACress ver 1.1.4 + pefconfig: fixed ccode=c7 on param 16/18 + pefconfig: fixed bug 504 with gwy mac = 0 + bmc_panic (kernel): added BMCPANIC_ACTION to power down/power cycle. + panicsel rpm: changed pathnames to conform to OSD feedback + tmconfig: updates based on customer feedback + 05/28/02 ACress ver 1.1.5 + all: fixed imbapi.c/DeviceIoControl problem with buffer >41 bytes + all: changed LICENSE to BSD + 05/31/02 ACress ver 1.2.0 + pefconfig: get community name from snmpd.conf + pefconfig: set dest type for no ack, no retry + pefconfig: special handling to set preset PEF entries + 07/03/02 ACress ver 1.2.1 + all: added more usage text + tmconfig: added -d option to disable serial configuration + 08/02/02 ACress ver 1.2.2 + consolidated inc/* header files into imb_api.h with BSD license + fixed tmconfig -c password memcpy + moved common ipmi_cmd() code to ipmicmd.c + 08/27/02 ACress ver 1.2.3 + pefconfig: fixed 0xc7 error on SETUSER_ACCESS when using -P + pefconfig: show a message if no alert destination specified + sensor.c: added pre-alpha version of this utility + 09/12/02 ARCress ver 1.2.4 + UserGuide, man pages: updated URLs for sourceforge + added TODO file + 10/09/02 ARCress ver 1.2.5 + pefconfig: decode Dest address IP in decimal + showsel: added -v (version) option + sensor: added decodeValue routine + bmc_panic: fixed compile warnings in bmc_ipmi.c & bmc_selmsg.c + 10/30/02 ARCress ver 1.2.6 + sensor: added expon routine + sensor: added SDR types 08 & 14 + added fruconfig utility + ipmicmd: added ipmi_cmd_raw subroutine, changed CMDMASK + updated UserGuide + added kern/alarms.h to document alarms panel LEDs + added kern/bmcpanic19.patch for lk 2.4.19 + 12/10/02 ARCress ver 1.2.7 + tmconfig: fixed -c for Langley-Pr TMode + tmconfig: several changes to parameters + pefconfig: fixed -C handling + 02/04/03 ARCress ver 1.2.8 + fruconfig: fixed write_fru, v1.0 release + added man pages fruconfig.8 & sensor.8, updated UserGuide + bmclan.mib: added MIB for BMC LAN SNMP traps (but no OS Crit def yet) + ipmicmd.c/ipmimv.c: added support for MontaVista OpenIPMI driver + kern: added bmcpanic-2.5.44.patch and linux-ipmi-2.5.44-v12.diff + 02/26/03 ARCress ver 1.2.9 + showsel: more descriptive messages if empty, or nearly full. + trimmed output to fit more on one line, + decode panic type bits for OS Critical Stop + bmclan.mib: added OS Critical Stop definition + pefconfig: show/set PEF Control value, etc. + fruconfig: added GetSystemGUID also + sensor: schulz change for float & HP netserver 1000r + guomin change for simpler output with -l + alarms: alarms handling utility added + wdt: watchdog timer utility added + test/watchdogtest: added /dev/watchdog test tool + test/panicsel-k.sh: pattern is "bmc_panic" now. + kern/bmcpanic-2.4.18.patch: reworked for ipmi_send_recv, + added some type bits + kern/bmcpanic-2.4.19.patch: reworked as above + kern/bmcpanic-2.4.20.patch: new + 03/26/03 ARCress ver 1.3.0 + fruconfig: more bounds checking + showsel: added savid for more efficient read loop if -w + imb_api.h: morphed comments for some crazy compilers + imbapi.c: morphed comments for some crazy compilers + kern/bmcpanic-2.5.62.patch: new, from guomin + Makefiles & .spec file: changed to use autoconf/automake + 04/08/03 ARCress ver 1.3.1 + pefconfig 1.15: added -i option for eth interface + imbapi.c: fix compile warnings, fix license text error + ipmimv.c: fix problem with crontab or null-stdin invocations + alarms.c: 1.1: added -i for Chassis ID function + hwreset.c: 1.6: added -o for soft shutdown OS + man pages: updated, added alarms.8 & wdt.8 + UserGuide: updated with new man page info + 05/03/03 ARCress ver 1.3.2 + imbapi.c: clean up misc compile warnings + alarms.c: only try to set ID on/off if option specified + fruconfig.c: switched board part num & serial num + showsel.c: changed display ordering + ipmicmd.c: added GET_POWERON_HOURS + ipmicmd.h: added GET_POWERON_HOURS + sensor.c: added Power On Hours + hwreset.c: changed boot options to leave console redir same + 06/24/03 ARCress ver 1.3.3 + fruconfig.c: added Chassis fields + fruconfig.c: added errno.h + pefconfig.c: fixed EnablePef if startup delay not supported + pefconfig.c: added errno.h + wdt.c: progver 1.2 includes EMSGSIZE fix + ipmimv.c: ignore EMSGSIZE errno for get_wdt command + showsel.c: fix -w if log gets cleared + ipmicmd.c: always add an extra byte to _mv sresp for cc + 07/24/03 ARCress + hpiutil-1.0.4.tar.gz: added parallel HPI utilities + 07/30/03 ARCress ver 1.3.4 + pefconfig v1.18: add SerialOverLan configuration + mod to SetUser, added GetBmcEthDevice, + use 'arping -I' if eth1. + ipmicmd.c: added serial-over-lan commands, + added GetThresholds, fix for ipmi_cmd_raw, + changed some error messages + sensor v1.8: add -t option for thresholds, + added sample Discovery routine (unfinished) + added ipmi_getdeviceid for completeness + 08/18/03 ARCress ver 1.3.5 + pefconfig v1.19: add SetLanParam(2) to 0x17 for SSU bug + showsel v1.14: Decode OEM event records for panic string + kern/bmcpanic-2.6.0.patch: changes to OpenIPMI for kernel 2.6.0 + 09/18/03 ARCress ver 1.3.6 + ipmicmd.c: added debug messages for fDriverTyp first time + sensor v1.9: show hex for most SDR OEM subtypes + fix bug in GetSDR multi-part gets (usu OEM SDRs) + stop if SDR Repository is empty + showsel v1.15: add more sens_desc strings + pefconfig v1.21: Don't enable a PEF entry if it is empty, + added -L lan_ch parameter, + scan for lan_ch in GetBmcEthDevice + tmconfig v1.13: isolate ser_ch, add -n option to specify chan# + UserGuide: added links for other IPMI drivers, + updated with new man page details + sensor.8 added option -t + pefconfig.8 added option -L + tmconfig.8 added option -n + 10/29/03 ARCress ver 1.3.7 + pefconfig v1.21 added option -D for DHCP + pefconfig.8 added option -D + sensor v1.10 added options to set thresholds + sensor v1.11 fixed offset for show thresholds + sensor.8 documented threshold options + showsel v1.16 add more sens_desc strings (for boot) + wdt v1.3 fixed cc error in set_wdt (idata size) + 12/05/03 ARCress ver 1.3.8 + pefconfig v1.22 fixed auth type enables for ServerConfig + 01/15/04 ARCress ver 1.4.0 + ipmicmd.c added more SEvt commands + ipmicmd.h added more SEvt commands + sensor v1.12 fixed SetThreshold to set hysteresis + sensor.8 more desription on set threshold parameters + UserGuide updates sensor man page, added completion codes + README updated with current man page filenames + showsel v1.17 more sens_desc for Fans + 01/20/04 ARCress ver 1.4.1 + imbapi.c added WIN32 flags + imb_api.h added WIN32 flags + ipmicmd.c added WIN32 flags + alarms v1.2 added mBMC code, Chesnee disk LEDs, & WIN32 + showsel v1.18 added WIN32 flags, added header display + sensor v1.13 changed field order, added header display + check for sdr sz below min, added WIN32. + 03/23/04 ARCress ver 1.4.2 + showsel v1.19 ClockSync description changed + wdt v1.4 fixed cc=0xcc if pretimeout not zero. + pefconfig v1.24 changed default pefnum for mBMC to 10 + sensor v1.16 Added SDR type 3 parsing for mBMC, + Added check for superuser, more mBMC logic + 04/08/04 ARCress ver 1.4.3 + checksel New script using showsel to write to syslog and clear if low + showsel v1.20 change pattern matching for thresholds, + added sens_desc for ID Button + added sens_desc for HSC, System Events, Power, Inter. + 04/30/04 ARCress ver 1.4.4 + showsel v1.21 added threshold OK descriptions, + change header (time is local, not GMT) + sensor v1.17 added -r option for raw SDR output + ipmimv.c increased timeout from 5 sec to 10 sec + pefconfig v1.25 fixed lan_ch detection for some /dev/ipmi0 cases + 06/10/04 ARCress ver 1.4.5 + ipmimv.c only open/close device once per application for + mv/openipmi driver, rely on each app calling ipmi_close. + *.c changes for ipmi_close, changes for WIN32 + doc/mk.bat added, sample build script for WIN32 + sensor v1.18 fixed sresp in GetSDR for WIN32 + showsel v1.22 added ReportEvent for -w option with WIN32 + v1.23 use gmtime instead of localtime for WIN32 + pefconfig v1.27 added channel access params for ia64, added WIN32 + 07/14/04 ARCress ver 1.4.6 panicsel + pefconfig.8 added more explanation with alert dest ip parameter. + pefconfig v1.28 added parsing for community on trapsink line, + show error message if GetDeviceID fails for WIN32. + tmconfig v1.15 allow -p for user 1 if no username specified (fSetPsw), + show error message if GetDeviceID fails for WIN32. + sensor v1.19 added -a to reArm sensor + UserGuide fix description of checksel + 07/23/04 ARCress ver 1.4.7 panicsel + pefconfig v1.29 use lan_ch variable to set Alert Policy Table, + which fixes a problem for TIGPT1U platforms. + bmclanpet.mib new MIB file added for PET + bmclanaol.mib renamed from bmclan.mib for alert-on-LAN + 08/05/04 ARCress ver 1.4.8 panicsel/ipmiutil + panicsel.spec redirect stderr to $tmpsel from pefconfig command. + For SuSE, symlink snmpd.conf to common location. + Also added icmd & icmd.8 to rpm. + hwreset v1.9 implement special OS shutdown method for Langleys, + make sure to show error if ccode != 0 + icmd v1.2 fix for mv driver type in ipmicmd.c (thanks Kevin Gao) + doc/icmd.8 new man page added + doc/UserGuide added icmd description + added Use Cases for sensor thresholds and for + pefconfig with gpg decryption of password. + doc/Makefile copy icmd.8 for make install + util/ipmimv.c handle alternate device filenames for some 2.6 kernels + showsel v1.24 add more decoding for Power events + 08/24/04 ARCress ver 1.4.9 ipmiutil + sensor v1.20 add decoding for DIMM status (compact SDRs) + pefconfig 1.30 fixed decoding of PE Table entries, + added option -e for completeness, + added more messages to GetUser. + pefconfig.8 added more explanation of options. + UserGuide added separate References section 2.2 + added section 4.5 on interpreting SNMP traps + from BMC LAN events. + added section 4.3 for watchdog usage + ipmiutil.spec link MIBs into /usr/share/snmp/mibs + alarms.c added more comments about alarm status byte + 10/29/04 ARCress ver 1.5.0 ipmiutil + pefconfig 1.31 added Get_Mac, etc. logic for WIN32. + pefconfig 1.32 added -N & -R + pefconfig.8 describe format for MAC address params. + UserGuide describe format for pefconfig MAC address params. + hpiutil/* misc changes, see hpiutil/ChangeLog + alarms 1.4 make sure we always write 1s for relays + ipmignu.c new file, to support GNU FreeIPMI lib + ipmicmd.c changes to support gnu lib + util/*.c changes to add -N nodename -R rmt_passwd + freeipmi/* new include files, lib files + doc/*.8 add -N -R descriptions + doc/UserGuide add -N -R descriptions + 11/09/04 ARCress ver 1.5.1 ipmiutil + ipmignu.c use MD5 instead of MD2 for ipmi_lan, + changes for comp code in _kcs_cmd & _lan_cmd + added sig_timeout for _kcs_cmd & _lan_cmd + ipmiutil.spec create /var/lib/freeipmi/ipckey in postinstall + 11/16/04 ARCress ver 1.5.2 ipmiutil + ipmignu.c added username logic, added sig_abort for ctl-C + util/*.c added -U option + doc/*.8 added -U option description + showsel.c added more watchdog2 decoding + 11/23/04 ARCress ver 1.5.3 ipmiutil + ipmignu.c added ipmi_lan ping before open_session, + added connect states for timeouts. + sensor.8 added -w option + sensor v1.22 added more compact sensor decoding, and -w option + showsel v1.28 added more decoding for crit_int, slots, etc. + changed firmware error decoding + pefconfig 1.34 added -u option to configure a lan username + fruconfig 1.9 version with ipmignu.c changes + tmconfig v1.17 version with ipmignu.c changes + hwreset v1.11 version with ipmignu.c changes + alarms v1.5 version with ipmignu.c changes + icmd.c v1.4 version with ipmignu.c changes + wdt v1.7 version with ipmignu.c changes + 12/08/04 ARCress ver 1.5.4 ipmiutil + hwreset v1.12 fix bug 1075550 with -o -N, skip -o if not local + sensor v1.23 added sens_type to display output + wdt v1.8 add counter & pretimeout display in show_wdt + icmd v1.5 changed usage order, put bus first + imbapi.c IMB_MEMORY compile flag, skip unneeded routines + doc/bmc*.mib removed outdated license text + hpiutil/hpiwdt v1.1 - fixed RPT loop, added more decoding, + added flags for HPI_A/HPI_B. + hpiutil/hpireset v1.1 - added HPI_A/B flags + hpiutil/hpifru v1.3 - added HPI_A/B flags + 01/11/05 ARCress ver 1.5.5 ipmiutil + doc/bmc*.mib added BSD license text for clarity + Makefile.am consolidate PKGDIR + setver discovers PKGDIR based on MACHTYPE + sensor v1.25 added support for device sdrs also, + fixed sens_cap byte, + change display order in ShowThresh, highest to lowest, + change signed exponent type in decodeValue + pefconfig 1.35 allow BMC LAN check if fIPMI10 + 01/13/05 ARCress ver 1.5.6 ipmiutil + hpiutil/* changes for hpiutil-1.1.8 and HPI_A/B porting + fruconfig 1.10 add logic to scan SDRs for all FRU devices, + and interpret them. + sensor 1.26 added time display if -w + 01/31/05 ARCress ver 1.5.7 ipmiutil + util/*.c additional WIN32 compile flags for -N/-U/-R + sensor 1.27 mod for Power Redundancy SDR status + fruconfig 1.12 display formatted SystemGUID (with dashes) + pefconfig 1.36 handle IPMI 2.0 versions + tmconfig 1.18 handle IPMI 2.0 versions + 02/04/05 ARCress ver 1.5.8 ipmiutil + doc/Makefile change for /usr/share/man + doc/ipmiutil.spec change for /usr/share/man, change for rpm -U + fruconfig 1.13 fixed fwords bitmask in load_fru, + added more SPD decoding + 03/10/05 ARCress ver 1.6.0 ipmiutil + Makefile.am better order of cleanup for 'make tarball' + util/Makefile.am added getevent, xmlconfig + getevent.c new file, getevent utility, not always supported. + xmlconfig.c new file, xmlconfig utility, similar to pefconfig. + ipmicmd.c added more runtime debug to device opens + alarms 1.6 add new bus id for Intel TIGI2U + fruconfig 1.14 decode FRU Board Mfg DateTime + pefconfig 1.37 if DHCP, can set DHCP Server via -I param, + added IPMI 2.0 checking, + show Serial-Over-Lan params + fix -L with lan_ch_parm. mods to GetBmcEthDevice + sensor 1.29 added FloatToRaw for -h/-l threshold set funcs, + added better Phys Security sensor decoding. + added -v to show max/min & hysteresis. + showsel 1.29 made decode_sel_entry a subroutine, + added logic for OEM 0xc0 record types. + ipmild.c new file for supporting LanDesk driver (stub), + when ldipmi API lib is clean, this can be finished. + ipmicmd.c changes to add ipmi*_ld routines + ipmimv.c fix /dev/ipmi0 IPMB requests (to other than BMC_SA) + doc/tmconfig.8 added more in examples + doc/ipmiutil.spec check for any existing version of libfreeipmi & use it + 03/25/05 ARCress ver 1.6.1 ipmiutil + fruconfig 1.15 show Asset Tag Length earlier + pefconfig 1.39 fix GetBmcEthDevice for invalid MAC compares + tmconfig 1.19 show ser_ch being used, fix -n ser_ch + sensor 1.30 show BMC_TAM tag if configured in OEM SDRs + freeipmi/* upgraded files to freeipmi 0.1.3 (libfreeipmi.so.1) + 04/21/05 ARCress ver 1.6.2 ipmiutil + hwreset 1.13 try netapp_reset commands for platforms that use + this if chassis_reset gets an error. + alarms 1.7 add check for BMC TAM if trying to set alarms. + bmclanaol.mib fixed duplicate pET_AlertOnLan trap names + sensor 1.31 added battery type to decode_comp_reading + sensor 1.32 add error message if -n sensor_num not found + added more decoding for Power Redund sensor + 05/24/05 ARCress ver 1.6.3 ipmiutil + hpiutil/* 1.1.10 updates for hpiutil-1.1.10 + ipmicmd.c - added LINK_LANDESK flags + imbapi.c - added LINK_LANDESK flags + imb_api.h - added LINK_LANDESK flags + ipmild.c - added LINK_LANDESK flags + hwreset 1.14 - added -u option for power up + getevent 0.4 - fixed bmc_enable bits, gets events ok now + showsel 1.30 - fixed -w SegFault with StartWriting/fscanf w GNU KCS + fruconfig 1.16 - dont try write_asset if show_fru gets an error + freeipmi/libf* - fixed ipmi_lan_open_session bug in freeipmi-0.1.3 + freeipmi/ipmilan.patch - saved ipmi_lan patch for 0.1.3 + README - added How to build with LanDesk support + + 06/10/05 ARCress ver 1.6.4 ipmiutil + ipmignu.c - return NOTSUPPORTED if slave addr != BMC_SA + ipmignustub.c - add parameter sa to ipmicmd_gnu() + doc/UserGuide - inserted ipmiutil for Windows as section 5.0 + doc/showsel.mc - new, showsel messages for windows syslog + events.c - new, moved decode_sel_event() here from showsel.c + getevent 0.5 - added call to decode_sel_event + showsel 1.31 - moved decode_sel_event to events.c + pefconfig 1.40 - Change priorities when setting my MAC in BMC + + 06/24/05 ARCress ver 1.6.5 ipmiutil + tmconfig 1.21 - show multiple alert destinations + pefconfig 1.41 - show multiple alert destinations, + and handle fSOL20 commands + sensor 1.33 - handle ATCA platforms + fruconfig 1.17 - handle DeviceSDRs and ATCA + alarms 1.8 - added new code for PICMG/ATCA + alarms.8 - added explanation about Power LED wrt System Faults + + 07/07/05 ARCress ver 1.6.6 ipmiutil + pefconfig 1.42 - Fix GetBmcEthDevice for TIGI2U with IMM GCM + + 08/08/05 ARCress ver 1.6.7 ipmiutil + doc/ipmiutil.spec - rm getevent & xmlconfig before build rpm, + test if BMC LAN already configured before pefconfig + util/Makefile.am - add ipmild.o if no freeipmi + depcomp - new file added + util/ipmicmd.c - test for ldipmi first, to avoid LanDesk hang bug + sensor 1.34 - check if reading is in init state + pefconfig 1.43 - Mods to handle Intel NSI2U miniBMC, + pefconfig 1.44 - added -t option to test if BMC LAN configured + doc/UserGuide - added alarms.8 update wrt Power LED + + 09/01/05 ARCress ver 1.6.8 ipmiutil + cleanup of comments to consistently use users.sf.net email address. + tmconfig 1.22 - truncate extra string chars + pefconfig 1.45 - truncate extra string chars, + README - added reference to INSTALL for build + INSTALL - added more build notes + doc/mksel.bat - new, special make for showsel.exe & showselmsg.dll + Makefile.am - make rpm update for --buildroot + util/Makefile.am - fixed missing -DLINUX error in 1.6.7 + doc/ipmiutil.spec - make rpm update for RPM_BUILD_ROOT + fruconfig 1.18 - add -s option to set Product Serial Num also + + 09/09/05 ARCress + getevent 0.6 - add event type filtering using sensor type + pefconfig 1.46 - enable mBMC PEF entries 26 thru 30 + sensor 1.35 - dont check superuser if fipmi_lan + showsel 1.33 - dont check superuser if fipmi_lan + + 09/16/05 ARCress + pefconfig.c - updated findmatch() for special case + xmlconfig.c - updated findmatch() for special case + + 03/02/06 ARCress ver 1.6.9 ipmiutil + sensor 1.36 - check PowerOnHours completion code (01/18/06), + added -i option to only show one sensor index + ipmignu.c - changes to enable new libfreeipmi.so.1 w ipmi_cmd_raw, + use OLDLIB compile flag until this is complete. + *.c - rename ipmi_close & ipmi_cmd_raw to avoid conflicts + with new freeipmi lib symbols. + ipmiutil.spec - always copy checksel to /etc/cron.daily if ipmi works + events.c - handle more PowerUnit 0b vs. 6f event types + + 04/13/06 ARCress ver 1.6.10 ipmiutil + sensor 1.37 - added -p option to persist/save thresholds + getevent 1.0 - added loop and -o for runOnce + alarms 1.9 - added BUS_ID7 for Harbison platform + pefconfig 1.47 - exit early if -d + hwreset 1.15 - added -p, -m, -e options + wdt 1.9 - fix -t if nsec > 255 + icmd 1.6 - increment istart for -U -R (Thanks to Ernie Hansen) + bmchealth 0.2 - new file + doc/ipmiutil.spec - include getevent in rpm + doc/getevent.8 - new file + doc/bmchealth.8 - new file + doc/Makefile - add getevent.8 + +05/18/06 ARCress ver 1.7.0 ipmiutil + tmconfig 1.23 - add -B baud option + bmchealth 0.3 - add get_chan_auth results, also -h option + doc/tmconfig.8 - document -B baud and -t options + doc/hwreset.8 - document -p -m -e options + doc/sensor.8 - document -i -p options + doc/pefconfig.8 - document -t option + doc/UserGuide - updated, added getevent, bmchealth + lib/Makefile - pick correct libipmiapi.a if present + Makefile.am - invoke lib/Makefile + util/ipmilan.c - new logic for built-in IPMI LAN interface + util/md2.c - new for ipmilan.c + util/md5.c - new for ipmilan.c + util/ipmicmd.c - invoke ipmilan logic ifdef BUILTIN_LAN + freeipmi/libfreeipmi.so-x86_64 - updated build + +06/19/06 ARCress ver 1.7.1 ipmiutil + util/ipmilan.c - fix seq_num wrap for longer lan sessions + util/sensor.c - fix PowerOnHours with 64-bit OSs. + +06/20/06 ARCress ver 1.7.2 ipmiutil + util/ipmilan.c - add rmcp_ping routine + bmchealth 0.6 - more vendor strings, add ping_node() stub for now + pefconfig 1.48 - fix strcmp(gcm), show all 4 alert policies, + add PefDesc() for misc vendor pefdesc, add -a. + +07/28/06 ARCress ver 1.7.3 ipmiutil + wdt 1.10 - added -l dontlog and -a action options + showsel 1.34 - added -l for last N records, + added more decoding for Memory, Audit types + sensor 1.39 - added -L for looping, handle fdevsdrs if rc==c1, + include SDR type 10h in parsing. + getevent 1.1 - specific no data message for cc=0x80, + include special getevent_mv() for OpenIPMI, + added msgout() routine + util/ipmicmd.c - add no data message to decode_cc, + better separate each driver implementation + util/ipmiia.c - new, separate for IA IMB driver + util/ipmiva.c - new, separate for VA driver + util/ipmilan.c - fix _lan_cmd returning an extra byte + util/ipmignu.c - support for freeipmi-0.2.3 lib, which supports ssif + via /dev/i2c-0 (i2c-core, i2c-i801, i2c-dev modules) + This ssif code does not yet work for all IPMI commands. + Note that the freeipmi-0.2.3 lan code has a naming + conflict with ipmi_cmd, so further code changes would + be required if one wanted to switch from Built-in LAN + to GNU_LAN. + util/ipmimv.c - added getevent_mv routine + util/events.c - added message for Chassis Intrusion + util/*.c - add -E option for IPMI_PASSWORD, use -P like -R, + add -V, -T options for IPMI LAN + doc/*.8 - updated man pages for changed options + doc/UserGuide - updated for changed options + +08/17/06 ARCress ver 1.7.4 ipmiutil + doc/ipmiutil.spec - fix for detecting existing libfreeipmi during install + util/ipmicmd.h - added decode_cc prototype + util/ipmicmd.c - only show no driver msg if not fipmi_lan + util/ipmilan.c - added decode_cc to default case, fix MASK_AUTHTYPEs, + added poke2 & command retries + pefconfig 1.49 - added Alcolu 0x0028 prod_id to fnotshared + getevent 1.2 - added -s for SEL method + fruconfig 1.19 - don't show Asset Tag Length by default + alarms 1.10 + bmchealt 0.7 + hwreset 1.17 + icmd 1.7 + sensor 1.40 + showsel 1.35 + tmconfig 1.24 + wdt 1.11 + xmlconfig 0.3 + +08/22/06 ARCress ver 1.7.5 ipmiutil + ipmidir.c - new, for direct raw I/Os (if no driver) + ipmidir.h - new + ipmilan.c - keep going even if ping failure + imbapi.c - more DEBUG output + doc/ipdiff.sh - new script to allocate non-shared BMC LAN IP addresses + alarms 1.11 + bmchealth 0.8 + fruconfig 1.20 + getevent 1.3 + hwreset 1.18 + icmd 1.8 + pefconfig 1.50 + sensor 1.41 + showsel 1.36 - PowerUnit decoding for data1=0x43 + tmconfig 1.25 + wdt 1.12 - fixed typo for -r/-a options + xmlconfig 0.4 + +09/12/06 ARCress ver 1.7.6 ipmiutil + ipmiutil.spec - save a sensor snapshot as sensor_out.txt + pefconfig.8 - added EXAMPLES + UserGuide - added pefconfig EXAMPLES + tmconfig.c - use authmask to set Serial Param(2) + pefconfig.c - use -B for baud_sol, move alert_max to -X. + ipmidir.c - streamlined debug messages + showsel.c - fixed wrap condition for showsel -l option + getevent.c - handle empty SEL for getevent -s option + ipmiutil-1.7.6: + alarms.c ver 1.12 + bmchealth.c ver 0.9 + fruconfig.c ver 1.21 + getevent.c ver 1.4 + hwreset.c ver 1.19 + icmd.c ver 1.9 + pefconfig.c ver 1.51 + sensor.c ver 1.42 + showsel.c ver 1.37 + tmconfig.c ver 1.26 + wdt.c ver 1.13 + xmlconfig.c ver 0.5 + +10/02/06 ARCress ver 1.7.7 ipmiutil + test/ipmievt.sh - new, causes Baseboard Temp events with sensor thresholds + doc/ipmi_if.sh - gather more info from dmidecode to ipmi_if.txt + util/hwreset.c - soft reset stuff, special handling for Tyan systems. + util/pefconfig.c - added -q for user number, + use bmcmymac if valid, use bmcmyip if ok, + enhanced Get_IPMac_Addr for Windows + util/tmconfig.c - added -q for user number, added -f for Flow Control, + adjust Mode if known, clear SerialParam(3) if -d + util/ipmidir.c - improved detection for DRV_SMB base address + util/events.c - support WIN32 if TEST compile flag + freeipmi/*.h - removed unused include files + ipmiutil-1.7.7: + alarms.c ver 1.13 + bmchealth.c ver 0.10 + fruconfig.c ver 1.22 + getevent.c ver 1.5 + hwreset.c ver 1.20 + icmd.c ver 1.10 + pefconfig.c ver 1.52 + sensor.c ver 1.43 + showsel.c ver 1.38 + tmconfig.c ver 1.27 + wdt.c ver 1.14 + xmlconfig.c ver 0.6 + + +10/19/06 ARCress ver 1.7.8 ipmiutil + util/pefconfig.c - use bmcdestip if valid, + FindEthNum updates, always use gwy interface for mac, + add -# alias for -q usernum (max =15) + util/tmconfig.c - add -# alias for -q usernum (max =15) + util/sensor.c - check Repository Info whether Reserve supported or not, + and use Reserve whenever possible. + util/bmchealth.c - more vendor names + util/hwreset.c - added -D for soft power down + util/ipmilan.c - special for Dell BMC with no MsgAuth support + doc/UserGuide - more sensor details, decimal completion codes, etc. + ipmiutil-1.7.8: + alarms.c ver 1.14 + bmchealth.c ver 1.0 + fruconfig.c ver 1.23 + getevent.c ver 1.6 + hwreset.c ver 1.21 + icmd.c ver 1.11 + pefconfig.c ver 1.53 + sensor.c ver 1.44 + showsel.c ver 1.39 + tmconfig.c ver 1.28 + wdt.c ver 1.15 + xmlconfig.c ver 0.7 + + +10/24/06 ARCress ver 1.7.9 ipmiutil + util/bmchealth.c - add -g for system GUID + util/ipmilan.c - streamline some debug messages + util/alarms.c - do not abort if no Telco Alarms, still allow -i + util/pefconfig.c - fix 0xc7 error with SOL AccumInterval + ipmiutil-1.7.9: + alarms.c ver 1.15 + bmchealth.c ver 1.1 + fruconfig.c ver 1.24 + getevent.c ver 1.7 + hwreset.c ver 1.22 + icmd.c ver 1.12 + pefconfig.c ver 1.54 + sensor.c ver 1.45 + showsel.c ver 1.40 + tmconfig.c ver 1.29 + wdt.c ver 1.16 + xmlconfig.c ver 0.8 + +12/08/06 ARCress ipmituil-1.7.10 changes + util/idiscover.c - new + util/isolconsole.c - new, renamed from solconsole.c (just a framework) + util/ipmilan.c - Change ASF ping IANA number to HI-LO ordering (1601296) + util/pefconfig.c - display user names, EnablePef mods for non-Intel + util/tmconfig.c - display user names + util/ipmicmd.c - added ipmi_getpicmg(), ipmi_cmd_mc() + util/ipmilan.c - added ipmi_cmd_ipmb() for IPMB indirect cmds + util/*.c - test for fpicmg (ATCA) + util/sensor.c - add -m, -c and child MC logic for ATCA + util/fruconfig.c - add -m option for ATCA child MCs. + util/Makefile.am - mods for idiscover, isolconsole + mods for configure/landesk feature + doc/ipmiutil.spec - create new util names with i* + configure.in - mods for --enable-landesk=yes + Makefile.am - fix make tarball for libipmiapi32.a (bug 1610481) + ipmiutil-1.7.10 contains: + alarms.c (ialarms) ver 1.16 + bmchealth.c (ihealth) ver 1.2 + fruconfig.c (ifruconfig) ver 1.25 + getevent.c (igetevent) ver 1.8 + hwreset.c (ireset) ver 1.23 + icmd.c (icmd) ver 1.13 + pefconfig.c (ilanconfig) ver 1.55 + sensor.c (isensor) ver 1.46 + showsel.c (ishowsel) ver 1.41 + tmconfig.c (iserconfig) ver 1.30 + wdt.c (iwatchdog) ver 1.17 + xmlconfig.c (n/a) ver 0.9 + +01/09/07 ARCress ipmiutil-1.8.0 changes + util/events.c - added Power Unit 0x8B events + util/sensor.c - more ShowTAM decoding + util/ipmilanplus.c - new for v2.0 RMCP+ via ipmitool plugin + util/ipmilan2.c - new for internal v2.0 RMCP+ (incomplete, not used) + util/ipmicmd.c - added logic for calling lan2 + util/ipmiutil.c - new, meta-command code + util/*.c - mods for -DMETACOMMAND + util/Makefile.am - mods to build with -DMETACOMMAND and ipmilanplus.c + doc/ipmiutil.8 - new man page + doc/ipmiutil.spec - add ipmiutil METACOMMAND + doc/*.8 - add -F option + doc/UserGuide - add ipmiutil, -F option, reorder man pages + doc/mk*.bat - updates for lanplus + lib/Makefile - added make for lib/lanplus subdir + lib/lanplus/* - new for ipmitool-1.8.7 plugin library + ipmiutil-1.8.0 contains: + ipmiutil.c (ipmiutil) ver 1.0 + alarms.c (ialarms) ver 1.17 + bmchealth.c (ihealth) ver 1.3 + fruconfig.c (ifruconfig) ver 1.26 + getevent.c (igetevent) ver 1.9 + hwreset.c (ireset) ver 1.24 + icmd.c (icmd) ver 1.14 + pefconfig.c (ilanconfig) ver 1.56 + sensor.c (isensor) ver 1.47 + showsel.c (ishowsel) ver 1.42 + tmconfig.c (iserconfig) ver 1.31 + wdt.c (iwatchdog) ver 1.18 + xmlconfig.c (n/a) ver 0.10 + +01/12/07 ARCress ipmiutil-1.8.1 changes + util/ipmilanplus.c - return proper rsp len to fix Win fruconfig bug + util/ipmicmd.c - added show_driver_type() and debug output + util/hwreset.c - Linux -o allow init6 or init0, alt -o if WIN32 + util/bmchealth.c - added some product strings, added Power State + util/events.c - add a '#' before sensor number for easier parsing, + change Watchdog 1/2 to Watchdog_1/2 for parsing, + more BMC System Event descriptions, + util/pefconfig.c - show nice error message if pefconfig -e -N + doc/pefconfig.8 - change examples to show pefconfig -e + doc/getevent.8 - more explanation of methods + doc/ipmi_if.sh - new syntax for tail/head -n + doc/showsel.reg - new, add registry entries for this EventLog service + doc/UserGuide - mention showsel.reg, updated man pages + ipmiutil-1.8.1 contains: + ipmiutil.c (ipmiutil) ver 1.1 + alarms.c (ialarms) ver 1.18 + bmchealth.c (ihealth) ver 1.4 + fruconfig.c (ifruconfig) ver 1.27 + getevent.c (igetevent) ver 1.10 + hwreset.c (ireset) ver 1.25 + icmd.c (icmd) ver 1.15 + pefconfig.c (ilanconfig) ver 1.57 + sensor.c (isensor) ver 1.48 + showsel.c (ishowsel) ver 1.43 + tmconfig.c (iserconfig) ver 1.32 + wdt.c (iwatchdog) ver 1.19 + xmlconfig.c (ixmlconfig) ver 0.11 + +01/23/07 ARCress ipmiutil-1.8.2 changes + util/showsel.c - always show error if cannot open idx file with -w + util/pefconfig.c - fixed -d bug where freadonly flag was =1. + util/ipmilanplus.c - added HAVE_LANPLUS compile flag + util/Makefile.am - added --disable-lanplus option + configure.in - added --disable-lanplus option + win32.zip - added libeay32.dll from openssl build + ipmiutil-1.8.2 contains: + ipmiutil.c (ipmiutil) ver 1.2 + alarms.c (ialarms) ver 1.19 + bmchealth.c (ihealth) ver 1.5 + fruconfig.c (ifruconfig) ver 1.28 + getevent.c (igetevent) ver 1.11 + hwreset.c (ireset) ver 1.26 + icmd.c (icmd) ver 1.16 + pefconfig.c (ilanconfig) ver 1.58 + sensor.c (isensor) ver 1.49 + showsel.c (ishowsel) ver 1.44 + tmconfig.c (iserconfig) ver 1.33 + wdt.c (iwatchdog) ver 1.20 + xmlconfig.c (ixmlconfig) ver 0.12 + +02/08/07 ARCress ipmiutil-1.9.0 changes + util/fruconfig.c - dont show baseboard FRU twice via DLR + util/ipmicmd.c - added parse_lan_options, print_lan_opt_usage + added -Y option to prompt for password using getline() + util/ipmicmd.h - added parse_lan_options, print_lan_opt_usage + util/*.c - call parse_lan_options, print_lan_opt_usage + util/isolconsole.c - added v2 console functionality, + works fine in Linux, stdin problems in Windows. + util/ipmiutil.c - added sol console to dispatch table + util/ipmidir.c - more max recv len checking + ipmiutil-1.9.0 contains: + ipmiutil.c (ipmiutil) ver 1.3 + alarms.c (ialarms) ver 1.20 + bmchealth.c (ihealth) ver 1.6 + fruconfig.c (ifruconfig) ver 1.29 + getevent.c (igetevent) ver 1.12 + hwreset.c (ireset) ver 1.27 + icmd.c (icmd) ver 1.17 + pefconfig.c (ilanconfig) ver 1.59 + sensor.c (isensor) ver 1.50 + showsel.c (ishowsel) ver 1.45 + tmconfig.c (iserconfig) ver 1.34 + wdt.c (iwatchdog) ver 1.21 + xmlconfig.c (ixmlconfig) ver 0.13 + isolconsole.c (isolconsole) ver 0.9 + +02/16/07 ARCress ipmiutil-1.9.1 changes + util/fruconfig.c - put -m option back for ATCA + util/sensor.c - put -c & -m option back for ATCA + util/icmd.c - fix bug w arg options to use optind, add -m + util/ipmidir.c - bug fix: skip unsafe mmap code if 64-bit + ipmiutil-1.9.1 contains: + ipmiutil.c (ipmiutil) ver 1.4 + alarms.c (ialarms) ver 1.21 + bmchealth.c (ihealth) ver 1.7 + fruconfig.c (ifruconfig) ver 1.30 + getevent.c (igetevent) ver 1.13 + hwreset.c (ireset) ver 1.28 + icmd.c (icmd) ver 1.18 + pefconfig.c (ilanconfig) ver 1.60 + sensor.c (isensor) ver 1.51 + showsel.c (ishowsel) ver 1.46 + tmconfig.c (iserconfig) ver 1.35 + wdt.c (iwatchdog) ver 1.22 + xmlconfig.c (ixmlconfig) ver 0.14 + isolconsole.c (isolconsole) ver 0.10 + +02/23/07 ARCress ipmiutil-1.9.2 changes + util/pefconfig.c - add Get/SetPayloadAccess for 2.0 SOL + util/isolconsole.c - add -e for no encryption, fix Windows stdin + util/ipmilan.c - add some 1.5 SOL code + util/ipmilanplus.c - set cipher_suite = 3 for open session request + util/sensor.c - add CPU Proc Hot decoding for evtype==5 + util/ipmiutil.c - use sub-command names as i_* routines + util/*.c - changed to i_* naming + doc/ipmiutil.spec - link to i_* command names, add isolconsole + ipmiutil-1.9.2 contains: + ipmiutil.c (ipmiutil) ver 1.5 + alarms.c (i_alarms) ver 1.22 + bmchealth.c (i_health) ver 1.8 + fruconfig.c (i_fru) ver 1.31 + getevent.c (i_getevt) ver 1.14 + hwreset.c (i_reset) ver 1.29 + icmd.c (i_cmd) ver 1.19 + pefconfig.c (i_lan) ver 1.61 + sensor.c (i_sensor) ver 1.52 + showsel.c (i_sel) ver 1.47 + tmconfig.c (i_serial) ver 1.36 + wdt.c (i_wdt) ver 1.23 + xmlconfig.c (i_xml) ver 0.15 + isolconsole.c (i_sol) ver 1.0 + +03/15/07 ARCress ipmiutil-1.9.3 changes + test/Makefile - better kernel module make for Linux 2.4 and 2.6 + test/dopanic_drv.c - renamed from dopanic.c + test/dopanic.c - deleted + test/dopanic.8 - new man page + test/ipmi_evt.sh - comments about ibasetemp + lib/Makefile - mods for libipmi_lanplus.so + lib/lanplus/lanplus.c - check null rsp in open_session + lib/lanplus/Makefile.am - mods for libipmi_lanplus.so, + dynamic lib*.so rather than static lib*.a + doc/Makefile - install wdt.sh in data dir + doc/ipmiutil.spec - add wdt.sh to rpm, add libipmi_lanplus.* + beforeconf.sh - new: for lt files, aclocal, autoconf + util/Makefile.am - fixed make libipmiutil.a, libipmi_lanplus.so + util/*.c - added show_outcome() at the end + ipmiutil-1.9.3 contains: + ipmiutil.c (ipmiutil) ver 1.6 + alarms.c (i_alarms) ver 1.23 + bmchealth.c (i_health) ver 1.9 + fruconfig.c (i_fru) ver 1.32 + getevent.c (i_getevt) ver 1.15 + hwreset.c (i_reset) ver 1.30 + icmd.c (i_cmd) ver 1.20 + pefconfig.c (i_lan) ver 1.62 + sensor.c (i_sensor) ver 1.53 + showsel.c (i_sel) ver 1.48 + tmconfig.c (i_serial) ver 1.37 + wdt.c (i_wdt) ver 1.24 + xmlconfig.c (i_xml) ver 0.16 + isolconsole.c (i_sol) ver 1.1 + +04/06/07 ARCress ipmiutil-1.9.4 changes + util/isolconsole.c - added #else for HAVE_LANPLUS, + more vt100-to-ansi handling, + added -r for raw termio if Windows ANSI + util/ipmicmd.c - fix spacing in dump_buf + lib/lanplus/lanplus.c - abort if bad HMAC from RAKP2 + doc/ipmiutil.spec - fix libcrypto.so.4 for MVL + util/getevent.c - interpret cc==0x80 as timeout message + util/ipmimv.c - handle MV bug: missing 3 bytes + util/showsel.c - also show OEM records if -s + ipmiutil-1.9.4 contains: + ipmiutil.c (ipmiutil) ver 1.7 + alarms.c (i_alarms) ver 1.24 + bmchealth.c (i_health) ver 1.10 + fruconfig.c (i_fru) ver 1.33 + getevent.c (i_getevt) ver 1.16 + hwreset.c (i_reset) ver 1.31 + icmd.c (i_cmd) ver 1.21 + pefconfig.c (i_lan) ver 1.63 + sensor.c (i_sensor) ver 1.54 + showsel.c (i_sel) ver 1.49 + tmconfig.c (i_serial) ver 1.38 + wdt.c (i_wdt) ver 1.25 + xmlconfig.c (i_xml) ver 0.17 + isolconsole.c (i_sol) ver 1.2 + +04/20/07 ARCress ipmiutil-1.9.5 changes + util/events.c - add -p for PET format events + util/Makefile.am - do "make events" to build events util + util/ipmimv.c - check for ASYNC_EVENTs in ipmicmd_mv + util/ipmilan.c - some 1.5 SOL data mods, decode_rv mods + util/ipmicmd.c - some 1.5 SOL data mods, show_outcome(decode_rv) + util/isolconsole.c - some 1.5 SOL data mods, more win termio + util/alarms.c - add -d for enclosure slot LEDs + ipmiutil-1.9.5 contains: + ipmiutil.c (ipmiutil) ver 1.8 + alarms.c (i_alarms) ver 1.25 + bmchealth.c (i_health) ver 1.11 + fruconfig.c (i_fru) ver 1.34 + getevent.c (i_getevt) ver 1.17 + hwreset.c (i_reset) ver 1.32 + icmd.c (i_cmd) ver 1.22 + pefconfig.c (i_lan) ver 1.64 + sensor.c (i_sensor) ver 1.55 + showsel.c (i_sel) ver 1.50 + tmconfig.c (i_serial) ver 1.39 + wdt.c (i_wdt) ver 1.26 + xmlconfig.c (i_xml) ver 0.18 + isolconsole.c (i_sol) ver 1.3 + +05/10/07 ARCress ipmiutil-1.9.6 changes + doc/UserGuide - added section 4.7 How to configure IPMI LAN, + updated Windows build instructions + doc/pefconfig.8 - add -l option description + doc/wdt.sh - fix cron entry to run every 60 seconds + doc/idiscover.8 - new + test/ipmievt.sh - automatically set ibasetemp via $sensorfil + util/ipmilan.c - more 1.5 SOL data mods, not working yet + util/ipmi*.c - cleanup, use common ipmi_cmdraw* routines + util/ipmiia.c - no longer used, see imbapi.c + util/Makefile.am - remove ipmiia.c + util/pefconfig.c - add -l to configure LAN but not PEF, + fix 1714748 for getopt missing X param + util/idiscover.c - add -g and -a functionality, and WIN32 + * Improvements for Windows build: + lib/lanplus/*.c - change to inttypes-win.h if WIN32 + lib/lanplus/inc/ipmitool/*.h - change to inttypes-win.h + lib/lanplus/inc/inttypes-win.h - new + lib/lanplus/ipmiplus.mak - new + lib/ipmilib.mak - new + util/ipmiutil.mak - new + buildwin.cmd - new + INSTALL - updated Windows build instructions + ipmiutil-1.9.6 contains: + ipmiutil.c (ipmiutil) ver 1.9 + alarms.c (i_alarms) ver 1.26 + bmchealth.c (i_health) ver 1.12 + fruconfig.c (i_fru) ver 1.35 + getevent.c (i_getevt) ver 1.18 + hwreset.c (i_reset) ver 1.33 + icmd.c (i_cmd) ver 1.23 + pefconfig.c (i_lan) ver 1.65 + sensor.c (i_sensor) ver 1.56 + showsel.c (i_sel) ver 1.51 + tmconfig.c (i_serial) ver 1.40 + wdt.c (i_wdt) ver 1.27 + xmlconfig.c (i_xml) ver 0.19 + isolconsole.c (i_sol) ver 1.4 + idiscover.c (i_discover) ver 1.0 + PENDING ISSUES in ipmiutil-1.9.6: + Handle Windows command prompt terminal emulation for SOL + The Windows isolconsole.exe works, but the terminal emulation logic is + not finished. It works ok to Linux command-line and vi, but looks + bad for BIOS/POST. This is in progress. There are other (non-open) + tools available for Windows (e.g. Intel dpccli) in the interim. + The Linux isolconsole works fine, this relates to Windows client SOL. + Add older 1.5 SOL protocol capability + For isolconsole with IPMI 1.5, the older (Intel-only) 1.5 SOL protocol + is implemented and will connect, but the 1.5 SOL data packets are not + right yet. This is in progress. Note that the standard IPMI 2.0 SOL + protocol is entirely separate and still works fine. + + +05/29/07 ARCress ipmiutil-1.9.7 changes + doc/UserGuide - added idiscover, SOL section 4.8, + and more Windows build detail + doc/ipmiutil.spec - added ipmi_port init handling, %buildroot changes + doc/ipmi_port.sh - init script for ipmi_port + doc/Makefile - add ipmi_port.sh + util/bmchealth.c - add more manufacturers + util/ipmidir.c - allow "Register Spacing:" in ipmi_if.txt + util/ipmi_port.c - new, allocate RMCP port for port mapper + util/getevent.c - add -b for background + util/tmconfig.c - add -i for inactivity timeout + util/pefconfig.c - use serial baud for SOL baud by default, + add Windows iphlpapi calls for detection. + util/ipmiutil.mak - add iphlpapi.lib for pefconfig + util/pefconfig.c-nohlp - new, without Windows iphlpapi.* + util/ipmiutil.mak-nohlp - new, without Windows iphlpapi.lib + util/isolconsole.c - fix Enter key confusion w BIOS menus (use CR+LF) + util/Makefile.am - build events and ipmi_port by default + lib/lanplus/lanplus.c - fixed assert(0) in ipmi_lan_poll_recv, + and set rmcp_hdr __rsvd=0 for WIN32 + Makefile.am - use default buildroot + ipmiutil-1.9.7 contains: + ipmiutil.c (ipmiutil) ver 1.10 + alarms.c (i_alarms) ver 1.27 + bmchealth.c (i_health) ver 1.13 + fruconfig.c (i_fru) ver 1.36 + getevent.c (i_getevt) ver 1.19 + hwreset.c (i_reset) ver 1.34 + icmd.c (i_cmd) ver 1.24 + pefconfig.c (i_lan) ver 1.66 + sensor.c (i_sensor) ver 1.57 + showsel.c (i_sel) ver 1.52 + tmconfig.c (i_serial) ver 1.41 + wdt.c (i_wdt) ver 1.28 + isolconsole.c (i_sol) ver 1.5 + idiscover.c (i_discover) ver 1.1 + +07/03/07 ARCress ipmiutil-1.9.8 changes + util/pefconfig.c - Fix DHCP Server MAC detection, + detect ethN from gateway route sooner + util/events.c - Fix TEST with no args + util/ipmiutil.mak - add events.exe + util/Makefile.am - build libipmiutil.a by default + util/isolconsole.c - more fixes to Windows translation (-w) + (-w -l gives much better windows emulation, but + there are still some anomalies with it.) + util/ipmidir.c - loop safety limit in KCS wait_for* + lib/Makefile - mods for libipmi_lanplus.a + lib/lanplus/Makefile.am - build static libipmi_lanplus.a + doc/ipmiutil.spec - rpmlint tweaks, use ipmiutil meta-cmd + doc/wdt.sh - use ipmiutil meta-cmd + doc/checksel - use ipmiutil meta-cmd + ipmiutil-1.9.8 contains: + ipmiutil.c (ipmiutil) ver 1.11 + alarms.c (i_alarms) ver 1.28 + bmchealth.c (i_health) ver 1.14 + fruconfig.c (i_fru) ver 1.37 + getevent.c (i_getevt) ver 1.20 + hwreset.c (i_reset) ver 1.35 + icmd.c (i_cmd) ver 1.25 + pefconfig.c (i_lan) ver 1.67 + sensor.c (i_sensor) ver 1.58 + showsel.c (i_sel) ver 1.53 + tmconfig.c (i_serial) ver 1.42 + wdt.c (i_wdt) ver 1.29 + isolconsole.c (i_sol) ver 1.6 + idiscover.c (i_discover) ver 1.2 + ipmi_port.c (i_port) ver 0.2 + +10/01/07 ARCress ipmiutil-2.0.0 changes + This release adds two major features: + 1) Windows SOL emulation (v100 terminal emulation) + 2) Remote soft-shutdown (using hwreset & getevent -a) + util/isolwin.c - new, Windows SOL emulation routines, + added sleep to input thread, scrolling, + significant SOL emulation mods + util/isolconsole.c - calls to isolwin.c, arrow/function key handling + util/hwreset.c - show Power State also, as in bmchealth, + added remote shutdown request (-o -N) + util/sensor.c - fix interpretation of Battery sensors + util/ipmilan.c - show_LastError if not debug, more detail + show connected nodename & IP, added NON_GPL flag, + fix for Dell 1855 authcodes. + util/ipmicmd.c - add show_LastError to show_outcome() + util/ipmiva.c - added NON_GPL/VAOK compile flags + util/idiscover.c - fixed receive/send thread order + util/getevent.c - handle remote shutdown via -a using IMB + util/pefconfig.c - dont detect gcm by default for Caneland + util/ipmicmd.c - added -J for cipher_suite option + util/Makefile.am - add GPL_CFLAGS for nongpl + util/ipmiutil.mak - add NON_GPL option, add isolwin.obj + util/ipmilanplus.c - detect IBMC as not 'intelplus' + lib/lanplus/lanplus.c - show connected nodename & IP + doc/getevent.8 - added -a option + doc/hwreset.8 - added note for -o -N option + doc/UserGuide - updates for getevent,hwreset + doc/ipmi_port.sh - do not start ipmi_port if dpcproxy is running + configure.in - add --enable-nongpl option + ipmiutil-2.0.0 contains: + ipmiutil.c (ipmiutil) ver 2.0 + alarms.c (ipmiutil alarms) ver 1.29 + bmchealth.c (ipmiutil health) ver 1.15 + fruconfig.c (ipmiutil fru) ver 1.38 + getevent.c (ipmiutil getevt) ver 2.0 + hwreset.c (ipmiutil reset) ver 2.0 + icmd.c (ipmiutil cmd) ver 1.26 + pefconfig.c (ipmiutil lan) ver 1.68 + sensor.c (ipmiutil sensor) ver 1.59 + showsel.c (ipmiutil sel) ver 1.54 + tmconfig.c (ipmiutil serial) ver 1.43 + wdt.c (ipmiutil wdt) ver 2.0 + isolconsole.c (ipmiutil sol) ver 1.7 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 0.5 + +10/10/07 ARCress ipmiutil-2.0.1 changes + util/events.c - handle -p using file_grep in Windows + util/ipmilanplus.c - fixed bug detecting icts oem flag for many vendors + util/ipmicmd.c - fixed logmsg/openlog(NULL) bug, add EFI ifdefs + util/ipmilan.c - bug fixes for 1.5 SOL routines + util/isolconsole.c - detect SuperMicro & use shorter SOL keepalive timeout + util/wdt.c - add EFI ifdefs + ipmiutil-2.0.1 contains: + ipmiutil.c (ipmiutil) ver 2.1 + alarms.c (ipmiutil alarms) ver 1.30 + bmchealth.c (ipmiutil health) ver 1.16 + fruconfig.c (ipmiutil fru) ver 1.39 + getevent.c (ipmiutil getevt) ver 2.1 + hwreset.c (ipmiutil reset) ver 2.1 + icmd.c (ipmiutil cmd) ver 1.27 + pefconfig.c (ipmiutil lan) ver 1.69 + sensor.c (ipmiutil sensor) ver 1.60 + showsel.c (ipmiutil sel) ver 1.55 + tmconfig.c (ipmiutil serial) ver 1.44 + wdt.c (ipmiutil wdt) ver 1.31 + isolconsole.c (ipmiutil sol) ver 2.1 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 0.5 + + +10/22/07 ARCress ipmiutil-2.0.2 changes + util/ipmidir.c - fix bug in ipmi_if.txt Base Address parsing + util/sensor.c - fix HSC drive slot sensor reading interpretation, + avoid HSC sensor errors over IPMI LAN. + util/events.c - added 8b 05 event decoding to redund_str + util/pefconfig.c - added osmyip,osmymac for alertname==localhost + ipmiutil-2.0.2 contains: + ipmiutil.c (ipmiutil) ver 2.2 + alarms.c (ipmiutil alarms) ver 1.31 + bmchealth.c (ipmiutil health) ver 1.17 + fruconfig.c (ipmiutil fru) ver 1.40 + getevent.c (ipmiutil getevt) ver 2.2 + hwreset.c (ipmiutil reset) ver 2.2 + icmd.c (ipmiutil cmd) ver 1.28 + pefconfig.c (ipmiutil lan) ver 1.70 + sensor.c (ipmiutil sensor) ver 2.2 + showsel.c (ipmiutil sel) ver 1.56 + tmconfig.c (ipmiutil serial) ver 1.45 + wdt.c (ipmiutil wdt) ver 1.32 + isolconsole.c (ipmiutil sol) ver 2.2 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 0.5 + +11/01/07 ARCress ipmiutil-2.0.3 changes + util/sensor.c - handle & recover from GetSDR error 0xC5 + util/pefconfig.c - fixed PEF entry for Power Redundancy Lost + util/events.c - decode special System Boot event for S5000 + decode PET Power Redundancy correctly + ipmiutil-2.0.3 contains: + ipmiutil.c (ipmiutil) ver 2.3 + alarms.c (ipmiutil alarms) ver 1.32 + bmchealth.c (ipmiutil health) ver 1.18 + fruconfig.c (ipmiutil fru) ver 1.41 + getevent.c (ipmiutil getevt) ver 2.3 + hwreset.c (ipmiutil reset) ver 2.3 + icmd.c (ipmiutil cmd) ver 1.29 + pefconfig.c (ipmiutil lan) ver 2.3 + sensor.c (ipmiutil sensor) ver 2.3 + showsel.c (ipmiutil sel) ver 1.57 + tmconfig.c (ipmiutil serial) ver 1.46 + wdt.c (ipmiutil wdt) ver 1.33 + isolconsole.c (ipmiutil sol) ver 2.3 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 0.5 + +11/16/07 ARCress ipmiutil-2.0.4 changes + util/pefconfig.c - add a custom PEF entry via -j, set PEF severity, + better IsMacValid checking to allow broadcast MAC. + ipmiutil-2.0.4 contains: + ipmiutil.c (ipmiutil) ver 2.4 + alarms.c (ipmiutil alarms) ver 1.33 + bmchealth.c (ipmiutil health) ver 1.19 + fruconfig.c (ipmiutil fru) ver 1.42 + getevent.c (ipmiutil getevt) ver 2.4 + hwreset.c (ipmiutil reset) ver 2.4 + icmd.c (ipmiutil cmd) ver 1.30 + pefconfig.c (ipmiutil lan) ver 2.4 + sensor.c (ipmiutil sensor) ver 2.4 + showsel.c (ipmiutil sel) ver 1.58 + tmconfig.c (ipmiutil serial) ver 1.47 + wdt.c (ipmiutil wdt) ver 1.34 + isolconsole.c (ipmiutil sol) ver 2.4 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 0.5 + +12/17/07 ARCress ipmiutil-2.0.5 changes + doc/events.8 - new, documents the events utility + doc/ipmiutil.spec - add events.8 + doc/Makefile - add events.8 + util/alarms.c - do not try disk enclosure LEDs if ipmi_lan, + add "disk " to slot LED output. + util/bmchealth.c - added Aelita Software to manuf ids + util/bmchealth.c - added Chassis Status + util/events.c - additional usage text for -p, fix -p timestamp uchar, + handle PET temp ok events + util/pefconfig.c - add -g (2nd Gateway IP), -k (add PEF OK rules) + util/getevent.c - fixes for getevent -s with -N + ipmiutil-2.0.5 contains: + ipmiutil.c (ipmiutil) ver 2.5 + alarms.c (ipmiutil alarms) ver 2.5 + bmchealth.c (ipmiutil health) ver 2.5 + fruconfig.c (ipmiutil fru) ver 1.43 + getevent.c (ipmiutil getevt) ver 2.5 + hwreset.c (ipmiutil reset) ver 2.5 + icmd.c (ipmiutil cmd) ver 1.31 + pefconfig.c (ipmiutil lan) ver 2.5 + sensor.c (ipmiutil sensor) ver 2.5 + showsel.c (ipmiutil sel) ver 1.59 + tmconfig.c (ipmiutil serial) ver 1.48 + wdt.c (ipmiutil wdt) ver 1.35 + isolconsole.c (ipmiutil sol) ver 2.5 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 1.0 + events.c (ievents) ver 2.5 + +01/21/08 ARCress ipmiutil-2.0.6 changes + util/ipmicmd.c - added lan2i driver type for -F param + util/ipmilanplus.c - show more oem_active debug + util/sensor.c - added -u for unique sensor threshold values, + always show float when setting thresholds, + fixup in decoding Proc,PS Comp readings + util/events.c - fixed 0f/06 POST Code interpretation (Min Zhang), + fixed 07 interpretation if not Processor Status. + util/ipmidir.c - more DBG messages + ipmiutil-2.0.6 contains: + ipmiutil.c (ipmiutil) ver 2.6 + alarms.c (ipmiutil alarms) ver 2.6 + bmchealth.c (ipmiutil health) ver 2.6 + fruconfig.c (ipmiutil fru) ver 1.44 + getevent.c (ipmiutil getevt) ver 2.6 + hwreset.c (ipmiutil reset) ver 2.6 + icmd.c (ipmiutil cmd) ver 1.32 + pefconfig.c (ipmiutil lan) ver 2.6 + sensor.c (ipmiutil sensor) ver 2.6 + showsel.c (ipmiutil sel) ver 1.60 + tmconfig.c (ipmiutil serial) ver 1.49 + wdt.c (ipmiutil wdt) ver 1.36 + isolconsole.c (ipmiutil sol) ver 2.6 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 1.0 + events.c (ievents) ver 2.6 + +02/01/08 ARCress ipmiutil-2.0.7 changes + util/sensor.c - allow float input for -u thresholds, + handle -p with -u, + fix CPU Thermal reading if evtype==3 + show updated volatile thresholds if -t,-v + doc/UserGuide - add section 1.1, update man pages + doc/sensor.8 - add -u float description + doc/ipmi_port.sh - also auto-restore any saved thresholds + ipmiutil-2.0.7 contains: + ipmiutil.c (ipmiutil) ver 2.7 + alarms.c (ipmiutil alarms) ver 2.7 + bmchealth.c (ipmiutil health) ver 2.7 + fruconfig.c (ipmiutil fru) ver 1.45 + getevent.c (ipmiutil getevt) ver 2.7 + hwreset.c (ipmiutil reset) ver 2.7 + icmd.c (ipmiutil cmd) ver 1.33 + pefconfig.c (ipmiutil lan) ver 2.7 + sensor.c (ipmiutil sensor) ver 2.7 + showsel.c (ipmiutil sel) ver 1.61 + tmconfig.c (ipmiutil serial) ver 1.50 + wdt.c (ipmiutil wdt) ver 1.37 + isolconsole.c (ipmiutil sol) ver 2.7 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 1.0 + events.c (ievents) ver 2.7 + +02/28/08 ARCress ipmiutil-2.0.8 changes + configure.in - add enable-standalone for boot media builds + util/showsel.c - make sure savid is unsigned for -w + util/fruconfig.c - WriteAsset size 128 -> 259 (Min Zhang) + util/imbapi.c - added skeleton DllMain() + util/showsel.c - add -r for raw hex bytes + doc/showsel.8 - add -r for raw hex bytes + lib/lanplus/lanplus_crypt_impl.c - debug for issue with d:\.rnd + ipmiutil-2.0.8 contains: + ipmiutil.c (ipmiutil) ver 2.8 + alarms.c (ipmiutil alarms) ver 2.8 + bmchealth.c (ipmiutil health) ver 2.8 + fruconfig.c (ipmiutil fru) ver 1.46 + getevent.c (ipmiutil getevt) ver 2.8 + hwreset.c (ipmiutil reset) ver 2.8 + icmd.c (ipmiutil cmd) ver 1.34 + pefconfig.c (ipmiutil lan) ver 2.8 + sensor.c (ipmiutil sensor) ver 2.8 + showsel.c (ipmiutil sel) ver 2.8 + tmconfig.c (ipmiutil serial) ver 1.51 + wdt.c (ipmiutil wdt) ver 1.38 + isolconsole.c (ipmiutil sol) ver 2.8 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 1.0 + events.c (ievents) ver 2.8 + +03/20/08 ARCress ipmiutil-2.0.9 changes + util/events.c - add -f to interpret raw SEL file, + handle OEM sens_type 0xF3 as SMI Timeout + util/sensor.c - interpret more type 0x0D HSC states + util/imbapi.c - fix for SendTimedLan(IpmiVersion) if IPMI 2.0 + util/getevent.c - more debug messages for -a (imb mode) + doc/events.8 - document -f option + doc/UserGuide - updated with new man pages + ipmiutil-2.0.9 contains: + ipmiutil.c (ipmiutil) ver 2.9 + alarms.c (ipmiutil alarms) ver 2.9 + bmchealth.c (ipmiutil health) ver 2.9 + fruconfig.c (ipmiutil fru) ver 1.47 + getevent.c (ipmiutil getevt) ver 2.9 + hwreset.c (ipmiutil reset) ver 2.9 + icmd.c (ipmiutil cmd) ver 1.35 + pefconfig.c (ipmiutil lan) ver 2.9 + sensor.c (ipmiutil sensor) ver 2.9 + showsel.c (ipmiutil sel) ver 2.9 + tmconfig.c (ipmiutil serial) ver 1.52 + wdt.c (ipmiutil wdt) ver 1.39 + isolconsole.c (ipmiutil sol) ver 2.9 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 1.0 + events.c (ievents) ver 2.9 + + +03/31/08 ARCress ipmiutil-2.1.0 changes + util/imbapi.c - decreased TIMEOUT + util/ipmiia.c - decreased TIMEOUT + util/pefconfig.c - warning if -I without -e + util/Makefile.am - only build ipmiutil, eliminate dups + doc/Makefile - copy scripts for dup utilities + doc/alarms doc/bmchealth doc/fruconfig - created scripts + doc/getevent doc/hwreset doc/icmd - created scripts + doc/isolconsole doc/pefconfig doc/sensor - created scripts + doc/showsel doc/tmconfig doc/wdt - created scripts + ipmiutil-2.1.0 contains: + ipmiutil.c (ipmiutil) ver 2.10 + alarms.c (ipmiutil alarms) ver 2.10 + bmchealth.c (ipmiutil health) ver 2.10 + fruconfig.c (ipmiutil fru) ver 2.10 + getevent.c (ipmiutil getevt) ver 2.10 + hwreset.c (ipmiutil reset) ver 2.10 + icmd.c (ipmiutil cmd) ver 2.10 + pefconfig.c (ipmiutil lan) ver 2.10 + sensor.c (ipmiutil sensor) ver 2.10 + showsel.c (ipmiutil sel) ver 2.10 + tmconfig.c (ipmiutil serial) ver 2.10 + wdt.c (ipmiutil wdt) ver 2.10 + isolconsole.c (ipmiutil sol) ver 2.10 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 1.0 + events.c (ievents) ver 2.10 + +04/25/08 ARCress ipmiutil-2.1.1 changes + util/*.c - add case 'J': for cipher suite option + doc/*.8 - add -J description to man pages + doc/UserGuide - update man pages in UserGuide + util/Makefile.am - subst gcc->$(CC) + util/alarms.c - if not TAM baseboard, skip no-alarm-panel msg + lib/lanplus/Makefile.am - subst gcc->$(CC) + lib/lanplus/lanplus.c - patch rsp len for dup output + lib/lanplus/lanplus.h - IMPI -> IPMI + lib/lanplus/helper.c - support fplog for printbuf if STATIC + lib/lanplus/inc/ipmitool/ipmi_intf.h - added transit_addr, devnum + lib/lanplus/Makefile.am - patch from tizianomueller for bug 1948890 + util/ipmilanplus.c - ditto + util/ipmi_port.c - ditto + util/Makefile.am - ditto + util/Makefile.am-all - ditto + util/ipmilanplus.c - set SOL data timeout=2 for early retry issue, + lprintf changes for logging + util/isolconsole.c - more dbglog msgs for Linux with -z, + fix lost SOL RX packet with keepalive + util/ipmicmd.c - fix showsel -w openlog bug 1951680 (checksel) + ipmiutil-2.1.1 contains: + ipmiutil.c (ipmiutil) ver 2.11 + alarms.c (ipmiutil alarms) ver 2.11 + bmchealth.c (ipmiutil health) ver 2.11 + fruconfig.c (ipmiutil fru) ver 2.11 + getevent.c (ipmiutil getevt) ver 2.11 + hwreset.c (ipmiutil reset) ver 2.11 + icmd.c (ipmiutil cmd) ver 2.11 + pefconfig.c (ipmiutil lan) ver 2.11 + sensor.c (ipmiutil sensor) ver 2.11 + showsel.c (ipmiutil sel) ver 2.11 + tmconfig.c (ipmiutil serial) ver 2.11 + wdt.c (ipmiutil wdt) ver 2.11 + isolconsole.c (ipmiutil sol) ver 2.11 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 1.0 + events.c (ievents) ver 2.11 + +06/24/08 ARCress ipmiutil-2.1.2 changes + util/ipmilanplus.c - change debug lprintfs fro LOG_WARN to LOG_INFO, + fix crash in sol lprintf if send_sol fails, + set rsp->len = 0 in sol routines if error. + util/isolwin.c - fix white-on-white chars for BIOS setup + util/events.c - fix message output for -r, -p + ipmiutil-2.1.2 contains: + ipmiutil.c (ipmiutil) ver 2.12 + alarms.c (ipmiutil alarms) ver 2.12 + bmchealth.c (ipmiutil health) ver 2.12 + fruconfig.c (ipmiutil fru) ver 2.12 + getevent.c (ipmiutil getevt) ver 2.12 + hwreset.c (ipmiutil reset) ver 2.12 + icmd.c (ipmiutil cmd) ver 2.12 + pefconfig.c (ipmiutil lan) ver 2.12 + sensor.c (ipmiutil sensor) ver 2.12 + showsel.c (ipmiutil sel) ver 2.12 + tmconfig.c (ipmiutil serial) ver 2.12 + wdt.c (ipmiutil wdt) ver 2.12 + isolconsole.c (ipmiutil sol) ver 2.12 + idiscover.c (ipmiutil discover) ver 1.2 + ipmi_port.c (ipmi_port) ver 1.0 + events.c (ievents) ver 2.12 + +07/31/08 ARCress ipmiutil-2.1.3 changes + util/isolwin.c - handle more esc sequences, add FG_WHITE_LO if mode=0 + util/isolconsole.c - handle receive packets from keepalive + util/ipmilanplus.c - check for receive packets in lan2_keepalive also + util/wdt.c - add -p for preaction, set pretime = time/2, + pass set/reset status to completion, + check reset if ret==0xc0(192) node busy + util/imbapi.c - add set_fps() for fpdbg if -Fimb + util/idiscover.c - add -r for repeat pings to each node + util/pefconfig.c - allow setting lan params remotely if using diff channel, + show SOL Payload Access for all 4 users, + show ':' before interpreted strings + util/tmconfig.c - show ':' before interpreted strings + util/bmchealth.c - added Bull, PigeonPt IANA numbers + util/sensor.c - allow -i to specify a range of sensors + util/ipmi_port.c - skip hello message if background + util/events.c - mystr[26] -> [50] for long ACPI messages + util/showsel.c - "SEL: :" -> "SEL:" with -w + util/ipmidir.c - check for invalid receive data length from BMC + util/ipmilan.c - ipmi_cmd_ipmb: increase get_message loop from 5 to 10ms, + check for receive buffer overflow (e.g. 180 bytes) + util/icmd.c - allow receive size up to 200 bytes + lib/lanplus/asf.h - __attribute__((packed)); -> #pragma pack(1) for gcc 4.3 + lib/lanplus/rmcp.h - __attribute__((packed)); -> #pragma pack(1) + doc/bmclanpet.mib - fix mib compile issues on line 52 and 87 + doc/wdt.8 - add -p for preaction + doc/sensor.8 - add -i and -L descriptions + doc/checksel - bash -> sh for bug 2032210 + doc/ipmi_port.sh - bash -> sh, patch from Paul D Smith + doc/wdt.sh - bash -> sh + doc/UserGuide - updated man page text + hpiutil/hpiinit.sh - bash -> sh + ipmiutil-2.1.3 contains: + ipmiutil.c (ipmiutil) ver 2.13 + alarms.c (ipmiutil alarms) ver 2.13 + bmchealth.c (ipmiutil health) ver 2.13 + fruconfig.c (ipmiutil fru) ver 2.13 + getevent.c (ipmiutil getevt) ver 2.13 + hwreset.c (ipmiutil reset) ver 2.13 + icmd.c (ipmiutil cmd) ver 2.13 + pefconfig.c (ipmiutil lan) ver 2.13 + sensor.c (ipmiutil sensor) ver 2.13 + showsel.c (ipmiutil sel) ver 2.13 + tmconfig.c (ipmiutil serial) ver 2.13 + wdt.c (ipmiutil wdt) ver 2.13 + isolconsole.c (ipmiutil sol) ver 2.13 + idiscover.c (ipmiutil discover) ver 1.3 + ipmi_port.c (ipmi_port) ver 1.1 + events.c (ievents) ver 2.13 + +08/25/08 ARCress ipmiutil-2.2.0 changes + util/icmd.c - add -q for quiet mode + util/isolwin.c - add translation for graphic arrow keys, + add more set attrib esc sequences + util/pefconfig.c - add -o to just disable SOL, + add -v for access priv (admin/oper/user), + added case for NSN2U + util/tmconfig.c - add -e for TMode without console, + add -v for access priv (admin/oper/user) + util/getevent.c - call iclose() before any exit(); + util/hwreset.c - do ipmi_close_ if soft-reset + util/ipmilan.c - add ALLOW_GPL flag for MD2OK + util/ipmilan2.c - add ALLOW_GPL flag for MD2OK + util/ipmiva.c - moved _va routines to ipmiva.h, only stubs here, + add ALLOW_GPL flag for VAOK + util/ipmiva.h - new, contains _va routines + util/md2.c - moved md2 routines from here to md2.h + util/md2.h - new, contains md2 routines + util/mem_if.c - new, to get_BiosVersion + util/bmcconfig.c - new, to save/restore bmc configuration + util/bmchealth.c - added case for NSN2U + util/events.c - added fan redundancy interpretation + util/sensor.c - added cases for other discrete temp sensors, + handle full sensor readings in init state. + util/Makefile.am - added mem_if, bmcconfig, + fixed libipmiutil.a build + configure.in - add --enable-gpl/ALLOW_GPL (default=no) + INSTALL - document configure option changes + doc/bmclanpet.mib - PetEvts->petevts for some mib compilers, Trap->trap + doc/bmcconfig.8 - new + ipmiutil-2.2.0 contains: + ipmiutil.c (ipmiutil) ver 2.20 + alarms.c (ipmiutil alarms) ver 2.20 + bmchealth.c (ipmiutil health) ver 2.20 + fruconfig.c (ipmiutil fru) ver 2.20 + getevent.c (ipmiutil getevt) ver 2.20 + hwreset.c (ipmiutil reset) ver 2.20 + icmd.c (ipmiutil cmd) ver 2.20 + pefconfig.c (ipmiutil lan) ver 2.20 + sensor.c (ipmiutil sensor) ver 2.20 + showsel.c (ipmiutil sel) ver 2.20 + tmconfig.c (ipmiutil serial) ver 2.20 + wdt.c (ipmiutil wdt) ver 2.20 + isolconsole.c (ipmiutil sol) ver 2.20 + bmcconfig.c (ipmiutil config) ver 1.0 + idiscover.c (ipmiutil discover) ver 1.3 + ipmi_port.c (ipmi_port) ver 1.1 + events.c (ievents) ver 2.20 + +09/15/08 ARCress ipmiutil-2.2.1 changes + doc/ipmi_if.sh - reuse dmidecode output rather than repeat calls + util/ipmilanplus.c - for no LANPLUS, still need 2 global vars + util/ipmiutil.mak - added VCLIB_ADD, VCINCL_ADD, + added LIBS_W, mem_if.exe, ipmims.obj + util/mem_if.c - added smbios code for WIN32 + util/getevent.c - continue even if set_bmc_enables fails, + add code for openipmi async cmds (remote soft reset). + util/events.c - added more type 1D & 20 decoding from IPMI 2.0 E3 spec, + if fPET, do not show reading on sensor line. + util/ipmimv.c - add setmaint_mv() routine, add register routines, + mods to getevent_mv for other recv_types + util/sensor.c - added EvLog(0x10) sensor type decoding, + Show EventType for Full & Comp SDRs (instead of Sz). + util/ipmims.c - new, for MS IPMI driver support + util/isolwin.c - detect BIOS Setup via background for CR handling, + only set fg intensity instead of fg/bg for mode 1, + move arrow/function key handling to console_in + util/isolconsole.c - move arrow/function key handling to console_in + util/wdt.c - change pretimeout from half to 90% of timeout + util/alarms.c - enhanced BMC TAM detection + util/Makefile.am - fix lib if condition for no lanplus, + add strip to install, added ipmims.o + doc/icmd.8 - added -q description + doc/pefconfig.8 - added -o -v descriptions + doc/tmconfig.8 - added -e -v descriptions + doc/sensor.8 - added output columns explanation + doc/wdt.8 - change pretimeout from half to 90% of timeout + doc/UserGuide - updated man pages, added sample output section, + documented MS IPMI driver support + lib/lanplus/ipmiplus.mak - added VCLIB_ADD, VCINCL_ADD + buildwin.cmd - added more comments about VS8, added VC*_ADD + ipmiutil-2.2.1 contains: + ipmiutil.c (ipmiutil) ver 2.21 + alarms.c (ipmiutil alarms) ver 2.21 + bmchealth.c (ipmiutil health) ver 2.21 + fruconfig.c (ipmiutil fru) ver 2.21 + getevent.c (ipmiutil getevt) ver 2.21 + hwreset.c (ipmiutil reset) ver 2.21 + icmd.c (ipmiutil cmd) ver 2.21 + pefconfig.c (ipmiutil lan) ver 2.21 + sensor.c (ipmiutil sensor) ver 2.21 + showsel.c (ipmiutil sel) ver 2.21 + tmconfig.c (ipmiutil serial) ver 2.21 + wdt.c (ipmiutil wdt) ver 2.21 + isolconsole.c (ipmiutil sol) ver 2.21 + bmcconfig.c (ipmiutil config) ver 1.1 + idiscover.c (ipmiutil discover) ver 1.3 + ipmi_port.c (ipmi_port) ver 1.1 + events.c (ievents) ver 2.21 + +09/19/08 ARCress ipmiutil-2.2.2 changes + util/pefconfig.c - readonly warning if options but no -e, + set BMC IP to 0.0.0.0 if -d, + fix bug with trap2sink parsing, + if mac unresolved, show warning, but dont set it + util/isolconsole.c - add -i -o options + doc/isolconsole.8 - describe -i -o options + doc/UserGuide - updated isolconsole man page + ipmiutil-2.2.2 contains: + ipmiutil.c (ipmiutil) ver 2.22 + alarms.c (ipmiutil alarms) ver 2.22 + bmchealth.c (ipmiutil health) ver 2.22 + fruconfig.c (ipmiutil fru) ver 2.22 + getevent.c (ipmiutil getevt) ver 2.22 + hwreset.c (ipmiutil reset) ver 2.22 + icmd.c (ipmiutil cmd) ver 2.22 + pefconfig.c (ipmiutil lan) ver 2.22 + sensor.c (ipmiutil sensor) ver 2.22 + showsel.c (ipmiutil sel) ver 2.22 + tmconfig.c (ipmiutil serial) ver 2.22 + wdt.c (ipmiutil wdt) ver 2.22 + isolconsole.c (ipmiutil sol) ver 2.22 + bmcconfig.c (ipmiutil config) ver 1.2 + idiscover.c (ipmiutil discover) ver 1.3 + ipmi_port.c (ipmi_port) ver 1.1 + events.c (ievents) ver 2.22 + +10/06/08 ARCress ipmiutil-2.2.3 changes + util/isolconsole.c - fix abort on Linux F10 + util/bmchealth.c - use chan 1 for auth if NSN2U + util/mem_if.c - cosmetic reuse mods + util/showsel.c - get Windows ipmiutildir path if -w + util/events.c - fix decoding for OEM events betw c0 & e0 + doc/bmclanpet.mib - add PowerUnitRedundancy PET OIDs + doc/UserGuide - updates to Intro sections + doc/showsel.reg - added scheduler time for checksel.cmd + doc/install.cmd - new, install script for Windows + doc/checksel.cmd - new, checksel at script for Windows + INSTALL - updated info about --enable-gpl + README - updated info about --enable-gpl + ipmiutil-2.2.3 contains: + ipmiutil.c (ipmiutil) ver 2.23 + alarms.c (ipmiutil alarms) ver 2.23 + bmchealth.c (ipmiutil health) ver 2.23 + fruconfig.c (ipmiutil fru) ver 2.23 + getevent.c (ipmiutil getevt) ver 2.23 + hwreset.c (ipmiutil reset) ver 2.23 + icmd.c (ipmiutil cmd) ver 2.23 + pefconfig.c (ipmiutil lan) ver 2.23 + sensor.c (ipmiutil sensor) ver 2.23 + showsel.c (ipmiutil sel) ver 2.23 + tmconfig.c (ipmiutil serial) ver 2.23 + wdt.c (ipmiutil wdt) ver 2.23 + isolconsole.c (ipmiutil sol) ver 2.23 + bmcconfig.c (ipmiutil config) ver 1.3 + idiscover.c (ipmiutil discover) ver 1.3 + ipmi_port.c (ipmi_port) ver 1.1 + events.c (ievents) ver 2.23 + +10/27/08 ARCress ipmiutil-2.2.4 changes + util/fruconfig.c - fixed segfault with -a due to early free_fru + this bug was introduced in 2.2.1, worked before. + also fixed write_asset if multi-record area present. + doc/UserGuide - added page breaks (FormFeeds) for printing + ipmiutil-2.2.4 contains: + ipmiutil.c (ipmiutil) ver 2.24 + alarms.c (ipmiutil alarms) ver 2.24 + bmchealth.c (ipmiutil health) ver 2.24 + fruconfig.c (ipmiutil fru) ver 2.24 + getevent.c (ipmiutil getevt) ver 2.24 + hwreset.c (ipmiutil reset) ver 2.24 + icmd.c (ipmiutil cmd) ver 2.24 + pefconfig.c (ipmiutil lan) ver 2.24 + sensor.c (ipmiutil sensor) ver 2.24 + showsel.c (ipmiutil sel) ver 2.24 + tmconfig.c (ipmiutil serial) ver 2.24 + wdt.c (ipmiutil wdt) ver 2.24 + isolconsole.c (ipmiutil sol) ver 2.24 + bmcconfig.c (ipmiutil config) ver 2.24 + idiscover.c (ipmiutil discover) ver 1.3 + ipmi_port.c (ipmi_port) ver 1.1 + events.c (ievents) ver 2.24 + +11/14/08 ARCress ipmiutil-2.3.0 changes + util/sensor.c - handle minutes-per-count for FSC POH + util/events.c - decode Fan Absent event (trg=88 d1=01) + util/md2.c - add md2 from libcrypto if HAVE_LANPLUS + util/ipmilan.c - set MD2OK if HAVE_LANPLUS + util/bmchealth.c - get_chassis_status error message change, + use common error return point + util/ipmicmd.h - move ACCESS_OK out of ifdef, add DRV_BMC + util/ipmidir.c - use meaningful return codes + INSTALL - added Solaris notes + configure.in - added Solaris/SunOS changes + lib/lanplus/lanplus.c - add SOLARIS ifdefs + util/Makefile.am - added Solaris changes + util/ipmibmc.c - new, for Solaris 10 bmc driver + util/bmcconfig.c - add SOLARIS ifdefs + util/getevent.c - add SOLARIS ifdefs + util/idiscover.c - add SOLARIS ifdefs + util/ipmicmd.c - add SOLARIS ifdefs + util/ipmilan2.c - add SOLARIS ifdefs + util/ipmilan.c - add SOLARIS ifdefs + util/ipmilanplus.c - add SOLARIS ifdefs + util/mem_if.c - add SOLARIS ifdefs + util/pefconfig.c - add SOLARIS ifdefs + util/imbapi.c - add ifndef SOLARIS for safety + util/ipmi*.c - add ifdef LINUX for safety + ipmiutil-2.3.0 contains: + ipmiutil.c (ipmiutil) ver 2.30 + alarms.c (ipmiutil alarms) ver 2.30 + bmchealth.c (ipmiutil health) ver 2.30 + fruconfig.c (ipmiutil fru) ver 2.30 + getevent.c (ipmiutil getevt) ver 2.30 + hwreset.c (ipmiutil reset) ver 2.30 + icmd.c (ipmiutil cmd) ver 2.30 + pefconfig.c (ipmiutil lan) ver 2.30 + sensor.c (ipmiutil sensor) ver 2.30 + showsel.c (ipmiutil sel) ver 2.30 + tmconfig.c (ipmiutil serial) ver 2.30 + wdt.c (ipmiutil wdt) ver 2.30 + isolconsole.c (ipmiutil sol) ver 2.30 + bmcconfig.c (ipmiutil config) ver 2.30 + idiscover.c (ipmiutil discover) ver 1.4 + ipmi_port.c (ipmi_port) ver 1.1 + events.c (ievents) ver 2.30 + +12/02/08 ARCress ipmiutil-2.3.1 changes + util/bmchealth.c - add ClearBay id, move to get_mfg_str() + util/events.c - add -h hex option, NM event decoding + util/sensor.c - add -g for sensor type groups, + change -h/-l to set noncrit first, then crit,nonrec, + add etype 03 to Discrete Thermal sensor decoding + util/pefconfig.c - skip error message if setting BMC MAC not allowed + util/bmcconfig.c - set ndest again from Serial param 16 + util/idiscover.c - init fpdbg if METACOMMAND and -x (#2339334), + find first enabled eth interface, + use eth intf ip for broadcast by default, + check if broadcast ip is invalid, + show progress if not broadcast. + util/ipmicmd.c - check fpdbg in dump_buf() + util/imbapi.c - added more fdebug messages for Emp/Lan + util/isolwin.c - handle screen mode escape sequences + util/getevent.c - add error message if wrong async cmd, + handle shorter async format from some BMCs. + doc/ipmiutil.spec - copy wdt.sh, asy.sh to /etc/init.d + doc/Makefile - add asy.sh to install + doc/idiscover.8 - document detection changes + doc/getevent.8 - document asy.sh (ipmiutil_asy) + doc/wdt.8 - edit info about wdt.sh (ipmiutil_wdt) + doc/events.8 - document -h option + doc/sensor.8 - document -g option + doc/bmcconfig.8 - added info about editing UserPassword records + doc/UserGuide - man page updates + doc/asy.sh - new, init script for getevt -a + cleanwin.cmd - new, clean windows binaries + buildwin2.cmd - new, alt build for standalone/bootable wo lanplus + util/ipmiutil2.mak - new, alt build for standalone/bootable wo lanplus + ipmiutil-2.3.1 contains: + ipmiutil.c (ipmiutil) ver 2.31 + alarms.c (ipmiutil alarms) ver 2.31 + bmchealth.c (ipmiutil health) ver 2.31 + fruconfig.c (ipmiutil fru) ver 2.31 + getevent.c (ipmiutil getevt) ver 2.31 + hwreset.c (ipmiutil reset) ver 2.31 + icmd.c (ipmiutil cmd) ver 2.31 + pefconfig.c (ipmiutil lan) ver 2.31 + sensor.c (ipmiutil sensor) ver 2.31 + showsel.c (ipmiutil sel) ver 2.31 + tmconfig.c (ipmiutil serial) ver 2.31 + wdt.c (ipmiutil wdt) ver 2.31 + isolconsole.c (ipmiutil sol) ver 2.31 + bmcconfig.c (ipmiutil config) ver 2.31 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + events.c (ievents) ver 2.31 + +12/08/08 ARCress ipmiutil-2.3.2 changes + util/bmchealth.c - add Tyan product id logic, + add last selftest status if error, + show IPMI driver type + util/pefconfig.c - debug messages for -t, + better warning for no -e option + util/sensor.c - fix for setting thresholds if sens_num matches + on more than one slave_addr (TAO 2125) + util/Makefile.am - add $(extradir) + doc/ipmiutil.spec - mods for Fedora compliance + doc/ipmi_if.sh - add #!/bin/sh + doc/ipmi_port.sh - add $progdir + lib/lanplus/lanplus.c - patch to ipmi_req_remove_entry() + ipmiutil-2.3.2 contains: + ipmiutil.c (ipmiutil) ver 2.32 + alarms.c (ipmiutil alarms) ver 2.32 + bmchealth.c (ipmiutil health) ver 2.32 + fruconfig.c (ipmiutil fru) ver 2.32 + getevent.c (ipmiutil getevt) ver 2.32 + hwreset.c (ipmiutil reset) ver 2.32 + icmd.c (ipmiutil cmd) ver 2.32 + pefconfig.c (ipmiutil lan) ver 2.32 + sensor.c (ipmiutil sensor) ver 2.32 + showsel.c (ipmiutil sel) ver 2.32 + tmconfig.c (ipmiutil serial) ver 2.32 + wdt.c (ipmiutil wdt) ver 2.32 + isolconsole.c (ipmiutil sol) ver 2.32 + bmcconfig.c (ipmiutil config) ver 2.32 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + events.c (ievents) ver 2.32 + +01/09/09 ARCress ipmiutil-2.3.3 changes + util/pefconfig.c - add Voltage Ok PEF rule to -k, swap PEF7/8 descriptions + util/events.c - add voltage ok decoding to -p + doc/ipmiutil.spec - fix broken %_mandir with MV4 + ipmiutil-2.3.3 contains: + ipmiutil.c (ipmiutil) ver 2.33 + alarms.c (ipmiutil alarms) ver 2.33 + bmchealth.c (ipmiutil health) ver 2.33 + fruconfig.c (ipmiutil fru) ver 2.33 + getevent.c (ipmiutil getevt) ver 2.33 + hwreset.c (ipmiutil reset) ver 2.33 + icmd.c (ipmiutil cmd) ver 2.33 + pefconfig.c (ipmiutil lan) ver 2.33 + sensor.c (ipmiutil sensor) ver 2.33 + showsel.c (ipmiutil sel) ver 2.33 + tmconfig.c (ipmiutil serial) ver 2.33 + wdt.c (ipmiutil wdt) ver 2.33 + isolconsole.c (ipmiutil sol) ver 2.33 + bmcconfig.c (ipmiutil config) ver 2.33 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + events.c (ievents) ver 2.33 + +02/25/09 ARCress ipmiutil-2.3.4 changes + configure.in - For SunOS substitution, add space after -lnsl + INSTALL - Solaris idiscover note + util/idiscover.c - fix Solaris e1000g? loop + util/bmchealth.c - comment about Power State 2a (unknown) + util/pefconfig.c - fix FindEthNum, GetIPMac for Solaris, + show max_users, enabled_users + util/tmconfig.c - show max_users, enabled_users + util/bmcconfig.c - set nusers = max_users + COPYING - added Copyright 2009 Kontron + util/*.c,*.h - added Copyright 2009 Kontron + doc/*.8 - added Copyright 2009 Kontron + lib/lanplus/helper.c - printbuf to stdout (was stderr) + lib/lanplus/lanplus.c - add bridging patches from Mirko Klefker + util/ipmilanplus.c - bridging patch + util/ipmicmd.c - bridging patch to ipmi_cmd_mc + util/ipmilan.c - by default, dont send ping, + handle bridged requests for non-BMC addrs + util/sensor.c - enable lan bridging for HSC sensor readings + util/alarms.c - enable lan bridging for HSC disk LEDs + util/ipmiutil.c - add events as a subcommand + util/ipmiutil.h - add i_events as a subroutine + util/bmchealth.c - more debug for get_last_selftest + util/events.c - handle PET threshold trap end cases, + handle discrete temp events, + handle i_events from ipmiutil metacommand + doc/events.8 - add -r (same as -h) with example + doc/UserGuide - added 4.10 How to configure IPMI PET SNMP + doc/alarms.cmd - new, invoke ipmiutil.exe instead + doc/bmcconfig.cmd - new, invoke ipmiutil.exe instead + doc/bmchealth.cmd - new, invoke ipmiutil.exe instead + doc/fruconfig.cmd - new, invoke ipmiutil.exe instead + doc/getevent.cmd - new, invoke ipmiutil.exe instead + doc/hwreset.cmd - new, invoke ipmiutil.exe instead + doc/icmd.cmd - new, invoke ipmiutil.exe instead + doc/idiscover.cmd - new, invoke ipmiutil.exe instead + doc/isolconsole.cmd - new, invoke ipmiutil.exe instead + doc/pefconfig.cmd - new, invoke ipmiutil.exe instead + doc/sensor.cmd - new, invoke ipmiutil.exe instead + doc/showsel.cmd - new, invoke ipmiutil.exe instead + doc/tmconfig.cmd - new, invoke ipmiutil.exe instead + doc/wdt.cmd - new, invoke ipmiutil.exe instead + ipmiutil-2.3.4 contains: + ipmiutil.c (ipmiutil) ver 2.34 + alarms.c (ipmiutil alarms) ver 2.34 + bmchealth.c (ipmiutil health) ver 2.34 + fruconfig.c (ipmiutil fru) ver 2.34 + getevent.c (ipmiutil getevt) ver 2.34 + hwreset.c (ipmiutil reset) ver 2.34 + icmd.c (ipmiutil cmd) ver 2.34 + pefconfig.c (ipmiutil lan) ver 2.34 + sensor.c (ipmiutil sensor) ver 2.34 + showsel.c (ipmiutil sel) ver 2.34 + tmconfig.c (ipmiutil serial) ver 2.34 + wdt.c (ipmiutil wdt) ver 2.34 + isolconsole.c (ipmiutil sol) ver 2.34 + bmcconfig.c (ipmiutil config) ver 2.34 + events.c (ipmiutil events) ver 2.34 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +03/30/09 ARCress ipmiutil-2.3.5 changes + util/bmchealth.c - add GetPowerOnHours, skip get_power_state if HP. + util/sensor.c - rename GetPowerOnHours as ShowPowerOnHours + util/ipmilan.c - some fixes for SOL 1.5 data + util/pefconfig.c - clear gateway IP/MAC when fdisable with -d + util/events.c - decode EFI System Events too + configure.in - FreeBSD mods + lib/Makefile - FreeBSD mods + lib/lanplus/Makefile.am - FreeBSD mods + util/bmcconfig.c - FreeBSD mods + util/getevent.c - FreeBSD mods + util/imbapi.c - FreeBSD mods + util/ipmicmd.c - FreeBSD mods + util/mem_if.c - FreeBSD mods, detect IPMI register spacing via SMBIOS + util/pefconfig.c - FreeBSD mods, tested on FreeBSD 7.1 + util/ipmidir.c - FreeBSD mods, fixed SMBIOS overwriting ipmi_if.txt, + add register spacing from SMBIOS, + fix SMBChar to init SSIF correctly. + ipmiutil-2.3.5 contains: + ipmiutil.c (ipmiutil) ver 2.35 + alarms.c (ipmiutil alarms) ver 2.35 + bmchealth.c (ipmiutil health) ver 2.35 + fruconfig.c (ipmiutil fru) ver 2.35 + getevent.c (ipmiutil getevt) ver 2.35 + hwreset.c (ipmiutil reset) ver 2.35 + icmd.c (ipmiutil cmd) ver 2.35 + pefconfig.c (ipmiutil lan) ver 2.35 + sensor.c (ipmiutil sensor) ver 2.35 + showsel.c (ipmiutil sel) ver 2.35 + tmconfig.c (ipmiutil serial) ver 2.35 + wdt.c (ipmiutil wdt) ver 2.35 + isolconsole.c (ipmiutil sol) ver 2.35 + bmcconfig.c (ipmiutil config) ver 2.35 + events.c (ipmiutil events) ver 2.35 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +04/09/09 ARCress ipmiutil-2.3.6 changes + doc/UserGuide - Note that Legacy OS Redir is optional for SOL, + and ipmiutil serial is not required for SOL. + doc/bmchealth.8 - document -g and -s options + util/bmchealth.c - add -s option to get_lan_stats, + fixed WIN32 stack overflow in get_last_selftest() + util/pefconfig.c - change -z to use get_lan_stats, + recognize 115200 variant as well as 115.2k for -B + util/tmconfig.c - recognize 115200 variant as well as 115.2k for -B + util/ipmicmd.c - include ipmimv for BSD + util/ipmimv.c - include ipmimv for BSD, still some compatibility issues + ipmiutil-2.3.6 contains: + ipmiutil.c (ipmiutil) ver 2.36 + alarms.c (ipmiutil alarms) ver 2.36 + bmchealth.c (ipmiutil health) ver 2.36 + fruconfig.c (ipmiutil fru) ver 2.36 + getevent.c (ipmiutil getevt) ver 2.36 + hwreset.c (ipmiutil reset) ver 2.36 + icmd.c (ipmiutil cmd) ver 2.36 + pefconfig.c (ipmiutil lan) ver 2.36 + sensor.c (ipmiutil sensor) ver 2.36 + showsel.c (ipmiutil sel) ver 2.36 + tmconfig.c (ipmiutil serial) ver 2.36 + wdt.c (ipmiutil wdt) ver 2.36 + isolconsole.c (ipmiutil sol) ver 2.36 + bmcconfig.c (ipmiutil config) ver 2.36 + events.c (ipmiutil events) ver 2.36 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +05/08/09 ARCress ipmiutil-2.3.7 changes + doc/ipmiutil.spec - fixed an rpmlint warning + doc/showsel.cmd - fixed syntax error (showsel->sel) + util/ipmiutil.mak - clean *.res/.rc/.bin files from showsel.dll + util/sensor.c - add ChassisIntrus msg under Physical Security + util/showsel.c - fixed -l if only one SEL record. + util/ipmidir.c - always return error if wait_for_OBF_set timeout, + or if wait_for_IBF_clear timeout + util/*.c - added DOS compile flags + util/ipmilanplus.c - log the correct rq_seq value in sol_send, + set the rq_seq to sol_seq in sol_send, + added lan2_recv_handler to fix bug #2787484 + util/isolconsole.c - get all socket data before any stdin data, + use lan2_recv_handler in set_sol_data, + detect dropped session sooner, and + use LAN_ERR_DROPPED for bug #2789103 + util/ipmicmd.h - add LAN_ERR_DROPPED + util/ipmilan.c - add LAN_ERR_DROPPED to decode_rv() + doc/install.cmd - copy to Program Files, set PATH, etc. + doc/uninstall.cmd - new + doc/showselun.reg - new + ipmiutil-2.3.7 contains: + ipmiutil.c (ipmiutil) ver 2.37 + alarms.c (ipmiutil alarms) ver 2.37 + bmchealth.c (ipmiutil health) ver 2.37 + fruconfig.c (ipmiutil fru) ver 2.37 + getevent.c (ipmiutil getevt) ver 2.37 + hwreset.c (ipmiutil reset) ver 2.37 + icmd.c (ipmiutil cmd) ver 2.37 + pefconfig.c (ipmiutil lan) ver 2.37 + sensor.c (ipmiutil sensor) ver 2.37 + showsel.c (ipmiutil sel) ver 2.37 + tmconfig.c (ipmiutil serial) ver 2.37 + wdt.c (ipmiutil wdt) ver 2.37 + isolconsole.c (ipmiutil sol) ver 2.37 + bmcconfig.c (ipmiutil config) ver 2.37 + events.c (ipmiutil events) ver 2.37 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +06/01/09 ARCress ipmiutil-2.3.8 changes + util/events.c - moved decode logic to decode_raw_sel() + util/showsel.c - added -b/-f options calling decode_raw_sel() + util/ipmiutil.mak - do not delete crypto DLLs during clean + util/isolconsole.c - do not abort if keepalive error + ,(reverts 2.3.7 change that could abort during reboot), + handle extra '\n' in WIN32 dbglog, + add -v option to specify debug log filename + util/pefconfig.c - overwrite GCM MAC if specified, + dont arping for gwymac if gcm_ch and not same subnet. + util/sensor.c - add ':' delimiter to -s output + util/ipmidir.c - check for rlen==0 from ssif and return, fixed SegFault. + util/getevent.c - update comments for -a option + util/ipmi_sample.c - new, sample app + util/Makefile.am - add ipmi_sample app build + util/ipmiutil.mak - add ipmiutil.lib,ipmi_sample app build + doc/events.8 - changes to -b/-r/-f/-h descriptions + doc/showsel.8 - added -b/-f options + doc/uninstall.cmd - automated cleanup of PATH and at jobs + configure.in - detect rpm PKG_DIR if Linux + Makefile.am - use PKG_DIR + ipmiutil-2.3.8 contains: + ipmiutil.c (ipmiutil) ver 2.38 + alarms.c (ipmiutil alarms) ver 2.38 + bmchealth.c (ipmiutil health) ver 2.38 + fruconfig.c (ipmiutil fru) ver 2.38 + getevent.c (ipmiutil getevt) ver 2.38 + hwreset.c (ipmiutil reset) ver 2.38 + icmd.c (ipmiutil cmd) ver 2.38 + pefconfig.c (ipmiutil lan) ver 2.38 + sensor.c (ipmiutil sensor) ver 2.38 + showsel.c (ipmiutil sel) ver 2.38 + tmconfig.c (ipmiutil serial) ver 2.38 + wdt.c (ipmiutil wdt) ver 2.38 + isolconsole.c (ipmiutil sol) ver 2.38 + bmcconfig.c (ipmiutil config) ver 2.38 + events.c (ipmiutil events) ver 2.38 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +06/05/09 ARCress ipmiutil-2.3.9 changes + util/bmcconfig.c - save LAN1 and LAN3 if present, include chan for each, + fix ser_ch defaults if -L, fnotshared->fsharedMAC + util/pefconfig.c - fix ser_ch defaults if -L, fnotshared->fsharedMAC + util/isolconsole.c - allow 0.5 sec after close for BMC teardown. + util/events.c - interpret IERR deasserts correctly + util/sensor.c - check for type 0x21 DIMM slot fault bit + util/hwreset.c - do not reset by default, show usage if no options + doc/hwreset.8 - default is no longer hard reset + ipmiutil-2.3.9 contains: + ipmiutil.c (ipmiutil) ver 2.39 + alarms.c (ipmiutil alarms) ver 2.39 + bmchealth.c (ipmiutil health) ver 2.39 + fruconfig.c (ipmiutil fru) ver 2.39 + getevent.c (ipmiutil getevt) ver 2.39 + hwreset.c (ipmiutil reset) ver 2.39 + icmd.c (ipmiutil cmd) ver 2.39 + pefconfig.c (ipmiutil lan) ver 2.39 + sensor.c (ipmiutil sensor) ver 2.39 + showsel.c (ipmiutil sel) ver 2.39 + tmconfig.c (ipmiutil serial) ver 2.39 + wdt.c (ipmiutil wdt) ver 2.39 + isolconsole.c (ipmiutil sol) ver 2.39 + bmcconfig.c (ipmiutil config) ver 2.39 + events.c (ipmiutil events) ver 2.39 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +06/25/09 ARCress ipmiutil-2.4.0 changes + lib/lanplus/lanplus.c - removed 2 asserts, handle better + util/ipmilanplus.c - added more stubs ifndef HAVE_LANPLUS + util/mem_if.c - skip error msg if Solaris + util/showsel.c - generalize syslog code, fix SEL info vtotal(short->int) + util/getevent.c - use syslog code to log -a shutdown/reboot + util/tmconfig.c - if transient MUX error, still success + handle 9.6K string properly + util/pefconfig.c - handle 9.6K string properly, + disallow setting params if -N and another session active + util/bmcconfig.c - disallow setting params if -N and another session active + util/sensor.c - for -s, simplify to show only full/compact sensors + util/bmchealth.c - added WinBond, Inventec to vendor strings + doc/ipmiutil.spec - create $tmpdir instead of %{_tmppath} in %post*, + change events->ievents + install init/cron scripts via %files instead of %post + doc/install-solaris.sh - change events to ievents + doc/Makefile - change events to ievents, detect initto dir + doc/events.8 -> doc/ievents.8 + util/events.c -> util/ievents.c + util/ievents.c - change progname from events to ievents, + also decode HSC thresh events with act=/thr= + ipmiutil-2.4.0 contains: + ipmiutil.c (ipmiutil) ver 2.40 + alarms.c (ipmiutil alarms) ver 2.40 + bmchealth.c (ipmiutil health) ver 2.40 + fruconfig.c (ipmiutil fru) ver 2.40 + getevent.c (ipmiutil getevt) ver 2.40 + hwreset.c (ipmiutil reset) ver 2.40 + icmd.c (ipmiutil cmd) ver 2.40 + pefconfig.c (ipmiutil lan) ver 2.40 + sensor.c (ipmiutil sensor) ver 2.40 + showsel.c (ipmiutil sel) ver 2.40 + tmconfig.c (ipmiutil serial) ver 2.40 + wdt.c (ipmiutil wdt) ver 2.40 + isolconsole.c (ipmiutil sol) ver 2.40 + bmcconfig.c (ipmiutil config) ver 2.40 + ievents.c (ipmiutil events) ver 2.40 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +08/10/09 ARCress ipmiutil-2.4.1 changes + util/showsel.c - define write_syslog routine here, + return error if ClearSEL fails. + util/getevent.c - move write_syslog routine out, + fix index from evt.idx after SEL gets cleared (0xCD), + show sensor description if IPMI event. + util/hwreset.c - call write_syslog if reset action is initiated + util/pefconfig.c - show OS IP/MAC used for arp if debug, + add -c option for canonical output + util/isolconsole.c - allow 2nd retry pass if sol_send error with -t2, + limit sol_send size to MAX_BMC_DATA(203), + set max debug for -xx, like -z. + fix truncate bug in dbglog(). + lib/lanplus/lanplus.c - if debug, show try of sol_packet, show session_seq + util/ievents.c - add Power Cycle ok event description, + show sensor description if IPMI event. + util/sensor.c - num->snum for -s/-c canonical output + util/ipmilan.c - add hash_special code for SuperMicro, + fix _send_lan_cmd() for bug 2827802 with auth=none + util/ipmicmd.c - add 'supermicro' as a driver type for -F + util/imbapi.c - use MAX_IMB_RESP_SIZE instead of MAX_RBUFFER_SIZE(64) + util/imb_api.h - MAX_IMB_PACKET_SIZE was 33, now 63 + util/ipmidir.c - if detect I/F as KCS and get error, do not try SSIF, + increase MAX_KCS_LOOP from 5000 to 7000 for Ht + doc/ipmi_port.sh - fixed to point to /usr/sbin/ipmi_port now + ipmiutil-2.4.1 contains: + ipmiutil.c (ipmiutil) ver 2.41 + alarms.c (ipmiutil alarms) ver 2.41 + bmchealth.c (ipmiutil health) ver 2.41 + fruconfig.c (ipmiutil fru) ver 2.41 + getevent.c (ipmiutil getevt) ver 2.41 + hwreset.c (ipmiutil reset) ver 2.41 + icmd.c (ipmiutil cmd) ver 2.41 + pefconfig.c (ipmiutil lan) ver 2.41 + sensor.c (ipmiutil sensor) ver 2.41 + showsel.c (ipmiutil sel) ver 2.41 + tmconfig.c (ipmiutil serial) ver 2.41 + wdt.c (ipmiutil wdt) ver 2.41 + isolconsole.c (ipmiutil sol) ver 2.41 + bmcconfig.c (ipmiutil config) ver 2.41 + ievents.c (ipmiutil events) ver 2.41 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +09/02/09 ARCress ipmiutil-2.4.2 changes + lib/lanplus/lanplus.c - if -x, show session_id, added check_sol debug, + added lanplus_set_recvdelay() for slow networks + util/pefconfig.c - Windows: always check for -I before setting IP, + to fix bug 2836451. + util/imbapi.c - added more DBG_IPMI messages + util/imb_api.h - moved GetLastError() to imbapi.c + util/ipmilanplus.c - always set acked_packet_number in lan2_send_sol, + add more debug messages if max debug, + add lan2_validate_solrcv for more checking + util/isolconsole.c - allow max debug via -xxx, + limit stdin reads to MAX_BMC_DATA(203) also, + handle sol_send errors/retries better, + add -s for slow link recvdelay + util/isolwin.c - mods for arrow keys (0x1b [A -> OA), + make sure WIN32 dbglog msgs have \r\n + util/bmchealth.c - show more for Chassis Status (last_pwr) + util/ipmicmd.c - added get_mfgid/set_mfgid for my_devid + util/mem_if.c - added get_MemDesc routine + util/ievents.c - use get_MemDesc for DIMM string if Intel + doc/ipmiutil.spec - add BuildRequires: openssl-devel + ipmiutil-2.4.1-fix-format-errors.patch - use printf("%s",var) format + ipmiutil-2.4.1-fix-getline-conflict.patch - getline->my_getline in ipmicmd.c + these 2 patches were merged from Guillaume Rousse + util/ipmiutil.mak - changed CFLAGS + lib/lanplus/ipmiplus.mak - changed CFLAGS + doc/isolconsole.8 - document -s option for slow link + ipmiutil-2.4.2 contains: + ipmiutil.c (ipmiutil) ver 2.42 + alarms.c (ipmiutil alarms) ver 2.42 + bmchealth.c (ipmiutil health) ver 2.42 + fruconfig.c (ipmiutil fru) ver 2.42 + getevent.c (ipmiutil getevt) ver 2.42 + hwreset.c (ipmiutil reset) ver 2.42 + icmd.c (ipmiutil cmd) ver 2.42 + pefconfig.c (ipmiutil lan) ver 2.42 + sensor.c (ipmiutil sensor) ver 2.42 + showsel.c (ipmiutil sel) ver 2.42 + tmconfig.c (ipmiutil serial) ver 2.42 + wdt.c (ipmiutil wdt) ver 2.42 + isolconsole.c (ipmiutil sol) ver 2.42 + bmcconfig.c (ipmiutil config) ver 2.42 + ievents.c (ipmiutil events) ver 2.42 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +09/14/09 ARCress ipmiutil-2.4.3 changes + util/ipmilanplus.c - logic to compute lan2_latency, after open, + change recv_handler arg to (void *), + set timeout=1, esc_char in set_sol_data(), + fix null username if Solaris printf + util/isolconsole.c - auto-detect latency, set -s 500 if >100ms, + change recv_handler arg to (void *) + util/fruconfig.c - add SMI MCs via -m00c000s, + use get_errno() + util/sensor.c - add SMI MCs via -m002000s, + change delimiter from ':' to '|' for -c + util/pefconfig.c - add -H to gateway MAC warning text, + change delimiter from ':' to '|' for -c, + use get_errno() + util/bmcconfig.c - use get_errno() + util/ipmicmd.c - add get_errno(), set_lan_options(), + util/ipmicmd.h - add get_errno(), set_lan_options(), removed gnode + util/ievents.c - get DIMM index from data2 if mini-BMC + lib/lanplus/lanplus.c - change some check_sol debug msgs LOG_WARN -> LOG_INFO, + allow setting lan2_timeout in lanplus_open, + if slow_link, set lan2_timeout = 2 sec + doc/fruconfig.8 - document SMI MCs via -m00c000s + doc/sensor.8 - document SMI MCs via -m002000s + doc/pefconfig.8 - added more about MAC detection under -H + doc/UserGuide - updated man pages from above + ipmiutil-2.4.3 contains: + ipmiutil.c (ipmiutil) ver 2.43 + alarms.c (ipmiutil alarms) ver 2.43 + bmchealth.c (ipmiutil health) ver 2.43 + fruconfig.c (ipmiutil fru) ver 2.43 + getevent.c (ipmiutil getevt) ver 2.43 + hwreset.c (ipmiutil reset) ver 2.43 + icmd.c (ipmiutil cmd) ver 2.43 + pefconfig.c (ipmiutil lan) ver 2.43 + sensor.c (ipmiutil sensor) ver 2.43 + showsel.c (ipmiutil sel) ver 2.43 + tmconfig.c (ipmiutil serial) ver 2.43 + wdt.c (ipmiutil wdt) ver 2.43 + isolconsole.c (ipmiutil sol) ver 2.43 + bmcconfig.c (ipmiutil config) ver 2.43 + ievents.c (ipmiutil events) ver 2.43 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +10/28/09 ARCress ipmiutil-2.5.0 changes + Full ANSI VT100 emulation for Windows SOL console + Two-character escape sequence (~.) for SOL console, adding send-Break. + Added canonical output option -c for fru,config,sensor,health,lan + Added ipmiutil getevt -r to run specified script when an event occurs + util/bmchealth.c - add -f to show FRUSDR versions + renamed show_devid -> show_devid_all + add -c for canonical output with delim '|' + util/tmconfig.c - show Adjusting messages even if not debug, + add -g for fconsoleonly with BMode CTS + util/ievents.c - only show file_grep error msg if fdebug + util/ipmicmd.c - added global fdebug, + add SOLARIS logic for tty_setraw to fix stdin + added show_devid() + util/ipmicmd.h - added show_devid and BDELIM ('|') + util/AnsiTerm.cpp - new, from Robert Nelson, see file comments, + this is a complete ANSI VT100 emulation + util/AnsiTerm.h - new, from Robert Nelson, see file comments + util/isolwin.c - changes to use AnsiTerm.cpp, more dbglog messages + util/isolconsole.c - changes to use AnsiTerm.cpp, + implement 2-char escape sequence (~.), + use extern for lan2 even if not HAVE_LANPLUS, + use CheckTextMode to detect CRLF if bg color set + which automatically converts Enter in BIOS Setup. + util/ipmiutil.mak - changes to add AnsiTerm.obj + util/ipmilanplus.c - added lan2_send_break() + util/ipmidir.c - only decrement SMBase if l.o.bit is 1 + util/fruconfig.c - add -c for canonical output with delim '|' + util/bmcconfig.c - add -c for canonical output with delim '|' + util/getevent.c - add -e to wait for specific event sensor type, + add -r to run script file when event occurs + doc/getevent.8 - document -e, -r options + doc/evt.sh - new, sample event script for ipmiutil getevt -r + doc/Makefile - install evt.sh + doc/ipmiutil.spec - include evt.sh + configure.in - include WindRiver detection to show warning + - change email to " at users.sourceforge.net" + ipmiutil-2.5.0 contains: + ipmiutil.c (ipmiutil) ver 2.50 + alarms.c (ipmiutil alarms) ver 2.50 + bmchealth.c (ipmiutil health) ver 2.50 + fruconfig.c (ipmiutil fru) ver 2.50 + getevent.c (ipmiutil getevt) ver 2.50 + hwreset.c (ipmiutil reset) ver 2.50 + icmd.c (ipmiutil cmd) ver 2.50 + pefconfig.c (ipmiutil lan) ver 2.50 + sensor.c (ipmiutil sensor) ver 2.50 + showsel.c (ipmiutil sel) ver 2.50 + tmconfig.c (ipmiutil serial) ver 2.50 + wdt.c (ipmiutil wdt) ver 2.50 + isolconsole.c (ipmiutil sol) ver 2.50 + bmcconfig.c (ipmiutil config) ver 2.50 + ievents.c (ipmiutil events) ver 2.50 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +11/20/09 ARCress ipmiutil-2.5.1 changes + util/isolwin.c - use wait_time for wait/select tuning with -u + util/isolconsole.c - add -u for wait_time, use it for Linux select, + detect Dell BMC and set shorter max_bmc_data. + util/ipmiutil.mak - fix CFLAGS_W for AnsiTerm.cpp + util/sensor.c - show nominal SDR values with -v + util/tmconfig.c - added fcanonical option -a + util/alarms.c - adjust if -i param > 255 + util/pefconfig.c - do not copy eth%d in FindEthNum if -i, + only show SIOCGIF erros if debug (-x) + doc/ipmiutil.spec - cleanup some unneeded script logic + configure.in - move distro-specific logic here + ipmiutil-2.5.1 contains: + ipmiutil.c (ipmiutil) ver 2.51 + alarms.c (ipmiutil alarms) ver 2.51 + bmchealth.c (ipmiutil health) ver 2.51 + fruconfig.c (ipmiutil fru) ver 2.51 + getevent.c (ipmiutil getevt) ver 2.51 + hwreset.c (ipmiutil reset) ver 2.51 + icmd.c (ipmiutil cmd) ver 2.51 + pefconfig.c (ipmiutil lan) ver 2.51 + sensor.c (ipmiutil sensor) ver 2.51 + showsel.c (ipmiutil sel) ver 2.51 + tmconfig.c (ipmiutil serial) ver 2.51 + wdt.c (ipmiutil wdt) ver 2.51 + isolconsole.c (ipmiutil sol) ver 2.51 + bmcconfig.c (ipmiutil config) ver 2.51 + ievents.c (ipmiutil events) ver 2.51 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +12/16/09 ARCress ipmiutil-2.5.2 changes + util/sensor.c - fix -w(fwrap) with -c(fsimple) feat#2907464 + util/ievents.c - decode OEM type f1 as all ascii + util/showsel.c - added option for adding OEM SEL record type f1 + util/md2.c - undef MD2OK if NON_GPL + util/mem_if.c - fix get_Ipmi for NSI2U to only decr if odd + util/bmchealth.c - fix NSI2U to set fmBMC=1 + util/ipmiutil.mak - use static CFLAGS/link for Win64 + lib/lanplus/ipmiplus.mak - use static CFLAGS/link for Win64 + util/ievents.c - decode PS config error event + util/ipmimv.c - added pragma pack and ioctls for FreeBSD + util/ipmicmd.c - choose open driver for BSD if loaded + doc/UserGuide - document 'kldload ipmi' for FreeBSD, + document that Win64 needs vcredist_x86.exe + ipmiutil-2.5.2 contains: + ipmiutil.c (ipmiutil) ver 2.52 + alarms.c (ipmiutil alarms) ver 2.52 + bmchealth.c (ipmiutil health) ver 2.52 + fruconfig.c (ipmiutil fru) ver 2.52 + getevent.c (ipmiutil getevt) ver 2.52 + hwreset.c (ipmiutil reset) ver 2.52 + icmd.c (ipmiutil cmd) ver 2.52 + pefconfig.c (ipmiutil lan) ver 2.52 + sensor.c (ipmiutil sensor) ver 2.52 + showsel.c (ipmiutil sel) ver 2.52 + tmconfig.c (ipmiutil serial) ver 2.52 + wdt.c (ipmiutil wdt) ver 2.52 + isolconsole.c (ipmiutil sol) ver 2.52 + bmcconfig.c (ipmiutil config) ver 2.52 + ievents.c (ipmiutil events) ver 2.52 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +01/27/10 ARCress ipmiutil-2.5.3 changes + doc/UserGuide - resync with man pages + doc/wdt.8 - line breaks for ipmiutil_wdt commands + util/ievents.c - add System Reconfig variant + util/pefconfig.c - for -c, show PEF Control = none if disabled + util/Makefile.am - removed xmlconfig + util/fruconfig.c - show frutype,fruid in show_fru, detect bad type/len, + fix WIN32 ctime() error w Board DateTime on CG2100, + fix GetSDR error 0xCA if SDR size < 16, + skip FRU for frutype==0x2e (ME) + util/showsel.c - ovf->overflow in status msg, show Size,Used,Free + util/ipmidir.c - max_kcs_loops 7000->30000 for slower ClearSEL cmd + util/imbapi.c - changed Async handle from int to long + util/imb_api.h - changed Async handle from int to long + util/getevent.c - changed Async handle from int to long + util/isolconsole.c - added retry_time, initially 5msec, now set to latency + util/sensor.c - fix GetSDR error 0xCA if SDR size < 16 for CG2100 + util/ipmilan.c - changed 1.5 SOL data header, + if sa==SWID for soft reset, bridge_level=0, + change TEST_LAN to fdebuglan>2 w dbglog. + util/ipmiutil.c - added svc function + util/getevent.c - add debug message if unknown Sms function + doc/setlib.sh - new, resolves libcrypto.so reference + doc/ipmiutil_wdt - updated for rpmlint issues + doc/ipmiutil_asy - updated for rpmlint issues + doc/ipmi_port.sh - updated for rpmlint issues + doc/ipmiutil.spec - updated for rpmlint issues, removed bmclanaol.mib + doc/Makefile - removed bmclanaol.mib + ipmiutil-2.5.3 contains: + ipmiutil.c (ipmiutil) ver 2.53 + alarms.c (ipmiutil alarms) ver 2.53 + bmchealth.c (ipmiutil health) ver 2.53 + fruconfig.c (ipmiutil fru) ver 2.53 + getevent.c (ipmiutil getevt) ver 2.53 + hwreset.c (ipmiutil reset) ver 2.53 + icmd.c (ipmiutil cmd) ver 2.53 + pefconfig.c (ipmiutil lan) ver 2.53 + sensor.c (ipmiutil sensor) ver 2.53 + showsel.c (ipmiutil sel) ver 2.53 + tmconfig.c (ipmiutil serial) ver 2.53 + wdt.c (ipmiutil wdt) ver 2.53 + isolconsole.c (ipmiutil sol) ver 2.53 + bmcconfig.c (ipmiutil config) ver 2.53 + ievents.c (ipmiutil events) ver 2.53 + idiscover.c (ipmiutil discover) ver 1.5 + ipmi_port.c (ipmi_port) ver 1.1 + +02/10/10 ARCress ipmiutil-2.5.4 changes + doc/setlib.sh - handle multiple instances + doc/ipmiutil.spec - set RPM_BUILD_ROOT for debuginfo + util/Makefile.am - do not strip in install for debuginfo + util/sensor.c - add Platform Alert meanings + util/pefconfig.c - skip rest of PEF if ccode=0xC1, + set arp_ctl=0x02 and sol_accum/retry for CG2100, + set_max_kcs_loops(100000) if CG2100, + fix DisablePef(9) policy num to conform. + util/bmcconfig.c - skip rest of PEF if ccode=0xC1, comment errors + util/ipmims.c - moved to ipmims.cpp + util/ipmims.cpp - new, renamed from ipmims.c + util/ipmicmd.c - set default gpriv_level to user (was admin) + util/hwreset.c - set default gpriv_level to admin when invoked + util/ievents.c - for CritStop data2,data2 -> data2,data3 + util/ipmidir.c - make ProcesSendM/ProcessTimedM static + util/bmchealth.c - show Kontron KTC5520 product desc + ipmiutil-2.5.4 contains: + ipmiutil (ipmiutil) ver 2.54 + alarms (ipmiutil alarms) ver 2.54 + bmchealth (ipmiutil health) ver 2.54 + fruconfig (ipmiutil fru) ver 2.54 + getevent (ipmiutil getevt) ver 2.54 + hwreset (ipmiutil reset) ver 2.54 + icmd (ipmiutil cmd) ver 2.54 + pefconfig (ipmiutil lan) ver 2.54 + sensor (ipmiutil sensor) ver 2.54 + showsel (ipmiutil sel) ver 2.54 + tmconfig (ipmiutil serial) ver 2.54 + wdt (ipmiutil wdt) ver 2.54 + isolconsole (ipmiutil sol) ver 2.54 + bmcconfig (ipmiutil config) ver 2.54 + ievents (ipmiutil events) ver 2.54 + idiscover (ipmiutil discover) ver 1.5 + ipmi_port (ipmi_port) ver 1.1 + +02/26/10 ARCress ipmiutil-2.6.0 changes + beforeconf.sh - handle libtool-2.x + configure.in - tweak install-strip subst + Makefile.am - clean debug*.list files, + doc/Makefile - change *.8,*.cmd,script names to new scheme + doc/ipmiutil.spec - changes for new naming scheme + doc/UserGuide - changes for new naming scheme + util/showsel.h - deleted, no longer used + util/ipmignustub.c - deleted, no longer used + util/xmlconfig.c - deleted, no longer used + util/Makefile.sco - deleted, no longer used + util/Makefile.am - change *.c names to new scheme + util/ipmiutil.mak - change *.c names to new scheme + util/alarms.c - renamed, now ialarms.c + util/bmcconfig.c - renamed, now iconfig.c + util/bmchealth.c - renamed, now ihealth.c + util/fruconfig.c - renamed, now ifru.c + util/getevent.c - renamed, now igetevent.c + util/hwreset.c - renamed, now ireset.c + util/isolconsole.c - renamed, now isol.c + util/pefconfig.c - renamed, now ilan.c + util/sensor.c - renamed, now isensor.c + util/showsel.c - renamed, now isel.c + util/tmconfig.c - renamed, now iserial.c + util/wdt.c - renamed, now iwdt.c + doc/alarms.8 - renamed, now ialarms.8 + doc/bmcconfig.8 - renamed, now iconfig.8 + doc/bmchealth.8 - renamed, now ihealth.8 + doc/fruconfig.8 - renamed, now ifru.8 + doc/getevent.8 - renamed, now igetevent.8 + doc/hwreset.8 - renamed, now ireset.8 + doc/isolconsole.8 - renamed, now isol.8 + doc/pefconfig.8 - renamed, now ilan.8 + doc/sensor.8 - renamed, now isensor.8 + doc/showsel.8 - renamed, now isel.8 + doc/tmconfig.8 - renamed, now iserial.8 + doc/wdt.8 - renamed, now iwdt.8 + util/ipmiutil.c - allow either getevt or getevent subcommands + util/iconfig.c - add SystemParam(0) for Chassis Restore Policy, + count num errors and show warning if any, + add wart for iBMC and user2 + util/ilan.c - count num errors and show warning if any, + add wart for iBMC and user2 + util/isol.c - fix script input for WIN32 dwKeyCode, + request admin priv if deactivate, + check for a recv before sending next script line, + util/isolwin.c - add Ascii2KeyCode for WIN32 script input, + increase IBUF_SZ to 128, check overflow better. + util/ipmimv.c - changes for ALONE/TEST_BIN compile flags for testing + util/ipmims.cpp - changes for ALONE/TEST_BIN compile flags for testing + util/ifru.c - set_max_kcs_loops to 100 msec if CG2100 + util/isensor.c - set_max_kcs_loops to 100 msec if CG2100 + util/icmd.c - set_max_kcs_loops to 100 msec if CG2100 + +old name new name existing meta-command +---------- ---------- ---------- +ipmiutil.8 ipmiutil.8 (ipmiutil) +alarms.8 ialarms.8 (ipmiutil alarms) +bmcconfig.8 iconfig.8 (ipmiutil config) +bmchealth.8 ihealth.8 (ipmiutil health) +fruconfig.8 ifru.8 (ipmiutil fru) +getevent.8 igetevent.8 (ipmiutil getevent) +hwreset.8 ireset.8 (ipmiutil reset) +icmd.8 icmd.8 (ipmiutil cmd) +idiscover.8 idiscover.8 (ipmiutil discover) +ievents.8 ievents.8 (ipmiutil events) +isolconsole.8 isol.8 (ipmiutil sol) +pefconfig.8 ilan.8 (ipmiutil lan) +sensor.8 isensor.8 (ipmiutil sensor) +showsel.8 isel.8 (ipmiutil sel) +tmconfig.8 iserial.8 (ipmiutil serial) +wdt.8 iwdt.8 (ipmiutil wdt) + + ipmiutil-2.6.0 contains: + ipmiutil (ipmiutil) ver 2.60 + ialarms (ipmiutil alarms) ver 2.60 + ihealth (ipmiutil health) ver 2.60 + iconfig (ipmiutil config) ver 2.60 + igetevent (ipmiutil getevt) ver 2.60 + ireset (ipmiutil reset) ver 2.60 + icmd (ipmiutil cmd) ver 2.60 + ilan (ipmiutil lan) ver 2.60 + isensor (ipmiutil sensor) ver 2.60 + isel (ipmiutil sel) ver 2.60 + iserial (ipmiutil serial) ver 2.60 + iwdt (ipmiutil wdt) ver 2.60 + isol (ipmiutil sol) ver 2.60 + iconfig (ipmiutil config) ver 2.60 + ievents (ipmiutil events) ver 2.60 + idiscover (ipmiutil discover) ver 1.5 + ipmi_port (ipmi_port) ver 1.1 + +03/18/10 ARCress ipmiutil-2.6.1 changes + util/ipmicmd.c - move get_lan_channel & atoip here + util/ifru.c - request admin privilege if setting values, + add -v to set product version, + add -i to specify a fru id + util/isensor.c - request admin privilege if setting thresholds + util/isel.c - request admin privilege if clearing SEL + util/isol.c - change default fCRLF from 2 to 0 for stty onlcr + util/ilan.c - tweak SetUserAccess on iBMC (user1 ok, user2 skip) + util/imbapi.c - change RegisterAsync check for compile optim issue + doc/ifru.8 - added -v and -i documentation + doc/ipmiutil_wdt - init script standardization + doc/ipmiutil_asy - init script standardization + doc/ipmi_port.sh - init script standardization + doc/ipmiutil.spec - additional cleanup, + moved UserGuide to /usr/share/doc/ipmiutil-$version + ipmiutil-2.6.1 contains: + ipmiutil (ipmiutil) ver 2.61 + ialarms (ipmiutil alarms) ver 2.61 + icmd (ipmiutil cmd) ver 2.61 + iconfig (ipmiutil config) ver 2.61 + ievents (ipmiutil events) ver 2.61 + ifru (ipmiutil fru) ver 2.61 + igetevent (ipmiutil getevt) ver 2.61 + ihealth (ipmiutil health) ver 2.61 + ilan (ipmiutil lan) ver 2.61 + ireset (ipmiutil reset) ver 2.61 + isel (ipmiutil sel) ver 2.61 + isensor (ipmiutil sensor) ver 2.61 + iserial (ipmiutil serial) ver 2.61 + isol (ipmiutil sol) ver 2.61 + iwdt (ipmiutil wdt) ver 2.61 + idiscover (ipmiutil discover) ver 1.5 + ipmi_port (ipmi_port) ver 1.1 + +04/06/10 ARCress ipmiutil-2.6.2 changes + util/ialarms.c - add \n to get_enc_leds error message + util/ihealth.c - show product 3E as CG2100 + util/ifru.c - only check len in write_asset if new value supplied, + which avoids -10 error if sernum was empty. + util/isel.c - avoid extra SEL full warning if GetSelInfo failed + util/ilan.c - check show_users against max_users for miniBMC + util/iserial.c - check show_users against max_users for miniBMC + util/ifruset.c - new, allow setting all Product Area fields + util/Makefile.am - add ifruset + doc/isensor - fix script syntax error (%->$) + doc/UserGuide - resync with man page updates + doc/ipmiutil_wdt - fix to abort if no ipmi driver, caused problems + in SLES that auto-starts services. + ipmiutil-2.6.2 contains: + ipmiutil (ipmiutil) ver 2.62 + ialarms (ipmiutil alarms) ver 2.62 + icmd (ipmiutil cmd) ver 2.62 + iconfig (ipmiutil config) ver 2.62 + ievents (ipmiutil events) ver 2.62 + ifru (ipmiutil fru) ver 2.62 + igetevent (ipmiutil getevt) ver 2.62 + ihealth (ipmiutil health) ver 2.62 + ilan (ipmiutil lan) ver 2.62 + ireset (ipmiutil reset) ver 2.62 + isel (ipmiutil sel) ver 2.62 + isensor (ipmiutil sensor) ver 2.62 + iserial (ipmiutil serial) ver 2.62 + isol (ipmiutil sol) ver 2.62 + iwdt (ipmiutil wdt) ver 2.62 + idiscover (ipmiutil discover) ver 1.5 + ipmi_port (ipmi_port) ver 1.1 + +04/27/10 ARCress ipmiutil-2.6.3 changes + configure.in - detect if libcrypto.so has md2, else set SKIP_MD2 + to fix bug #2990244 with openssl-1.0.0, + removed NON_GPL flag, only use ALLOW_GPL toggle. + util/md2.c - add SKIP_MD2 compile flag + util/ipmilan.c - add SKIP_MD2 compile flag, + include SWID_SMSOS(0x41), changed TEST_LAN logic, + include -504 in decode_rv. + util/ihealth.c - add -p to set power restore policy + util/isensor.c - always request admin priv if remote for ReservID + util/isel.c - request admin priv if addsel & remote + util/isol.c - add stub for send_ctlaltdel, + explicitly set default priv to User for sol + util/ifru.c - if write error, dont load/show fru again + util/ifruset.c - if write error, dont load/show fru again + util/ipmimv.c - handle bad sresp passed to ipmi_cmdraw_mv() + util/iconfig.c - skip setting LanParam 10 arp if Lan3 + util/igetevent.c - if -a and mv, write_syslog before shutdown/reboot. + use loop/stages with mv driver. + util/imbapi.c - return LAN_ERR_RECV_FAIL if status==1 in cmdraw_ia + util/iwdt.c - add -c for canonical output format, + set default priv to Admin for iwdt + doc/iwdt.8 - include -c description + doc/ifru.8 - include -c description + doc/ifruset.8 - new, man page for ifruset + doc/ipmi_port.8 - new, man page for ipmi_port + doc/UserGuide - updated man pages from above + doc/ipmiutil_wdt - detect if /etc/init.d/functions present + doc/ipmiutil_asy - detect if /etc/init.d/functions present + doc/ipmi_port.sh - detect if /etc/init.d/functions present, + this caused script errors with 2.61/2.62 on SuSE. + test/panicsel-c.sh - updated for new naming + test/panicsel_apptool_test.sh - updated for new naming + test/panicsel_test_needreboot.sh - updated for new naming + test/unittest.sh - new, added unit test script + ipmiutil-2.6.3 contains: + ipmiutil (ipmiutil) ver 2.63 + ialarms (ipmiutil alarms) ver 2.63 + icmd (ipmiutil cmd) ver 2.63 + iconfig (ipmiutil config) ver 2.63 + ievents (ipmiutil events) ver 2.63 + ifru (ipmiutil fru) ver 2.63 + igetevent (ipmiutil getevt) ver 2.63 + ihealth (ipmiutil health) ver 2.63 + ilan (ipmiutil lan) ver 2.63 + ireset (ipmiutil reset) ver 2.63 + isel (ipmiutil sel) ver 2.63 + isensor (ipmiutil sensor) ver 2.63 + iserial (ipmiutil serial) ver 2.63 + isol (ipmiutil sol) ver 2.63 + iwdt (ipmiutil wdt) ver 2.63 + idiscover (ipmiutil discover) ver 1.5 + ipmi_port (ipmi_port) ver 1.1 + +05/19/10 ARCress ipmiutil-2.6.4 changes + test/sensor-TIGW1U.txt - new, for unittest.sh + test/sensor-CG2100.txt - new, for unittest.sh + test/unittest.sh - changes to run on Solaris, use $testdir, add dosol flag + util/ihealth.c - request admin priv if -p and remote, + mods to skip powerstate for picmg/atca + util/ifruset.c - track existing num product fields, debug message if more, + rename i_fru to i_ifruset + util/ipmiutil.c - rename i_bmc() to i_config() + util/ipmiutil.h - rename i_bmc() to i_config() + util/iconfig.c - rename i_bmc() to i_config(), + include all LAN channels (e.g. 1,2,3) + doc/ipmi_if.sh - randomize dmi.out file + doc/ipmiutil.spec - changes for style, use /var/lib/ipmiutil + configure.in - tweaks to match spec file changes + INSTALL - add build instructions for FreeBSD + util/ipmidir.c - check /var/lib/ipmiutil & /usr/share/ipmiutil for ipmi_if.txt + util/ipmignu.c - check /var/lib/ipmiutil & /usr/share/ipmiutil for ipmi_if.txt + util/igetevent.c - move /usr/share/ipmiutil/evt.idx to /var/lib/ipmiutil, + remove WIN32 reference to fwritesel + util/isel.c - move /usr/share/ipmiutil/sel.idx to /var/lib/ipmiutil, + use extern evt_hdr + util/isensor.c - move /usr/share/ipmiutil/thresholds.sh ->/var/lib/ipmiutil, + add sensor types 17,F0,F1 for atca + util/ievents.c - move /usr/share/ipmiutil/sensor_out.txt ->/var/lib/ipmiutil + add SEVerity to decode_sel_entry(): INF,MIN,MAJ,CRT + show error message if cannot open sensfil from -s + util/ialarms.c - mods for picmg/atca leds, set fHasEnc for TIGI2U + doc/ipmi_port.sh - move /usr/share/ipmiutil/thresholds.sh to /var/lib/ipmiutil + doc/ilan.8 - document -b authmask option + util/ilan.c - show existing -b authmask option in Usage, + add strings for Auth enables (param2) + ipmiutil-2.6.4 contains: + ipmiutil (ipmiutil) ver 2.64 + ialarms (ipmiutil alarms) ver 2.64 + icmd (ipmiutil cmd) ver 2.64 + iconfig (ipmiutil config) ver 2.64 + ievents (ipmiutil events) ver 2.64 + ifru (ipmiutil fru) ver 2.64 + igetevent (ipmiutil getevt) ver 2.64 + ihealth (ipmiutil health) ver 2.64 + ilan (ipmiutil lan) ver 2.64 + ireset (ipmiutil reset) ver 2.64 + isel (ipmiutil sel) ver 2.64 + isensor (ipmiutil sensor) ver 2.64 + iserial (ipmiutil serial) ver 2.64 + isol (ipmiutil sol) ver 2.64 + iwdt (ipmiutil wdt) ver 2.64 + ifruset (ifruset) ver 2.64 + idiscover (ipmiutil discover) ver 1.5 + ipmi_port (ipmi_port) ver 1.1 + +06/10/10 ARCress ipmiutil-2.6.5 changes + util/isensor.c - modify idstr for shared compact sensor + util/ipicmg.c - new, added + util/ipicmg.h - new, added + util/ifirewall.c - new, added + util/ifirewall.h - new, added + util/Makefile.am - added picmg.c, ifirewall.c + util/ipmiutil.mak- added picmg.c, ifirewall.c + doc/ipicmg.8 - new, added + doc/ipicmg - new, added + doc/ifirewall.8 - new, added + doc/ifirewall - new, added + doc/Makefile - added picmg.8, ifirewall.8 + doc/ipmiutil.spec - added ipicmg*, ifirewall* + doc/ipmiutil.8 - added picmg, firewall + ipmiutil-2.6.5 contains: + ipmiutil (ipmiutil) ver 2.65 + ialarms (ipmiutil alarms) ver 2.65 + icmd (ipmiutil cmd) ver 2.65 + iconfig (ipmiutil config) ver 2.65 + ievents (ipmiutil events) ver 2.65 + ifru (ipmiutil fru) ver 2.65 + igetevent (ipmiutil getevt) ver 2.65 + ihealth (ipmiutil health) ver 2.65 + ilan (ipmiutil lan) ver 2.65 + ireset (ipmiutil reset) ver 2.65 + isel (ipmiutil sel) ver 2.65 + isensor (ipmiutil sensor) ver 2.65 + iserial (ipmiutil serial) ver 2.65 + isol (ipmiutil sol) ver 2.65 + iwdt (ipmiutil wdt) ver 2.65 + ifruset (ipmiutil ifruset) ver 2.65 + ipicmg (ipmiutil picmg) ver 2.65 + ifirewall (ipmiutil firewall) ver 2.65 + idiscover (ipmiutil discover) ver 1.5 + ipmi_port (ipmi_port) ver 1.1 + +07/06/10 ARCress ipmiutil-2.6.6 changes + test/testipmi.sh - new, added for more detailed testing + test/unittest.sh - handle $testdir with dirname + doc/ipmiutil_evt - new, init script for ipmiutil getevt -s service + doc/evt.sh - change to filter out INFormational events + util/igetevent.c - also write to syslog for each event received + util/ireset.c - fix -w option to wait for BMC ready if ipmi lan + util/ihealth.c - for -f in get_frusdr_version: fix extra chars, + and also keep going to return SDR Package version. + util/ialarms.c - default to admin priv if remote get or set + util/ifru.c - set -V4 earlier if fwritefru + util/ifruset.c - set -V4 earlier if fwritefru + ipmiutil-2.6.6 contains: + ipmiutil (ipmiutil) ver 2.66 + ialarms (ipmiutil alarms) ver 2.66 + icmd (ipmiutil cmd) ver 2.66 + iconfig (ipmiutil config) ver 2.66 + ievents (ipmiutil events) ver 2.66 + ifru (ipmiutil fru) ver 2.66 + igetevent (ipmiutil getevt) ver 2.66 + ihealth (ipmiutil health) ver 2.66 + ilan (ipmiutil lan) ver 2.66 + ireset (ipmiutil reset) ver 2.66 + isel (ipmiutil sel) ver 2.66 + isensor (ipmiutil sensor) ver 2.66 + iserial (ipmiutil serial) ver 2.66 + isol (ipmiutil sol) ver 2.66 + iwdt (ipmiutil wdt) ver 2.66 + ifruset (ipmiutil ifruset) ver 2.66 + ipicmg (ipmiutil picmg) ver 2.66 + ifirewall (ipmiutil firewall) ver 2.66 + idiscover (ipmiutil discover) ver 1.5 + ipmi_port (ipmi_port) ver 1.1 + +07/15/10 ARCress ipmiutil-2.6.7 changes + util/ilan.c - skip some optional lan params based on detection, + add -w to set the grat arp interval. + util/iconfig.c - skip some optional params based on detection + util/ipmilan.c - detect if default MD5 AuthType not supported, try Pswd, + resolved some compile warnings. + util/ipmicmd.h - add VENDOR_PEPPERCON for SuperMicro AOC-SIMSO + util/ireset.c - ignore boot opts if VENDOR_KONTRON, + fix buffer overflow for initmsg + util/igetevent.c - handle sms_sa != 0x81 for Urbanna, + enable -a with DO_MVL for FreeBSD + util/ipicmg.c - fix compile warning by adding string.h + util/idiscover.c - try to resolve host names, use full broadcast, + fix packet format error in send_getauth + test/testipmi.sh - do not exit on failure, continue to other tests + test/ipmievt.sh - set hitemp instead of lotemp, handle /var/lib/ipmiutil + doc/ilan.8 - reorder lan options in alphabetical order, add -w + doc/ipmi_if.sh - always include Register Spacing + doc/Makefile - changes for rpmlint + doc/ipmiutil.spec - changes for rpmlint + ipmiutil-2.6.7 contains: + ipmiutil (ipmiutil) ver 2.67 + ialarms (ipmiutil alarms) ver 2.67 + icmd (ipmiutil cmd) ver 2.67 + iconfig (ipmiutil config) ver 2.67 + ievents (ipmiutil events) ver 2.67 + ifru (ipmiutil fru) ver 2.67 + igetevent (ipmiutil getevt) ver 2.67 + ihealth (ipmiutil health) ver 2.67 + ilan (ipmiutil lan) ver 2.67 + ireset (ipmiutil reset) ver 2.67 + isel (ipmiutil sel) ver 2.67 + isensor (ipmiutil sensor) ver 2.67 + iserial (ipmiutil serial) ver 2.67 + isol (ipmiutil sol) ver 2.67 + iwdt (ipmiutil wdt) ver 2.67 + ifruset (ipmiutil ifruset) ver 2.67 + ipicmg (ipmiutil picmg) ver 2.67 + ifirewall (ipmiutil firewall) ver 2.67 + idiscover (ipmiutil discover) ver 1.6 + ipmi_port (ipmi_port) ver 1.1 + +08/06/10 ARCress ipmiutil-2.6.8 changes + util/ifru.c - added ChkOverflow() to show_fru + test/testipmi.sh - do remote reset tests last, since reboot times vary + doc/ipmiutil.spec - fix two more rpmlint errors + ChangeLog - remove execute permissions + doc/UserGuide - remove execute permissions + Makefile.am - clean out \r in 'make tarball' + - fedora 14 cut taken here (build 1) + util/ilan.c - added get_sensor_desc in PefDesc + test/testipmi.sh - extra message about 3 other files required + configure.in - added changes for Wind River Linux, SuSE chkconfig + util/ievents.c - adjust SEV for thresholds to match TAM, + change get_sensdesc, add show_sensdesc + util/isel.c - add -d to show sensor description + util/igetevent.c - change get_sensdesc parameters + - all other binaries built here (build 2) + ipmiutil-2.6.8 contains: + ipmiutil (ipmiutil) ver 2.68 + ialarms (ipmiutil alarms) ver 2.68 + icmd (ipmiutil cmd) ver 2.68 + iconfig (ipmiutil config) ver 2.68 + ievents (ipmiutil events) ver 2.68 + ifru (ipmiutil fru) ver 2.68 + igetevent (ipmiutil getevt) ver 2.68 + ihealth (ipmiutil health) ver 2.68 + ilan (ipmiutil lan) ver 2.68 + ireset (ipmiutil reset) ver 2.68 + isel (ipmiutil sel) ver 2.68 + isensor (ipmiutil sensor) ver 2.68 + iserial (ipmiutil serial) ver 2.68 + isol (ipmiutil sol) ver 2.68 + iwdt (ipmiutil wdt) ver 2.68 + ifruset (ipmiutil ifruset) ver 2.68 + ipicmg (ipmiutil picmg) ver 2.68 + ifirewall (ipmiutil firewall) ver 2.68 + idiscover (ipmiutil discover) ver 1.6 + ipmi_port (ipmi_port) ver 1.1 + +09/01/10 ARCress ipmiutil-2.6.9 changes + util/ifruset.c - newdata buffer overflow handling to avoid segfault, + added -d/-r options to dump/restore FRU + util/ifru.c - newdata buffer overflow handling for -a/-s/-v + util/ievents.c - added decode_sel_fujitsu() call + util/ipmimv.c - fix potential overflow if sresp > 80 + util/oem_fujitsu.c - new, for decode_sel_fujitsu, decode_sensor_fujitsu + code from Dan Lukes + util/oem_fujitsu.h - new, for oem_fujitsu functions + util/Makefile.am - added oem_fujitsu.c + util/showsel.h - deleted, no longer used + lib/lanplus/inc/ipmitool/ipmi_constants.h - added SHA256 defines + lib/lanplus/lanplus_crypt_impl.c - added SHA256 patch from Holger Liebig + lib/lanplus/lanplus_crypt.c - added SHA256 patch from Holger Liebig + lib/lanplus/lanplus_crypt.h - added SHA256 patch from Holger Liebig + lib/lanplus/lanplus_dump.c - added SHA256 patch from Holger Liebig + lib/lanplus/lanplus.c - added SHA256 patch from Holger Liebig + lib/lanplus/lanplus.h - added SHA256 patch from Holger Liebig + lib/lanplus/inc/ipmitool/ipmi.h - [20] -> [EVP_MAX_MD_SIZE] for SHA256 + lib/lanplus/inc/ipmitool/ipmi_intf.h - add sik_len, k1_len, k2_len + lib/lanplus/lanplus_defs.h - new, consolidate lanplus structures + util/ipmilanplus.h - move structures to lanplus_defs.h + Note that SHA256 is not enabled without -DHAVE_SHA256 compile flag, + since many openssl/libcrypto versions do not yet include it. + configure.in - add --enable-sha256 to set -DHAVE_SHA256 compile flag, + set service default start/stop levels if not Red Hat. + util/ifwum.c - new, added OEM firmware update mgr functionality + util/ifwum.h - new, added OEM firmware update mgr functionality + util/ihpm.c - new, added HPM firmware update mgr functionality + util/ihpm.h - new, added HPM firmware update mgr functionality + util/ipmiutil.c - added fwum and hpm + util/ipmiutil.h - added fwum and hpm + doc/ifru.8 - added -k for oem_kontron + doc/ifwum.8 - new, ifwum man page + doc/ifwum - new, ifwum shortcut script + doc/ihpm.8 - new, ihpm man page + doc/ihpm - new, ihpm shortcut script + doc/UserGuide - added 5.3 Windows Command Usage, ifwum, ihpm + doc/ipmiutil.spec - added ifwum,ihpm parts + util/ipmimv.c - use poll() instead of wait_interval in getevent_mv + util/igetevent.c - call get_sdr_cache to pre-fetch sdr data + util/isel.c - call get_sdr_cache to pre-fetch sdr data if -e + util/isensor.c - added get_sdr_cache & get_sdr_from_cache + util/ievents.c - use set_sel_opts to pass sdr data + ipmiutil-2.6.9 contains: + ipmiutil (ipmiutil) ver 2.69 + ialarms (ipmiutil alarms) ver 2.69 + icmd (ipmiutil cmd) ver 2.69 + iconfig (ipmiutil config) ver 2.69 + ievents (ipmiutil events) ver 2.69 + ifru (ipmiutil fru) ver 2.69 + igetevent (ipmiutil getevt) ver 2.69 + ihealth (ipmiutil health) ver 2.69 + ilan (ipmiutil lan) ver 2.69 + ireset (ipmiutil reset) ver 2.69 + isel (ipmiutil sel) ver 2.69 + isensor (ipmiutil sensor) ver 2.69 + iserial (ipmiutil serial) ver 2.69 + isol (ipmiutil sol) ver 2.69 + iwdt (ipmiutil wdt) ver 2.69 + ifruset (ipmiutil ifruset) ver 2.69 + ipicmg (ipmiutil picmg) ver 2.69 + ifirewall (ipmiutil firewall) ver 2.69 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 0.4 + idiscover (ipmiutil discover) ver 1.6 + ipmi_port (ipmi_port) ver 1.1 + +09/27/10 ARCress ipmiutil-2.7.0 changes + util/ialarms.c - moved Intel functions to oem_intel.c + util/oem_intel.h - new, for oem_intel alarm LED functions + util/oem_intel.c - new, for oem_intel alarm LED functions + added decode_sensor_intel, show_oemsdr_intel + util/oem_sun.c - new, for oem_sun functions + util/oem_sun.h - new, for oem_sun functions + util/ipmiutil.c - show subcommand with show_outcome(), added i_sun + util/i*.c - don't call extra show_outcome(), exit->return. + util/ifru.c - add multi-record area decoding, call show_fru_picmg + util/ifruset.c - add multi-record area decoding, call show_fru_picmg, + added some validation for -f restore. + util/ipicmg.h - added more picmg defines + util/isensor.c - added -d/-f dump/file restore options, + util/ifru_picmg.c - new, add picmg FRU decoding in show_fru_picmg + util/iekanalyzer.c - new, added for ekanalyzer + util/iekanalyzer.h - new, added for ekanalyzer + util/isensor.c - added decode_sensor_intel/_kontron, show_oemsdr_intel, + fix get_sdr_cache with use_devsdrs() + util/oem_kontron.c - added decode_sensor_kontron, more fru checking + util/oem_fujitsu.c - added alarms_fujitsu routines for LEDs + util/ialarms.c - added calls to alarms_fujitsu routines + util/ihpm.c - upgraded from 0.4 to 1.0.2 + util/ihealth.c - get ME version if S5500 + util/ievents.c - call decode_sel_kontron, handle sel -e if sdrcache fails + util/ipmi_sample.c - add -m option, use show_outcome (v0.2) + lib/lanplus/lanplus.c - return error instead of assert if session id mismatch + doc/isunoem.8 - new, for sunoem functions + doc/iekanalyzer.8 - new, for ekanalyzer functions + doc/ifru.8 - added -d option to dump fru + doc/isensor.8 - added -d/-f options + doc/ipmiutil.spec - added isunoem.8, iekanalyzer.8 + doc/UserGuide - added sunoem, ekanalyzer, added 7.1 for return codes + ipmiutil-2.7.0 contains: + ipmiutil (ipmiutil) ver 2.70 + ialarms (ipmiutil alarms) ver 2.70 + icmd (ipmiutil cmd) ver 2.70 + iconfig (ipmiutil config) ver 2.70 + ievents (ipmiutil events) ver 2.70 + ifru (ipmiutil fru) ver 2.70 + igetevent (ipmiutil getevt) ver 2.70 + ihealth (ipmiutil health) ver 2.70 + ilan (ipmiutil lan) ver 2.70 + ireset (ipmiutil reset) ver 2.70 + isel (ipmiutil sel) ver 2.70 + isensor (ipmiutil sensor) ver 2.70 + iserial (ipmiutil serial) ver 2.70 + isol (ipmiutil sol) ver 2.70 + iwdt (ipmiutil wdt) ver 2.70 + ifruset (ipmiutil ifruset) ver 2.70 + oem_sun (ipmiutil sunoem) ver 2.70 + ipicmg (ipmiutil picmg) ver 2.70 + ifirewall (ipmiutil firewall) ver 2.70 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.02 + idiscover (ipmiutil discover) ver 1.6 + ipmi_port (ipmi_port) ver 1.1 + +10/18/10 ARCress ipmiutil-2.7.1 changes + util/oem_intel.c - changed sensor reading strings slightly, + added decode_post_intel + util/isol.c - fix compile error on Solaris Sparc + util/icmd.c - added -d decimal option to match 'ipmitool raw' syntax + util/ievents.c - added decoding detail for NM Exception events, + added decode_post_oem to decode some OEM POST codes, + added fixup for peppercon genid, + added all other threshold strings + util/ireset.c - added -y option to persist boot device param + util/ipmidir.c - added SKIP_IO flag for ppc64 + util/ipmilan.c - ignore gethostbyname error if input is IP address + util/ipmicmd.c - use bcomma in show_outcome(), add stricmp for -F + util/oem_kontron.c - fix decode_sensor_kontron(PowerGood) + util/isensor.c - fix find_sdr_by_num() if last sdr + util/ilan.c - if sparc, set default ifname to eri0 + util/Makefile.am - use OS_LFLAGS for idiscover also if Solaris + doc/ireset.8 - describe -y option to persist boot device param + doc/install-solaris.sh - add mkdir -p $mandir + configure.in - set SKIP_IO flag if ppc64 or other arch, + check for /usr/sfw or /usr/local if Solaris, + set __SPARC__ flag if arch is sun4u + ipmiutil-2.7.1 contains: + ipmiutil (ipmiutil) ver 2.71 + ialarms (ipmiutil alarms) ver 2.71 + icmd (ipmiutil cmd) ver 2.71 + iconfig (ipmiutil config) ver 2.71 + ievents (ipmiutil events) ver 2.71 + ifru (ipmiutil fru) ver 2.71 + igetevent (ipmiutil getevt) ver 2.71 + ihealth (ipmiutil health) ver 2.71 + ilan (ipmiutil lan) ver 2.71 + ireset (ipmiutil reset) ver 2.71 + isel (ipmiutil sel) ver 2.71 + isensor (ipmiutil sensor) ver 2.71 + iserial (ipmiutil serial) ver 2.71 + isol (ipmiutil sol) ver 2.71 + iwdt (ipmiutil wdt) ver 2.71 + ifruset (ipmiutil ifruset) ver 2.71 + oem_sun (ipmiutil sunoem) ver 2.71 + ipicmg (ipmiutil picmg) ver 2.71 + ifirewall (ipmiutil firewall) ver 2.71 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.02 + idiscover (ipmiutil discover) ver 1.6 + ipmi_port (ipmi_port) ver 1.1 + +11/01/10 ARCress ipmiutil-2.7.2 changes + util/ifru.c - refine FruTypeString as Baseboard only if dev 0 + util/isel.c - add patch for bug 3091058 (SelAllocationInfo/Dell) + from Alexander Dupuy, + and protect against SelAllocationInfo errors + util/ipmiutil.c - init psubcmd = "" for usage message + util/ipmicmd.c - added ipmi_set_mymc, ipmi_get_mymc, added -Z + util/ipmicmd.h - added ipmi_set_mymc, ipmi_get_mymc + util/ipmimv.c - added SET_MY_ADDRESS in ipmi_open_mv() + util/ifru.c - added -Z to set mymc.sa + util/ifruset.c - added -Z to set mymc.sa + util/ilan.c - reuse existing sol_baud if valid & no -B param + util/ievents.c - handle event type 06 for PS Fans + util/ipmi_port.c - mkdaemon: set fdlimit=stderr + util/igetevent.c - mkdaemon: set fdlimit=stderr (fixes -b EBADF if mv), + use ipmiutil_asy.log filename if -a + util/ireset.c - fix chassis soft-shutdown for non-Intel to use cmd 0x05 + util/ipmiutil.c - add 'power' subcommand, same as 'reset' + test/unittest.sh - add ipmiutil sel -e + test/testipmi.sh - add ipmiutil sel -e + doc/Makefile.am - new, handle initto via @INIT_DIR@ + doc/ipmi_port.sh - if no /var/lock/subsys, use /var/run + doc/ipmiutil_asy - if no /var/lock/subsys, use /var/run, fix getpid + doc/ipmiutil_evt - if no /var/lock/subsys, use /var/run, fix getpid + doc/ipmiutil_wdt - if no /var/lock/subsys, use /var/run, use $wdtlog + doc/ipmi.init.basic - new, added for debian ipmi driver + beforeconf.sh - set ltver via --version, not rpm -q + configure.in - detect if Debian, detect INIT_DIR + debian/changelog - new, added for debian packaging + debian/control - new, added for debian packaging + debian/copyright - new, added for debian packaging + debian/dirs - new, added for debian packaging + debian/docs - new, added for debian packaging + debian/rules - new, added for debian packaging + ipmiutil-2.7.2 contains: + ipmiutil (ipmiutil) ver 2.72 + ialarms (ipmiutil alarms) ver 2.72 + icmd (ipmiutil cmd) ver 2.72 + iconfig (ipmiutil config) ver 2.72 + ievents (ipmiutil events) ver 2.72 + ifru (ipmiutil fru) ver 2.72 + igetevent (ipmiutil getevt) ver 2.72 + ihealth (ipmiutil health) ver 2.72 + ilan (ipmiutil lan) ver 2.72 + ireset (ipmiutil reset) ver 2.72 + isel (ipmiutil sel) ver 2.72 + isensor (ipmiutil sensor) ver 2.72 + iserial (ipmiutil serial) ver 2.72 + isol (ipmiutil sol) ver 2.72 + iwdt (ipmiutil wdt) ver 2.72 + ifruset (ipmiutil ifruset) ver 2.72 + oem_sun (ipmiutil sunoem) ver 2.72 + ipicmg (ipmiutil picmg) ver 2.72 + ifirewall (ipmiutil firewall) ver 2.72 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.02 + idiscover (ipmiutil discover) ver 1.6 + ipmi_port (ipmi_port) ver 1.2 + +12/16/10 ARCress ipmiutil-2.7.3 changes + util/ipmilan2.c - a stub of ipmilanplus.c without HAVE_LANPLUS + util/iekanalyzer.c - fix a compiler warning and lint error + util/isel.c - fix printf() syntax warning for Mandriva, + define decode_sel_entry() with return value, + fixup idxfile,idxfile2 if remote + util/ihpm.c - fix printf() syntax warning for Mandriva + util/ievents.c - fix printf() syntax warning for Mandriva, + added -t for full PET traps, + fix PET decoding for Sun OEM bytes, + adjust threshold description strings, + check for filename & decoding errors, + use fseek to fix file_grep(2) special case, + add size param to get_MemDesc, + add custom DIMM decoding for Intel S5500, + use snprintf to fix buf overflow in decode_sel_entry + util/igetevent.c - define decode_sel_entry() with return value, + fixup idxfile2 if remote + util/ifru.c - wart for Kontron 1-byte Version anomaly + util/ifruset.c - wart for Kontron 1-byte Version anomaly + util/ipmilipmi.c - new, for Solaris 8/9 lipmi driver + util/isensor.c - add sensor type 0x25 Entity Presence, + add call to decode_sensor_sun(), + change un-Recoverable threshold tag (nonrec -> unrec), + do not show separate reading error line unless fdebug, + but just show 'Unknown' by default + util/oem_sun.c - add decode_sensor_sun routine + util/oem_intel.c - added get_id_status_intel(), + check for NSW1U in detect_capab, + use raw command in check_bmctam_intel, + fixups to intel_s5500_post table + util/ialarms.c - call get_id_status_intel() if vendor=intel + util/mem_if.c - add Bank Locator string to get_MemDesc, + add size/presence to get_MemDesc + util/icmd.c - add 's' tag logic for -m + util/isol.c - change bKeepAlive from type 2 to 1 + util/ihealth.c - added get_health_oem/_supermicro + util/oem_supermicro.c - new, added + util/ipmilan.c - set fdoping=1 to help stuck BMCs + util/Makefile.am - added oem_supermicro.c + util/ipmiutil.mak - added oem_supermicro.obj + beforeconf.sh - fixed to libtoolize by default + configure.in - handle space in _topdir from Mandriva + Makefile.am - add mkdir -p $(SOURCEDIR) in make tarball + doc/ipmiutil.spec - updated package description + doc/ipmi.init.basic - include watchdog module, check if exists + debian/control - updated package description + ipmiutil-2.7.3 contains: + ipmiutil (ipmiutil) ver 2.73 + ialarms (ipmiutil alarms) ver 2.73 + icmd (ipmiutil cmd) ver 2.73 + iconfig (ipmiutil config) ver 2.73 + ievents (ipmiutil events) ver 2.73 + ifru (ipmiutil fru) ver 2.73 + igetevent (ipmiutil getevt) ver 2.73 + ihealth (ipmiutil health) ver 2.73 + ilan (ipmiutil lan) ver 2.73 + ireset (ipmiutil reset) ver 2.73 + isel (ipmiutil sel) ver 2.73 + isensor (ipmiutil sensor) ver 2.73 + iserial (ipmiutil serial) ver 2.73 + isol (ipmiutil sol) ver 2.73 + iwdt (ipmiutil wdt) ver 2.73 + ifruset (ipmiutil ifruset) ver 2.73 + oem_sun (ipmiutil sunoem) ver 2.73 + ipicmg (ipmiutil picmg) ver 2.73 + ifirewall (ipmiutil firewall) ver 2.73 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.02 + idiscover (ipmiutil discover) ver 1.6 + ipmi_port (ipmi_port) ver 1.2 + +02/09/11 ARCress ipmiutil-2.7.4 changes + Makefile.am - add 'make test' to run test/testipmi.sh, + restrict SUBDIRS if standalone + configure.in - restrict SUBDIRS if standalone + util/ipmidir.c - add debug output of Resp(netfn,cmd) + add lock file to ensure exclusive access to I/O + util/iconfig.c - add -m option to force setting BMC MAC, + fix to not SetUserEnable(1) if extra users. + util/ireset.c - do not set Intel S5500 systems for bridge agent method + util/ilan.c - fix GetPefRecord for bug 3163406 + util/iconfig.c - fix GetPefRecord also for bug 3163406 + util/isensor.c - allow defaults from sdr for -u via fill_thresholds, + fix to set threshold even if g_sa is HSC + util/igetevent.c - add -n to wait for events from a specific sensor number + util/mem_if.c - add get_SystemGuid to get GUID from SMBIOS + util/ifruset.c - use get_SystemGuid for GUID + util/ihealth.c - use get_SystemGuid for GUID + util/ifru.c - use get_SystemGuid for GUID, + add logic to follow child MCs if -f, + request admin if reading child FRUs + util/ifruset.c - request admin by default + util/icmd.c - auto-request admin priv if bridging to child MC SA + util/ipmimv.c - set exit(rv) if TEST_BIN/ALONE + util/ievents.c - use GetSensorType() if fPET and no sensor file + util/isensor.c - ignore sensor reading state bits 0xC0 (was OK*, now valid), + added -q to output Thresh in ::::: fmt + doc/ipmi.init.basic - refine start/stop output + doc/UserGuide - added more to SOL section 4.8 + doc/ipmiutil.spec - use sensor -q for sensor_out.txt + doc/install-solaris.sh - use sensor -q for sensor_out.txt + doc/ipmi_port.sh - use sensor -q for sensor_out.txt + doc/init.sh - use sensor -q for sensor_out.txt + debian/postinst - new, do sensor -q for sensor_out.txt + added some files from tarball to svn trunk: + doc/idiscover.8 + doc/ifruset.8 + doc/install-solaris.sh + doc/ipmi_port.8 + doc/ipmiutil_evt + doc/ipmiutil_wdt.cmd + lib/lanplus/inc/ipmitool/ipmi_cc.h + lib/lanplus/inc/ipmitool/ipmi_hpmfwupg.h + lib/lanplus/inc/ipmitool/ipmi_kontronoem.h + lib/lanplus/Makefile.am + util/oem_supermicro.c + debian/postinst + ipmiutil-2.7.4 contains: + ipmiutil (ipmiutil) ver 2.74 + ialarms (ipmiutil alarms) ver 2.74 + icmd (ipmiutil cmd) ver 2.74 + iconfig (ipmiutil config) ver 2.74 + ievents (ipmiutil events) ver 2.74 + ifru (ipmiutil fru) ver 2.74 + igetevent (ipmiutil getevt) ver 2.74 + ihealth (ipmiutil health) ver 2.74 + ilan (ipmiutil lan) ver 2.74 + ireset (ipmiutil reset) ver 2.74 + isel (ipmiutil sel) ver 2.74 + isensor (ipmiutil sensor) ver 2.74 + iserial (ipmiutil serial) ver 2.74 + isol (ipmiutil sol) ver 2.74 + iwdt (ipmiutil wdt) ver 2.74 + ifruset (ipmiutil ifruset) ver 2.74 + oem_sun (ipmiutil sunoem) ver 2.74 + ipicmg (ipmiutil picmg) ver 2.74 + ifirewall (ipmiutil firewall) ver 2.74 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.02 + idiscover (ipmiutil discover) ver 1.6 + ipmi_port (ipmi_port) ver 1.2 + +04/04/11 ARCress ipmiutil-2.7.5 changes + util/ifru.c - fixed logic to follow child MCs with -e or -f, + include -r to restore fru from ifruset.c, + check for overflow in sdr loop with idstr + util/iwdt.c - add -q to set a specific pretimeout value (-p sets 90%) + util/mem_if.c - detect properly if SMBIOS has 16-byte register spacing + util/ilan.c - use GetPefCapabilities to set pefmax, + use float to show arp interval, + set LanParam 4 (IPsrc) before LanParam 3 (IPaddr), + handle if GetLanEntry returns ok but zero data + util/iconfig.c - use GetPefCapabilities to set pefmax, + turn off GratArp and set IPsrc before setting IP, + skip serial users if no serial channel, + skip optional serial params if errors, + handle if GetLanEntry returns ok but zero data + util/ihealth.c - added Intel S1200, S2600 board info, + show BMC extra version info for Kontron, + added IANA for NAT + util/ievents.c - use utc2local in fmt_time() + util/isensor.c - cosmetic changes in RawToFloat(), + added -e (same as -b) to follow child MCs + util/isol.c - increased -i filename size from 40 to 80 + util/isel.c - find_msg_sev() detects severity for syslog messages + util/ialarms.c - show up to 8 disk LEDs (previously 6) + util/oem_intel.c - detect_capab_intel: return max# disks based on product ID + util/idiscover.c - add -m option for raw packets to display MAC addrs + util/ireset.c - only set boot opts if not default device + util/ipmilan.c - try MD2 or NONE if default auth type not allowed. + util/ipmidir.c - allow set_max_kcs_loops for BSD also + util/ipmicmd.c - do set_max_kcs_loops for BSD also + util/ipmicmd.h - define set_max_kcs_loops for BSD also + util/ipmiutil.mak - add ipmi_sample.exe to TARG_EXE + util/ihpm.c - fixed percent to display dots during upgrade, + added more debug messages + doc/ipmi.init.basic - added comments + doc/iwdt.8 - include -q description + doc/idiscover.8 - include -m description + doc/ifru.8 - include -e description + doc/isensor.8 - include -e description + doc/UserGuide - updated Windows install instructions wrt drivers, + updated section 4.2 with new sample output, + updated section 4.8 SOL Upstart instructions, + updated man pages + ipmiutil-2.7.5 contains: + ipmiutil (ipmiutil) ver 2.75 + ...(various subcommands) ver 2.75 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.02 + idiscover (ipmiutil discover) ver 1.7 + ipmi_port (ipmi_port) ver 1.2 + +05/09/11 ARCress ipmiutil-2.7.6 changes + util/isensor.c - show Thresholds based on readable (not settable) bits, + handle unit type bit for percent + util/ipmilan.c - add ipmi_lan_set_timeout() + util/icmd.c - add -t to set lan timeout + util/igetevent.c - add SmsOs func 3 to send NMI + util/oem_kontron.c - added ktc5520_post decoding + util/ievents.c - added more GenID decoding + util/ipmicmd.c - added my_devid defaults + util/mem_if.c - added debug messages + util/oem_intel.c - fixup for Relay bits on CG2100 + util/isel.c - allow filtering by severity with -s + util/ipmi_port.c - cleanup syntax warnings + util/ilan.c - add support for VLAN/Cipher params + util/iconfig.c - add support for VLAN/Cipher params + doc/isel.8 - change to document -s + util/ipmims.cpp - fix for WIN64-unsafe logic from Jay Krell + cleaned up compile warnings flagged by Jay Krell in: + igetevent.c, imbapi.c, ipmims.cpp, ievents.c, ifru.c, mem_if.c, + ievents.c, ifirewall.c, igetevent.c, oem_kontron.c/.h + cleaned up WIN64 /W3 compile warnings in util/*.c + util/ipmiutil2.mak - updates + util/mem_if_cpp.cpp - new, wrapper for build.exe, includes mem_if.c + test/retro.sh - new, retrofit subcommand naming for pre-2.6.0 scripts + ipmiutil-2.7.6 contains: + ipmiutil (ipmiutil) ver 2.76 + ...(various subcommands) ver 2.76 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.02 + idiscover (ipmiutil discover) ver 1.7 + ipmi_port (ipmi_port) ver 1.3 + +06/06/11 ARCress ipmiutil-2.7.7 changes + util/oem_intel.c - move Aborting message out for BMC TAM + util/ialarms.c - move Aborting message in for BMC TAM + util/ifru.c - fixed bug with -a and not -b (introduced in 2.7.5), + util/icmd.c - add -k to check IPMI access, driver type + util/ipmicmd.h - added CMD_GET_SESSION_INFO + util/ihealth.c - add get_session_info for -s (use -l for lan stats) + util/ipmi_port.c - added signal init + util/igetevent.c - added signal init + util/ilan.c - send snmp error message to stdout, not stderr + util/iconfig.c - send snmp error message to stdout, not stderr + doc/ihealth.8 - document -s, -l options + doc/ipmiutil.spec - description update, added gcc/gcc-c++ to BuildRequires + doc/ipmi_port.sh - $localfs -> $local_fs + doc/ipmiutil_asy - $remotefs -> $remote_fs, use cmd -k to detect driver + doc/ipmiutil_evt - $remotefs -> $remote_fs, use cmd -k to detect driver + doc/ipmiutil_wdt - $remotefs -> $remote_fs, use cmd -k to detect driver + doc/UserGuide - resync'd with man pages + test/unittest.sh - allow getevt timeout to count as success + Makefile.am - enforce UserGuide permissions in make tarball + configure.in - for WRL, enforce -DSKIP_MD2 + ipmiutil-2.7.7 contains: + ipmiutil (ipmiutil) ver 2.77 + ...(various subcommands) ver 2.77 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.02 + idiscover (ipmiutil discover) ver 1.7 + ipmi_port (ipmi_port) ver 1.4 + +09/13/11 ARCress ipmiutil-2.7.8 changes + util/iwdt.c - check for pretime >max 255 & set to 255. + util/ilan.c - show Intel IPv6 params, include set MAC addr with -D, + add ngood counter, call find_ifname, + add -f to set arp_ctl + util/iconfig.c - add ngood counter, call find_ifname, + skip errors if optional SetPef(9), SetUserName(same) + util/ireset.c - cleanup of usage message + util/isel.c - check & fix if vsize reports 0 + util/ialarms.c - added ALONE compile flag + util/ievents.c - added decode_sel_intel for PCIe AER events, + added decode_mem_intel for DIMMs if remote + util/oem_intel.c - added decode_sel_intel for PCIe AER events, + added decode_mem_intel for DIMMs + util/isensor.c - added -o to output memory DIMM info, sdr getall=ffff + util/igetevent.c - added write_syslog when exiting + util/idiscover.c - added find_ifname() + util/ipicmg.c - updated with PICMG 2.3 + util/ipmicmd.c - clear driver type in ipmi_close_() + util/ipmilan.c - moved some subroutines to subs.c, + added ipv6 support - thanks Rajaganesh87 + util/ipmilan.h - increased RQ_LEN_MAX from 25 to 200 + util/ipmilanplus.c - moved some subroutines to subs.c + util/subs.c - new, consolidate subroutines from other *.c files + util/oem_dell.c - new, Dell OEM functions + util/oem_dell.h - new, Dell OEM functions + util/ipmiutil.c - added delloem reference + util/ipmiutil.h - added delloem reference + util/Makefile.am - add oem_dell + util/ipmiutil.mak - add oem_dell + util/ihpm.c - updated to v1.08 + util/ipmidir.c - return error if data len > DATA_BUF_SIZE (was truncate) + util/ipmidir.h - increase DATA_BUF_SIZE from 64 to 255 (IPMI_REQBUF_SIZE) + util/ipmi*.c/.h - changed ipmi_cmd*(uchar sdata -> int sdata) + util/itsol.c - new, for Tyan SOL + util/itsol.h - new, for Tyan SOL + util/ihealth.c - added WinBond/SuperMicro X8SIL + util/oem_supermicro.c - added more SuperMicro functions + util/isol.c - use kontron sol_send max = 74, default others to 45. + util/ifru.c - fixed fault with -a if asset present in non-baseboard + lib/lanplus/helper.c - moved some subroutines to subs.c + lib/lanplus/lanplus.c - added ipv6 support - thanks Rajaganesh87 + test/testipmi.sh - fixed getevt success check via runcmdr + doc/ilan.8 - more description for -d + doc/ireset.8 - cosmetic cleanup + doc/isensor.8 - added -o description + doc/idelloem.8 - new, document Dell OEM functions + doc/UserGuide - sync'd with current man pages + doc/ipmiutil_asy.service - new, systemd service for ipmiutil_asy + doc/ipmiutil_evt.service - new, systemd service for ipmiutil_evt + doc/ipmiutil_wdt.service - new, systemd service for ipmiutil_wdt + doc/ipmi_port.service - new, systemd service for ipmi_port + doc/ipmiutil.env - new, environment for ipmiutil systemd + doc/ipmiutil.pre - new, preinstall for ipmiutil systemd + doc/ipmiutil.setup - new, setup for ipmiutil ipmi_port systemd + doc/ipmiutil.spec - added systemd scripts, idelloem.8 + doc/Makefile.am - added systemd scripts, idelloem.8 + hpiutil/hpiutil.spec - updated version to 1.1.11, updated header syntax + hpiutil/hpiinit.sh - use /var/run if /var/lock/subsys does not exist + fixes bug# 3400659 + ipmiutil-2.7.8 contains: + ipmiutil (ipmiutil) ver 2.78 + ...(various subcommands) ver 2.78 + oem_dell (ipmiutil delloem) ver 2.78 + itsol (ipmiutil tsol) ver 2.78 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.08 + idiscover (ipmiutil discover) ver 1.8 + ipmi_port (ipmi_port) ver 1.4 + +10/04/11 ARCress ipmiutil-2.7.9 changes + util/isensor.c - check for DIMM disabled bit 0x0100, + add sensor type 0x28 for MC Health, + fix RawToFloat for ARM cross-compiler + util/ilan.c - show param 102 better for S2600CP with -c + util/oem_supermicro.c - add return(rv) at line 182 to fix compile warning + util/oem_dell.c - fix data size to 10 in CheckSetLEDSupport + util/ipmilan.c - resolve compiler warnings, + add #if CROSS_COMPILE for gethostbyname + util/idiscover.c - add #if CROSS_COMPILE for gethostbyaddr + util/subs.c - resolve compiler warnings + util/ievents.c - move Intel DIMM code to decode_mem_intel, + added BMC Drive Slot event decoding if not HSC + util/oem_intel.c - add more to decode_mem_intel, + add is_thurley(), is_romley(), is_lan2intel() + util/ilan.c - add Romley IDs to S2600, skip PEF if disabled, + preferred SOL baud 115200 + util/isol.c - use is_lan2intel() for lan2i method + util/ipmicmd.c - show invalid -F string in error message + util/ipmilanplus.c - use is_lan2intel() in ipmi_oem_active() + lib/lanplus/lanplus.c - resolve compiler warning + doc/checksel - also save a copy of the SEL in /var/lib/ipmiutil + doc/Makefile.am - do not make *.service files executable + configure.in - separate two sed -i subst's if MontaVista, + add static/CROSS_COMPILE if --host=xxx, e.g. ARM + INSTALL - add build instructions for ARM + ipmiutil-2.7.9 contains: + ipmiutil (ipmiutil) ver 2.79 + ...(various subcommands) ver 2.79 + oem_dell (ipmiutil delloem) ver 2.79 + itsol (ipmiutil tsol) ver 2.79 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.08 + idiscover (ipmiutil discover) ver 1.8 + ipmi_port (ipmi_port) ver 1.4 + +10/28/11 ARCress ipmiutil-2.7.9-2 changes (patched) + util/isensor.c - fix Therm Margin reading bug 3429298 from 2.7.9, + +11/10/11 ARCress ipmiutil-2.7.9-3 changes (patched) + doc/ipmiutil.spec - copy checksel to cron.daily only if IPMI is enabled + which fixes RH bug #752319 + doc/checksel - do nothing if IPMI SEL is not enabled + doc/Makefile.am - do not auto-install checksel into cron.daily + doc/Makefile.in - do not auto-install checksel into cron.daily + doc/Makefile - do not auto-install checksel into cron.daily + +12/16/11 ARCress ipmiutil-2.8.0 changes + util/iconfig.c - use enabled_users instead of max_users for SOL. + util/ievents.c - interpret Proc Config events if 0x83, + add fcanonical output, + handle more discrete Temp events for Romley, + fix b3 error in Memory DIMM decoding, + fix threshs string if -p + util/ilan.c - fix PefDesc for strcat, (fixes RH bug#804723) + bounds check GetPefCapabilities, + increase MAXPEF to 41 for Dell PE 1950, + use bmcsubnet by default if not user-specified, + skip SOL baud if Intel Romley, + add -K to set Kontron IPMI hostname + util/ipmicmd.c - more bounds checking in set_lan_options + util/ipmicmd.h - comment headers for set_lan_options, etc. + util/isensor.c - fix Therm Margin reading bug 3429298 from 2.7.9, + compare both num & sa before setting thresholds, + add Romley HSBP sensor interpretations, + document -q option in usage, + add call to decode_sensor_supermicro + util/isel.c - add -n for nominal/canonical output format + util/subs.c - added str2uchar, atob routines with error msgs + util/ihealth.c - added Supermicro X9SCA product id decoding, + added special Kontron FW version cmd + util/ipmicmd.c/h - change get_node to get_nodename + util/*.c - converted strtol/atoi to atob if one-byte result + util/oem_supermicro.c - add decode_sensor_/decode_sel_supermicro() + util/ihpm.c - handle if Activation compcode==0xD5 + util/idcmi.c - new, for DCMI commands + util/idcmi.h - new, for DCMI commands + util/Makefile.sample - new, for ipmiutil-devel + util/Makefile.am - changes to install ipmiutil-devel files, + do not include lanplus in libipmiutil by default + util/iconfig.c - do not call atob if beyond ':' + util/subs.c - fix str2uchar for 08,09., + fix lprintf to use fplog if fdbglog + util/isol.c - send chassis soft reset for ctl+alt+del (~D) + util/ievents.h - new, define public routines + util/ipmilan.c - handle recvfrom errors better if bad MC stack + util/oem_sun.c - remove extra usage message if error + util/itsol.c - handle Windows compile warnings + doc/isensor.8 - add -q option to show thresholds in d:d:d format + doc/ilan.8 - document -K for hostname, etc. + doc/ipmiutil.spec - copy checksel to cron.daily only if IPMI is enabled + which fixes RH bug #752319, + changed Summary line, + added libtool to BuildRequires:, + added ipmiutil-devel package files + doc/Makefile.am - do not auto-install checksel into cron.daily + doc/checksel - do nothing if IPMI SEL is not enabled + doc/install.cmd - changed install path + doc/uninstall.cmd - changed install path + doc/install.vbs - new, for MSI package + doc/uninstall.vbs - new, for MSI package + debian/postinst - copy checksel only if IPMI is enabled + debian/control - changes to description + debian/prerm - remove checksel if present in /etc/cron.daily + doc/UserGuide - added section 8.x for building ipmiutil, + moved Related Information to section 9 + test/testipmi.sh - skip serial tests if not supported + test/unittest.sh - add Memory DIMM event decoding tests + util/ipmi_sample.mak - new, makefile for ipmi_sample.exe + buildsamp.cmd - new, script to build ipmi_sample.exe + configure.in - add --enable-liblanplus parameter + ipmiutil-2.8.0 contains: + ipmiutil (ipmiutil) ver 2.80 + ...(various subcommands) ver 2.80 + idcmi (ipmiutil dcmi) ver 2.80 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.8 + ipmi_port (ipmi_port) ver 1.4 + +02/10/2012 ARCress ipmiutil-2.8.1 changes + util/isensor.c - GetSensorReading: include channel/bus for ME, + use isensor.h, + added decode_entity_id() if -t, + handle CritInterrupt 0x0A,0x0B, + handle HP, Sun returning 0xD4 for fdevsdrs + util/ihealth.c - change format of ME firmware version, + add Quanta S99Q vendor/product interpretation, + added system_info command data, + added list of IPMI LAN channels + util/ipmicmd.c - if DRV_MV, do not use ipmi_cmd_ipmb for ME + util/ipmidir.c - include bus in ProcessMessage (for ME) + util/iconfig.c - show extra LanParam IP address comment, + add lan_failover, system_info as SystemParams, + cleanup some clutter + util/idcmi.c - add get_power_read*, set_power_limit* routines + from Rajaganesh87, + add support for dcmi_get_sensor_info, + add dcmi_set_asset_tag, dcmi_set_mc_id, + util/isensor.h - new, common sensor subroutine definitions + util/oem_sun.c - use isensor.h + util/oem_dell.c - use isensor.h, + applied 01-powermonitor-bigendian.patch + already included 02-fix-overflow.patch + applied 03-delloem-help.patch + util/oem_intel.c - add decode_sensor_intel_nm for ME NM sensors, + add lan_failover_intel() routine + util/oem_quanta.c - add interpretation for Quanta S99Q OEM sensor/sel + util/oem_supermicro.c - add decoding for CPU Overheat deassert events + util/ifru.c - for Dell BMC, allow scan with user privilege, + for Dell R415, add 6-bit ASCI decoding, + fixed fdevsdrs mismatch for Dell R610 + util/ipmilan.c - add get_rand() for init_out_seq, + handle if per-message auth disabled (Dell PE R415) + util/ilan.c - add lan_failover_intel if -y + util/ievents.c - add -o to specify vendor IANA ID + util/iserial.c - limit show_users to 5 to avoid 0xCC warnings + doc/ihealth.8 - added -mnopq descriptions + doc/ilan.8 - added -y description + doc/itsol.8 - new + doc/idcmi.8 - new + doc/UserGuide - updated man pages + test/testipmi.sh - copy PASS/FAIL messages in output log + configure.in - use --libdir= option for cross-compiles, + fix PKG_DIR for openSuSE 12 + ipmiutil-2.8.1 contains: + ipmiutil (ipmiutil) ver 2.81 + ...(various subcommands) ver 2.81 + idcmi (ipmiutil dcmi) ver 2.81 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.8 + ipmi_port (ipmi_port) ver 1.4 + +03/12/2012 ARCress ipmiutil-2.8.2 changes + doc/* - moved scripts from here + scripts/* - moved scripts to here + scripts/Makefile.am - new, for script handling + scripts/ipmiutil_asy - use -b instead of -t0 + scripts/ipmiutil_asy.service - use -b instead of -t0 + doc/Makefile.am - remove script handling + doc/isensor.8 - added 'Typ' header description + doc/ipmiutil.spec - use systemd scripts if systemctl, and + use SYSV init scripts otherwise (RH bug 789702), + move ipmiutil from /usr/sbin to /usr/bin, + add %req_systemd and --enable-systemd for suse + util/ipmiva.c - removed, obsolete valinux driver + util/ipmiva.h - removed, obsolete valinux driver + util/ipmi_ioctls.h - removed, obsolete valinux driver + util/ipmignu.c - removed, obsolete libfreeipmi interface code + util/Makefile.am - remove ipmiva.c, ipmignu.c drivers, + move ipmiutil from /usr/sbin to /usr/bin + util/ievents.c - handle deassert/ok for discrete Battery Fail + util/oem_hp.c - new, add decode_sensor_hp for discrete readings + on HP ProLiant servers + util/isensor.c - call decode_sensor_hp if vendor==HP + util/ipmicmd.c - removed valinux, libfreeipmi from messages + util/oem_kontron.c - fix get_fru_area_str NULL pointer check + util/oem_intel.c - add more Romley product IDs and descriptions + fixes bug# 3497948, + added logic to enc_leds_intel routines for Romley + util/ihealth.c - use intel_romley_desc for Romley descriptions + util/ialarms.c - added -f option to turn off all disk leds + lib/lanplus/lanplus.c - fix bridged lanplus session close failures + freeipmi/* - removed unused files + configure.in - handle scripts subdir, remove va/gnu, + handle if %_initrddir does not exist, + add enable-systemd parameter, installs %_unitdir + ipmiutil-2.8.2 contains: + ipmiutil (ipmiutil) ver 2.82 + ...(various subcommands) ver 2.82 + idcmi (ipmiutil dcmi) ver 2.82 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.8 + ipmi_port (ipmi_port) ver 1.4 + +04/23/2012 ARCress ipmiutil-2.8.3 changes + util/oem_intel.c - fix Romley DIMM decoding with intel_mem_s2600, + add Version Change event OEM detail, + added get_power_restore_delay_intel() + util/ilan.c - additional safeguards in PefDesc, + fix setting PEF/Alert (introduced in 2.7.9), + use previous dest mac if not resolved. + util/ihealth.c - added error cases with decode_selftest, + format romley prodstr with (), + fix #3516915 with more chassis status decoding, + added call to get_power_restore_delay_intel + util/ipmilan.c - handle some compile warnings + util/ievents.c - change some NMFW/ME event descriptions + util/isensor.c - show Entity ID if -v (but not -t), + move Dell Discrete Voltage to oem_dell.c to fix + Romley VR Watchdog, + added get_sdr_file routine for ipmi_sample2 + util/oem_dell.c - fix #3514908 powerconsumption cannot find error, + added decode_sel_dell() merged from patches by + Srinivas_G_Gowda, + fix #3514925 LOM MAC display error, + added getled function to read ID LED, + util/oem_newisys.c - new, decode_sel_newisys() + util/oem_kontron.c - added sensor types 0x70, 0x71 + util/ipmi_sample.c - v0.4, added GET_SENSORS case + util/ireset.c - add -k for ColdReset, -m for MC, use -v for DVD/CD + util/Makefile.am - added GET_SENSORS case for ipmi_sample2 + util/ipmiutil.mak - added GET_SENSORS case for ipmi_sample2 + util/imbapi.c - reduce MAX_RETRIES from 3 to 2, do ipmb for ME_BUS + util/ilan.c - added GetFirstIP for WIN32 + util/idiscover.c - call GetFirstIP for WIN32 if -a + util/AnsiTerm.cpp - default AutoWrap = true in ResetTerm + doc/ireset.8 - document -k, -m, -v + doc/idiscover.8 - document -a defaults better + doc/UserGuide - resync with man pages + doc/ipmiutil.spec - skip chkconfig if systemd + debian/prerm - remove /etc/cron.daily/checksel if present + configure.in - fix error checking for PKG_DIR + ipmiutil-2.8.3 contains: + ipmiutil (ipmiutil) ver 2.83 + ...(various subcommands) ver 2.83 + idcmi (ipmiutil dcmi) ver 2.83 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.9 + ipmi_port (ipmi_port) ver 1.4 + +06/13/2012 ARCress ipmiutil-2.8.4 changes + configure.in - detect HP-UX and set compile options, + check for ltmain.sh, else beforeconf.sh + util/*.c - #ifdef HPUX, skip getopt since it is in stdio.h, + handle DLPI for HPUX instead of SIOC. + TODO: We need someone to test this on HPUX. + util/ilan.c - prioritize existing Dest IP if not using -A, + default to arp_ctl 0x03 if Intel Romley + util/idcmi.c - fix rlen, argc, priv for bug#3523229 (DCMI 1.1) + fix activate param check for bug#3526523 + util/ihealth.c - move _sysinfo routines from here, + call get_hsbp_version_intel if Romley + util/subs.c - move _sysinfo routines to here + util/ipmicmd.c - add -Fibm option + util/ipmilan.c - if -Fibm, do not get_rand for init_out_seq + util/ireset.c - set OEM boot option if HP for bug#3527355, + add -i/-j for boot initiator mailbox string + fix printf bug #3534551 + util/ifru.c - refine calculation for Mfg DateTime + util/ievents.c - add Intel CATERR decoding + util/oem_dell.c - merged 01-powermonitor-bigendian.patch, + merged 03-delloem-help.patch, + fix debug printf at line 4289 by adding %x + util/Makefile.am - build ipmi_sample2 with sensor,fru,sel + install ipmicmd.h into $(includedir), + use $objdir to fix parallel build bug 3523822, + add LANPLUS_LIB to dependencies + doc/UserGuide, doc/*.8 - reflect that cipher suites are 0 thru 17 + doc/ireset.8 - added -i/-j descriptions + doc/ipmiutil.spec - devel virtually provides static, + devel ipmicmd.h into %_includedir + doc/rh_spec.patch - new, customize spec file for Red Hat bug#818910 + ipmiutil-2.8.4 contains: + ipmiutil (ipmiutil) ver 2.84 + ...(various subcommands) ver 2.84 + idcmi (ipmiutil dcmi) ver 2.84 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.9 + ipmi_port (ipmi_port) ver 1.4 + +08/13/2012 ARCress ipmiutil-2.8.5 changes + util/oem_dell.c - add 'static void' to ipmi_delloem_getled_usage() + util/idcmi.c - fixes for bug#3526523 + util/ipmicmd.h - define Cisco IANA number + util/subs.c - include Cisco in manufacturers list + util/ihealth.c - handle Cisco get_chan_auth bug#3535196, + change to 'Sec Operating System' in sysinfo + util/ifru.c - change to 'Sec Operating System' in sysinfo + util/mem_if.c - add get_Chassis_Sernum() + util/ilan.c - add '-L list' show_chans function + util/oem_intel.c - set to 4 disk LEDs if CG1200 + util/imbapi.c - fixed rsp offset for ipmb bridged cmds + util/isensor.c - fixed module presence sensor decoding + util/ievents.c - simplify redundancy & presence decoding, + add board presence decoding, + decode Intel OEM PCI bus:dev:func data + lib/lanplus/lanplus.c - fixed 2 possible memory leaks, + patch contributed by Oliver Stoneberg + doc/ilan.8 - mention RMM chan 3, add -L list description + scripts/checksel - fix /usr/sbin to /usr/bin for bug#3538998 + debian/dirs, postinst - fix /usr/sbin to /usr/bin for binary + buildwin.cmd - cleanup, simplify Windows build (Oliver Stoneberg) + buildwin2.cmd - cleanup, simplify Windows build + buildsamp.cmd - cleanup, simplify Windows build + cleanwin.cmd - cleanup, simplify Windows build + lib/ipmilib.mak - cleanup, simplify Windows build + lib/lanplus/ipmiplus.mak - cleanup, simplify Windows build + util/ipmiutil.mak - cleanup, simplify Windows build (Oliver Stoneberg) + util/ipmiutil2.mak - cleanup, simplify Windows build + util/ipmi_sample.mak - cleanup, simplify Windows build + util/igetevents.c - skip mkdaemon if ppid==1 + util/ilan.c - fix bug #3554862 for IBM non-conformance + configure.in - set CFLAGS if --enable-systemd + ipmiutil-2.8.5 contains: + ipmiutil (ipmiutil) ver 2.85 + ...(various subcommands) ver 2.85 + idcmi (ipmiutil dcmi) ver 2.85 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.9 + ipmi_port (ipmi_port) ver 1.4 + +10/08/2012 ARCress ipmiutil-2.8.6 changes + doc/ipmiutil.spec - added F18 systemd macros + test/ipmievt.sh - get fresh sensor readings before calculations + util/ievents.c - added -n to generate a New platform event, + added SENSORS_OK flag for ipmi_sample_evt + util/isensor.c - show correct sensor type for EvtOnly sensors + util/oem_intel.c - dont get disk LEDs if Intel TSRMT2, + remove 'Fatal' from AER descriptions, + added a few more S5000 POST code descriptions + util/igetevents.c - ppid==1 in mkdaemon is ok + util/ihealth.c - show Romley BMC build version + util/oem_dell.c - added 'passwordpolicy' command for Dell C6220 + util/ipmi_sample_evt.c - new, sample app to get events + util/isel.c - moved syslog routines to subs.c + util/subs.c - inserted syslog routines + util/isol.c - add -n option for payload instance number + util/imbapi.c - only include DllMain if IMBDLL flag + util/ialarms.c - added TEST_ENC compile flag for ialarms_enc, + fixed case for old Intel/NSC TIGPT1U + util/Makefile.am - add ipmi_sample_evt, ialarms_enc + util/Makefile.sample - add ipmi_sample_evt + util/ipmi_sample.mak - add ipmi_sample_evt.exe + util/ipmiutil.mak - add ipmi_sample_evt.exe, ipmiutillib.dll + util/ipmiutil2.mak - add ipmi_sample_evt.exe + util/ipmiutillib.def - new, for ipmiutillib.dll + ipmiutil-2.8.6 contains: + ipmiutil (ipmiutil) ver 2.86 + ...(various subcommands) ver 2.86 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.9 + ipmi_port (ipmi_port) ver 1.4 + +12/13/2012 ARCress ipmiutil-2.8.7 changes + Always compile Windows with Visual Studio (fixes bug#3592308) + scripts/ipmi_info - new, to set IPMI System Info if supported + scripts/Makefile.am - added ipmi_info + doc/ipmiutil.spec - added ipmi_info + util/ipmims.cpp - fix memory leak + lib/lanplus/lanplus.c - if HP, don't build any v1.5 commands + util/ipmilanplus.c - add hp case to ipmi_oem_active() + configure.in - fixup for HP-UX case + util/isol.c - add -k for keepalive timeout + util/isensor.c - revised output format for -c + util/ipmilanplus.c - fix keepalive data_len in Windows (#3592308) + util/ialarms.c - add -e to skip disk enclosure LEDs + util/oem_intel.c - add rcmd method for Romley disk LEDs + ipmiutil-2.8.7 contains: + ipmiutil (ipmiutil) ver 2.87 + +12/17/2012 ARCress ipmiutil-2.8.7 changes + doc/ipmiutil.spec - fixed ipmi_info/init typo + +02/05/2013 ARCress ipmiutil-2.8.8 changes + util/ihealth.c - caveats for VENDOR_SUPERMICROX, product X8SIU + util/ilan.c - caveats for VENDOR_SUPERMICROX + util/iconfig.c - caveats for VENDOR_SUPERMICROX + util/iserial.c - caveats for VENDOR_SUPERMICROX + util/isensor.c - caveat if sensor reading not present + util/oem_supermicro.c - added Power Supply sensor status + util/isel.c - show record id if compcode = 0xcb + util/ireset.c - added EFI compile flags + util/ievents.c - handle fake SMS_OS threshold events + util/ipmiutil64.mak - NEW, for Win x64 builds + lan/lanplus/lanplus.c - remove asserts + lan/lanplus/lanplus_crypt.c - x64 HMAC tweaks and remove asserts + lan/lanplus/lanplus_crypt_impl.c - handle x64 types in lanplus_HMAC + doc/UserGuide - add 'Run as administrator' note in 5.1 Win Install + buildwin.cmd - detect if VC is Win x64 and use ipmiutil64.mak + test/unittest.cmd - NEW, ipmiutil unit test for Windows + ipmiutil-2.8.8 contains: + ipmiutil (ipmiutil) ver 2.88 + +04/08/2013 ARCress ipmiutil-2.9.0 changes + util/ihealth.c - set SuperMicro product 0x60B to 'X8SIA', + added 0x0705 as 'X9DR7' + util/ilan.c - dont show extra dest params if invalid, IP dots, + add interpretation for Cipher Suites + util/ipmicmd.c - update Solaris driver message for lipmi + util/ipmi_sample.c - added GetSensorReading sample logic, + added -l option for looping on sensor readings, + added -f option to iterate on node list + util/isensor.h - added decode_comp_reading + util/ipmilan.c - added ipmi_flush_lan, handle multiple opens, + added busy_tries for Node Busy error + util/ipmilan.h - added ipmi_flush_lan + util/ipmilanplus.c - added LAN2_STRUCT for multiple opens, + added open logic to close first if new nodename. + lan/lanplus/lanplus.c - ipmi_req_entries=NULL in ipmi_req_clear_entries + buildwin.cmd - cosmetic findstr change + buildwin2.cmd - updated for Win x64 builds (without lanplus) + util/ipmiutil.mak - cosmetic change + util/ipmiutil64.mak - cosmetic change + util/ipmiutil2.mak - updated for sample builds, clarity + util/ipmiutil2-64.mak - NEW, for Win x64 builds + util/ipmi_sample.mak - added MARCH for IX86 or X64 + util/ievents.c - add decode_mem_supermicro call, + handle parse_lan_options better. + util/oem_supermicro.h - new, supermicro routines + util/oem_supermicro.c - update decode_sel_supermicro, + added decode_mem_supermicro, + added i_smcoem, ipmi_smcoem_main + util/ipmiutil.c - added i_smcoem + util/ipmiutil.h - added i_smcoem + util/iseltime.c - new, show/sync system time and SEL time + util/subs.c - added strlen_() wrapper for compile warnings + util/ipmicmd.h - added strlen_() + util/Makefile.am - add iseltime, set LD_SAMX for libipmiutil.a + configure.in - build libipmiutil with lanplus by default + doc/iseltime.8 - new, man page for iseltime + doc/ismcoem.8 - new, man page for ismcoem + doc/UserGuide - updated Windows file list in section 5.0, + add iseltime man page + doc/ipmiutil.spec - add autoconf to %build for aarch64/ARM64 bug 925593 + ipmiutil-2.9.0 contains: + ipmiutil (ipmiutil) ver 2.90 + ...(various subcommands) ver 2.90 + iseltime (iseltime) ver 2.90 + ismcoem (ipmiutil smcoem) ver 2.90 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.9 + ipmi_port (ipmi_port) ver 1.4 + +05/15/2013 ARCress ipmiutil-2.9.1 changes + configure.in - changes to support MACOS, HAVE_SOCKLEN_T + lib/lanplus/lanplus_defs.h - changes for HAVE_SOCKLEN_T for MACOS + lib/lanplus/lanplus.c - #ifdef MACOS + util/*.c - getopt includes for MACOS, other MACOS ifdefs + util/isel.c - change header if -n/-c, move delete/clear from -c to -d, + add -u to use UTC sel times. + util/ievent.c - define header string if -n, add format_event(), + handle fcanonical uniformly + util/ipmi_sample.c - changed nsec from 5 to 10 by default, added -i + util/ipmiutil.mak - build ipmi_sample2.exe by default + util/ipmiutil64.mak - build ipmi_sample2.exe by default + util/ihealth.c - add better HP product code names (feat#6) + util/ifru.c - handle DDR3 format SPD data + util/igetevent.c - use offset 3 for sel_time + util/oem_dell.c - some cleanup, reorder ActiveLOM_Strings + util/oem_*.c - call format_event to handle fcanonical uniformly + util/isensor.c - fix parse_idx for 3 hex digits from -i, + add -j to Jumpstart SDR cache from file + util/ihealth.c - add 2 more SuperMicro product ids + util/oem_supermicro.c - added get/set lanport + util/*.c - clean up some compile warnings + scripts/checksel - use sel -d + scripts/checksel.cmd - use sel -d + scripts/evt.sh - add sample snmptrap logic + scripts/Makefile.am - add ipmi.init.basic + doc/ipmiutil.spec - add ipmi.init.basic + doc/isel.8 - change -c to -d, add new -c/-n description, add -u + doc/UserGuide - updated with current man pages + ipmiutil-2.9.1 contains: + ipmiutil (ipmiutil) ver 2.91 + ...(various subcommands) ver 2.91 + ismcoem (ipmiutil smcoem) ver 2.91 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.9 + ipmi_port (ipmi_port) ver 1.4 + +10/09/2013 ARCress ipmiutil-2.9.2 changes + util/isensor.c - set default -t tag to "Thresholds" instead of "", + added find_sdr_by_id(), + fixed thresholds.sh script for cmd if recid==0 + util/ilan.c - if disabling SuperMicro, set failover off also + util/isel.c - fix -c option for canonical + util/ipmiutil.c - marked iekanalyzer as deprecated + debian/* - updated for debhelper 9 builds by Alex Waite + debian/copyright - updated to DEP-5 format with file-level detail + debian/ipmiutil.lintian-overrides - added gpl-openssl warning override + lib/Makefile - added check: for debian + scripts/Makefile.am - added check: for debian + scripts/ipmi.init.basic - added checks if ipmi is builtin + doc/Makefile.am - added check: for debian + doc/UserGuide - marked iekanalyzer as deprecated + doc/iekanalyzer.8 - marked iekanalyzer as deprecated + doc/ipmiutil.spec - add dummy echo in %post in case of a command error + configure.ac - renamed from previous configure.in + lib/lanplus/lanplus_dump.c - reduce rakp2 debug output (CVE-2013-4786) + lib/lanplus/lanplus_crypt.c - reduce rakp2 debug output (CVE-2013-4786) + util/ipmims.cpp - fixed Win2012 x64 core in SafeArrayDestroy + util/igetevent.c - added -c for canonical event formats, get_evt_method + doc/igetevent.8 - added -c description + util/oem_supermicro.c - fix memory decoding to use data2 byte + util/Makefile.am - add $OS_CF for ievents, idiscover, ipmi_port + configure.ac - add fortify flags to OS_CF if supported + lib/lanplus/lanplus.c - fix possible mem leak, line 2195 (entry) + lib/lanplus/lanplus_crypt.c - fix possible mem leak, line 842 (padded_input) + ipmiutil-2.9.2 contains: + ipmiutil (ipmiutil) ver 2.92 + ...(various subcommands) ver 2.92 + ismcoem (ipmiutil smcoem) ver 2.92 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.9 + ipmi_port (ipmi_port) ver 1.4 + +03/28/2013 ARCress ipmiutil-2.9.3 changes + doc/ipmiutil.spec - add 'BuildRequires: systemd' if Fedora >= 15 + scripts/install.cmd - split mkdir into two steps + scripts/ipmi_info - return 0 even if sysinfo is not supported + scripts/ipmi_port.sh - redirect threshold.sh output to thresh_out.txt + util/ifru.c - [thibaulf88] Add another valid type (0x0) in ValidTL, + Add end-of-string char in binary case of decode_string function. + removed #ifdef OLD nSec case + util/ievents.c - parse SMI as if BMC when getting sensor description + util/isel.c - fix optarg for -l + util/i*.c - handle SUPEMICRO and SUPERMICROX the same + util/iconfig.c - use ipmi_reserved_user() to skip user1 sometimes + util/ilan.c - set default SOL_AUTH to operator if SUPERMICRO + util/ihealth.c - call get_device_guid if system guid error + util/subs.c - added get_device_guid routine + util/ipmi_sample.c - use get_BiosVersion also + util/isensor.c - add PS Fan Fail case, move SDR typedefs to isensor.h, + fix for -j jumpstart premature end. + util/isensor.h - move SDR typedefs to isensor.h + util/oem_fujitsu.c - return error if no OEM sensor status string + util/Makefile.am - build iseltime by default, build libipmiutil.so, + configure.ac - include -fPIC in OS_CFLAGS, exclude .so if Mac/Solaris, + added -Wunused-result -Wgnu-designator to cfwarn + INSTALL - update Windows build instructions + doc/UserGuide - update Windows build instructions, added API section 9 + doc/ipmiutil.spec - include libipmiutil.so + debian/* - changes from review by JuhaniN + lib/lanplus/lanplus.c - clean up compile warnings (OliverS) + util/idcmi.c util/iekanalyzer.c - clean up compile warnings (OliverS) + util/ipmiutil2.mak util/ipmiutil2-64.mak - makefile cleanup (OliverS) + cleanwin.cmd util/ipmiutil.mak util/ipmiutil64.mak - ditto + ipmiutil-2.9.3 contains: + ipmiutil (ipmiutil) ver 2.93 + ...(various subcommands) ver 2.93 + ismcoem (ipmiutil smcoem) ver 2.93 + iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 + idiscover (ipmiutil discover) ver 1.9 + ipmi_port (ipmi_port) ver 1.4 diff --git a/INSTALL b/INSTALL new file mode 100755 index 0000000..cf523ba --- /dev/null +++ b/INSTALL @@ -0,0 +1,224 @@ +------------------------------------- + INSTALL for ipmiutil source +------------------------------------- + +The ipmiutil source package provides IPMI-based utilities and kernel +patches for managing various servers in Linux or Windows. + +The same source files can be built in both Linux and Windows as shown +below. + +------------------------------------- + Build instructions for Linux +------------------------------------- + +To build with some GPL code: +If you are building ipmiutil for open-source, then the MD2 hash +for IPMI LAN and the valinux driver interface (/dev/ipmikcs) can +be supported. If so, you should specify the following during +configure: + "./configure --enable-gpl" +The default is to build with only BSD-licensed code and not to +include the MD2 and valinux features. The md2.h and ipmi_ioctl.h +files with GPL code can be removed if this option is not enabled. + +To build a standalone binary without IPMI LAN 2.0 (lanplus plugin), +which may be desirable for use on bootable media (USB/CDROM), to +decrease the size or to avoid using libcrypto, you can specify the +following during configure: + "./configure --disable-lanplus" +or + "./configure --enable-standalone" +builds it without lanplus libs and without GPL code. + +To add LanDesk IPMI support: +Support for the LanDesk IPMI driver requires a library supplied by +LanDesk (libipmiapi.a). After obtaining this library, place it in +lib/libipmiapi.a. Then you can link ipmiutil to support it by +specifying the following during configure: + "./configure --enable-landesk=yes" + +Steps to build for Linux: +# ./beforeconf.sh + Which automates these functions: + * copying libtool files + * aclocal (may be needed if automake versions are different) + * autoconf (may be needed if automake versions are different) + * automake +# ./configure + --enable-landesk adds landesk library support [default=no] + --disable-lanplus disable lanplus library support + --enable-standalone build standalone, with no GPL or LanPlus libs. + --enable-gpl build with some GPL code [default=no] +# make + +To add the ifruset utility, which allows setting any FRU Product fields: +# cd util; make ifruset +# ifruset -? + +To build and install an rpm package, use one of the following: +# make install +# make rpm +The make rpm produces a binary rpm, and a source rpm, which can be +installed with "rpm -i *.rpm". + +To build and install a Debian package, do this: +# dpkg-buildpackage +then install it with "dpkg -i *.deb". + +------------------------------------- + Build instructions for Windows +------------------------------------- + +The ipmiutil Windows binaries for each release are pre-built and posted +at http://ipmiutil.sourceforge.net, but here is how to build the ipmiutil +EXEs for Windows from source. +Note that the WIN32 compile flag is used. +The ipmiutil buildwin.cmd shows how to compile and link the lib and exe +files, although many people prefer instead to do builds with the +Microsoft VisualStudio project GUI. +See also ipmiutil UserGuide section 5.2 for more details if needed. + +1) Install Visual Studio +The build environment assumes that VisualStudio 6.0 VC98 or +later is installed. + +2) Download contrib files +Before running buildwin.cmd, first download the contributed +files for Windows (includes getopt.c and openssl). +A copy of these files is available from + http://ipmiutil.sf.net/FILES/ipmiutil-contrib.zip + +3) Copy initial contrib files into ipmiutil +Below are sample directories where ipmiutil*.tar.gz was unpacked, +and where the openssl*.tar.gz was unpacked. +> set ipmiutil_dir=c:\dev\ipmiutil +> set openssl_dir=c:\dev\openssl + +First, copy the getopt.c & getopt.h into the util directory. +From the directory where ipmiutil-contrib.zip was unpacked, +> copy getopt.* %ipmiutil_dir%\util +The iphlpapi.lib comes from VS 2003 .Net or Win2003 DDK. +> copy iphlpapi.lib %ipmiutil_dir%\lib +> copy iphlpapi.h %ipmiutil_dir%\util + +4) Build the openssl libraries +To build from original source you would then want to build a copy of openssl +for Windows, and copy the built openssl files to lib & inc. +Follow the openssl build instructions from INSTALL.W32 for VC++ to build +these binaries. Note that perl must also be installed first. + +5) Copy the resulting LIB and DLL binaries to ipmiutil +> copy %openssl_dir%\out32dll\libeay32.lib %ipmiutil_dir%\lib +> copy %openssl_dir%\out32dll\ssleay32.lib %ipmiutil_dir%\lib +> copy %openssl_dir%\out32dll\libeay32.dll %ipmiutil_dir%\util +> copy %openssl_dir%\out32dll\ssleay32.dll %ipmiutil_dir%\util +> mkdir %ipmiutil_dir%\lib\lanplus\openssl +> copy %openssl_dir%\include\openssl\*.h %ipmiutil_dir%\lib\lanplus\openssl + +6) Set the Visual Studio variables with vcvars*.bat +For your installation of Microsoft Visual Studio, it has batch files to +set the Visual C variables. Run the appropriate architecture version of +these batch files to set the VC variables. + +Example: +C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat +or +C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat +or +C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat + +7) Run buildwin.cmd +buildwin.cmd will build all of the Windows EXE and DLL files. + +If you are using ipmiutil for a bootable WinPE environment, and do not need +Serial-Over-LAN functionality, the buildwin2.cmd will build the Windows EXE +files without using the openssl libraries, to simplify the process. The +openssl libraries are required for the IPMI LAN 2.0 crypto functions that +Serial-Over-LAN requires. + + +------------------------------------- + Build instructions for Solaris +------------------------------------- +# iver=2.7.9 +# uname -a +SunOS unknown 5.10 Generic_127128-11 i86pc i386 i86pc +# gunzip ipmiutil-${iver}.tar.gz +# tar xvf ipmiutil-${iver}.tar +# cd ipmiutil-${iver} +# PATH=/usr/sbin:/usr/bin:/usr/ucb:/usr/openwin:/usr/ccs/bin:/usr/sfw/bin +# ./configure +# make +# make tarsol +This produces /tmp/ipmiutil-${iver}-solaris.tar with the binaries. +# gzip /tmp/ipmiutil-${iver}-solaris.tar + +Solaris Release Notes: +- Built with support for bmc, lan, and lanplus interfaces. + Supports the Solaris 10 /dev/bmc driver via putmsg method. +- Requests to slave addresses other than BMC are not supported by + the Solaris bmc driver (e.g. to HSC at 0xc0), and are sent to + the BMC sa instead. +- Memory mapping logic returns an error (e.g. BIOS version). +- idiscover -a broadcast ioctl works now in ipmiutil-2.3.1 + +To Install on Solaris: + gunzip /tmp/ipmiutil-${iver}-solaris.tar.gz + tar xvf /tmp/ipmiutil-${iver}-solaris.tar + ./install.sh + +------------------------------------- + Build instructions for FreeBSD +------------------------------------- +# iver=2.7.9 +# gunzip ipmiutil-${iver}.tar.gz +# tar xvf ipmiutil-${iver}.tar +# cd ipmiutil-${iver} +# ./configure +# make +# make tarbsd +This produces /tmp/ipmiutil-${iver}-bsd.tar with the binaries. +# gzip /tmp/ipmiutil-${iver}-bsd.tar + +FreeBSD Release Notes: + - ipmiutil-2.3.5 supports FreeBSD with direct driverless KCS + - ipmiutil-2.5.2 adds support for FreeBSD 7.x ipmi driver port + +To Install on FreeBSD: + gunzip /tmp/ipmiutil-${iver}-bsd.tar.gz + tar xvf /tmp/ipmiutil-${iver}-bsd.tar + ./install.sh + +------------------------------------- + Build instructions for MAC OSX +------------------------------------- +# iver=2.9.1 +# tar -xvxf ipmiutil-${iver}.tar.gz +# cd ipmiutil-${iver} +# ./beforeconf.sh +There are some warnings shown, but this does the aclocal/autoconf/automake. +# ./configure +# make +# make tarbsd +This produces /tmp/ipmiutil-${iver}-bsd.tar with the binaries. +# mv /tmp/ipmiutil-${iver}-bsd.tar /tmp/ipmiutil-${iver}-macos.tar +# gzip /tmp/ipmiutil-${iver}-macos.tar + +To Install on MacOS from a Terminal: + gunzip /tmp/ipmiutil-${iver}-macos.tar.gz + tar xvf /tmp/ipmiutil-${iver}-macos.tar + ./install.sh + +Release Notes for MAC OSX: + - ipmiutil-2.9.1 supports MacOSX client builds + - Does not yet support AppleBMC.kext, pending documentation + +--------------------------------------- + Build instructions for ARM (Android) +--------------------------------------- +# tar -xzvf ipmiutil-${iver}.tar.gz +# cd ipmiutil-${iver} +# ./configure --enable-standalone --host=arm +# make + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..0c3af55 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,60 @@ + +SUBDIRS = @SUBDIR_S@ +PKGDIR = @PKG_DIR@ +SOURCEDIR = $(PKGDIR)/SOURCES +BUILDDIR = $(PKGDIR)/BUILD +RSPEC = doc/$(PACKAGE).spec +PNAME = $(PACKAGE)-$(VERSION) +TMPDIR = /var/tmp/$(PNAME) +BDIR = $(TMPDIR)-1-root +RPMB = rpmbuild +# $(RPMB) -bb --buildroot $(BDIR) $(RSPEC) + +rpm: $(RSPEC) + make tarball + $(RPMB) -bb $(RSPEC) + $(RPMB) -bs $(RSPEC) + +tarball: + rm -f $(SOURCEDIR)/$(PNAME).tar.gz + rm -rf $(TMPDIR) + mkdir -p $(TMPDIR) + mkdir -p $(SOURCEDIR) + find . -print | cpio -pdumv $(TMPDIR) + chown -R root $(TMPDIR) + chgrp -R root $(TMPDIR) + rm -f $(TMPDIR)/lib/libipmiapi*.a* + cd $(TMPDIR)/test; make clean; cd .. + cd $(TMPDIR)/hpiutil; make clean; cd .. + cd $(TMPDIR); make distclean + cd $(TMPDIR); rm -rf autom4te.cache + cd $(TMPDIR); rm -f util/events + cd $(TMPDIR); sed -i 's/\r//' ChangeLog AUTHORS COPYING NEWS README TODO doc/UserGuide + cd $(TMPDIR); chmod 644 doc/UserGuide + cd $(TMPDIR); cd ..; tar -czvf $(SOURCEDIR)/$(PNAME).tar.gz $(PNAME) + rm -rf $(TMPDIR) + +tarsol: util/ipmiutil + rm -f /tmp/$(PNAME)-solaris.tar + rm -rf $(TMPDIR) + mkdir -p $(TMPDIR) + cd util; cp ipmiutil idiscover ievents ipmi_port $(TMPDIR) + cd doc; cp UserGuide *.8 *.mib $(TMPDIR) + cd scripts; cp checksel ipmiutil_??? *.sh $(TMPDIR) + cd $(TMPDIR); mv install-solaris.sh install.sh + cd $(TMPDIR); tar cvf /tmp/$(PNAME)-solaris.tar . + rm -rf $(TMPDIR) + +tarbsd: util/ipmiutil + rm -f /tmp/$(PNAME)-bsd.tar + rm -rf $(TMPDIR) + mkdir -p $(TMPDIR) + cd util; cp ipmiutil idiscover ievents ipmi_port $(TMPDIR) + cd doc; cp UserGuide *.8 *.mib $(TMPDIR) + cd scripts; cp checksel ipmiutil_??? *.sh $(TMPDIR) + cd $(TMPDIR); mv install-solaris.sh install.sh + cd $(TMPDIR); tar -cvf /tmp/$(PNAME)-bsd.tar . + rm -rf $(TMPDIR) + +clean-generic: + rm -f *.log *.tmp debug*.list diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..6398861 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,687 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + TODO config.guess config.sub depcomp install-sh ltconfig \ + ltmain.sh missing mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CROSS_CFLAGS = @CROSS_CFLAGS@ +CROSS_LFLAGS = @CROSS_LFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GPL_CFLAGS = @GPL_CFLAGS@ +IA64_CFLAGS = @IA64_CFLAGS@ +INIT_DIR = @INIT_DIR@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INS_LIB = @INS_LIB@ +LANDESK_CFLAGS = @LANDESK_CFLAGS@ +LANDESK_LDADD = @LANDESK_LDADD@ +LANPLUS_CFLAGS = @LANPLUS_CFLAGS@ +LANPLUS_CRYPTO = @LANPLUS_CRYPTO@ +LANPLUS_LDADD = @LANPLUS_LDADD@ +LANPLUS_LIB = @LANPLUS_LIB@ +LANPLUS_SAM = @LANPLUS_SAM@ +LDFLAGS = @LDFLAGS@ +LD_SAMX = @LD_SAMX@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_DIR = @LIB_DIR@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +OS_CFLAGS = @OS_CFLAGS@ +OS_DRIVERS = @OS_DRIVERS@ +OS_LFLAGS = @OS_LFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_DIR = @PKG_DIR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHR_LINK = @SHR_LINK@ +STRIP = @STRIP@ +SUBDIR_S = @SUBDIR_S@ +SYSTEMD_DIR = @SYSTEMD_DIR@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +SUBDIRS = @SUBDIR_S@ +PKGDIR = @PKG_DIR@ +SOURCEDIR = $(PKGDIR)/SOURCES +BUILDDIR = $(PKGDIR)/BUILD +RSPEC = doc/$(PACKAGE).spec +PNAME = $(PACKAGE)-$(VERSION) +TMPDIR = /var/tmp/$(PNAME) +BDIR = $(TMPDIR)-1-root +RPMB = rpmbuild +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile config.h +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-libtool clean-recursive \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-recursive distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am uninstall-info-am + +# $(RPMB) -bb --buildroot $(BDIR) $(RSPEC) + +rpm: $(RSPEC) + make tarball + $(RPMB) -bb $(RSPEC) + $(RPMB) -bs $(RSPEC) + +tarball: + rm -f $(SOURCEDIR)/$(PNAME).tar.gz + rm -rf $(TMPDIR) + mkdir -p $(TMPDIR) + mkdir -p $(SOURCEDIR) + find . -print | cpio -pdumv $(TMPDIR) + chown -R root $(TMPDIR) + chgrp -R root $(TMPDIR) + rm -f $(TMPDIR)/lib/libipmiapi*.a* + cd $(TMPDIR)/test; make clean; cd .. + cd $(TMPDIR)/hpiutil; make clean; cd .. + cd $(TMPDIR); make distclean + cd $(TMPDIR); rm -rf autom4te.cache + cd $(TMPDIR); rm -f util/events + cd $(TMPDIR); sed -i 's/\r//' ChangeLog AUTHORS COPYING NEWS README TODO doc/UserGuide + cd $(TMPDIR); chmod 644 doc/UserGuide + cd $(TMPDIR); cd ..; tar -czvf $(SOURCEDIR)/$(PNAME).tar.gz $(PNAME) + rm -rf $(TMPDIR) + +tarsol: util/ipmiutil + rm -f /tmp/$(PNAME)-solaris.tar + rm -rf $(TMPDIR) + mkdir -p $(TMPDIR) + cd util; cp ipmiutil idiscover ievents ipmi_port $(TMPDIR) + cd doc; cp UserGuide *.8 *.mib $(TMPDIR) + cd scripts; cp checksel ipmiutil_??? *.sh $(TMPDIR) + cd $(TMPDIR); mv install-solaris.sh install.sh + cd $(TMPDIR); tar cvf /tmp/$(PNAME)-solaris.tar . + rm -rf $(TMPDIR) + +tarbsd: util/ipmiutil + rm -f /tmp/$(PNAME)-bsd.tar + rm -rf $(TMPDIR) + mkdir -p $(TMPDIR) + cd util; cp ipmiutil idiscover ievents ipmi_port $(TMPDIR) + cd doc; cp UserGuide *.8 *.mib $(TMPDIR) + cd scripts; cp checksel ipmiutil_??? *.sh $(TMPDIR) + cd $(TMPDIR); mv install-solaris.sh install.sh + cd $(TMPDIR); tar -cvf /tmp/$(PNAME)-bsd.tar . + rm -rf $(TMPDIR) + +clean-generic: + rm -f *.log *.tmp debug*.list +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..59f7987 --- /dev/null +++ b/NEWS @@ -0,0 +1,74 @@ +IPMIUTIL NEWS + +This project started in October 2001 as part of the Carrier Grade Linux effort. +It was then known as 'panicsel' ("http://panicsel.sf.net") and included a kernel patch to write a Linux panic event to the IPMI firmware log, as well as utilities. + +This code was first included in MontaVista CGE Linux 2.1 in July 2002. +The panicsel functionality was included in OSDL CGL 1.0 and 2.0 requirements. +The kernel panic functionality was included in the OpenIPMI driver for 2.6 Linux kernels, and in the Intel IMB Linux driver v28 and greater. + +A Linux rpm and a Windows setup package for ipmiutil is included on +the platform CD with Intel carrier-grade servers. + +The ipmiutil (or panicsel) rpm is known to be included in the following +Linux distributions: +MontaVista CGE 2.1, 3.0, 3.1, 4.0, SuSE SLES9, SLES10, RedFlag 5.0 + +See http://ipmiutil.sourceforge.net for binaries, documentation, etc. + +In Oct 2001 (0.8.1), started panicsel. +In Dec 2001 (1.0.0), released with Intel Telecom Linux Technology project +In July 2002 (1.2.1), released with MontaVista CGE 2.1 +In Jan 2004 (1.4.1), compile flags for Windows 2000 & 2003 support were added. +In August 2004 (1.4.8), the project was moved from panicsel.sf.net to + ipmiutil.sf.net. The new name more clearly reflects the purpose of the + project in its current state. +In November 2004 (1.5.0), support for IPMI LAN was added using FreeIPMI. + The FreeIPMI library includes KCS and IPMI LAN protocols. +In May 2006 (1.7.0), built-in IPMI LAN support was added. +In August 2006 (1.7.5), driverless direct I/O support was added, to no longer + depend upon libfreeipmi.so, since ipmilan.c and ipmidir.c replace that + functionality, so the utilities are now more portable. +In Jan 2007 (1.8.0), two major new features were added: + 1) The 'ipmiutil' meta-command, which may be more user-friendly for some + users, and maintains the existing syntax for each sub-command. + 2) Support for IPMI LAN 2.0 RMCP+ in both Linux and Windows. Support for + IPMI LAN 1.5 or 2.0 is detected by default, or can be explicitly + specified/forced with the -Flan2 option. +In Feb 2007 (1.9.2), Linux Serial-Over-Lan console feature was added. +In Oct 2007 (2.0.0), Windows SOL console and remote soft-shutdown features + were added. +In Mar 2008 (ipmiutil-2.1.0), the Windows SOL client application was completed. +In Aug 2008 (ipmiutil-2.2.0), a new function was added to save/restore the BMC + configuration parameters for lan, serial, user, channel, pef, and sol. + The command is "ipmiutil config" for this. +In Sep 2008 (2.2.1), support for the Microsoft IPMI driver was added. +In Nov 2008 (2.3.0), support for the Sun Solaris bmc driver was added. +In Mar 2009 (2.3.5), support for the FreeBSD OS was added. +In Oct 2009 (2.5.0), added several new features: + Full ANSI VT100 emulation for Windows SOL console + Two-character escape sequence (~.) for SOL console, adding send-Break. + Added canonical output option -c for fru,config,sensor,health,lan + Added ipmiutil getevt -r to run specified script when an event occurs +In Feb 2010 (2.6.0), new subcommand naming scheme: + Renamed subcommands to match the meta-command name plus the prefix 'i'. + For instance, 'showsel' is now 'isel' and 'pefconfig' is now 'ilan'. + This may affect some scripts that use the old subcommand shortcuts. + Also included some spec file cleanup/standardization. + Support added for some CG2100 firmware differences. +In Apr 2010 (2.6.2) ifruset was added to set all FRU Product Area fields +In Jun 2010 (2.6.5) added picmg and firewall functionality +In Aug 2010 (2.6.8) Fedora 14 version of ipmiutil submitted +In Sep 2010 (2.6.9) added fwum/hpm functionality, and OEM Fujitsu sensor/sel +In Sep 2010 (2.7.0) added sunoen, ekanalyzer, fru_picmg, oem_kontron +In Sep 2010 (2.7.1) added ppc64, mips64, sparc arch support +In Nov 2010 (2.7.2) added Debian package support +In Nov 2010 Fedora 14 released with ipmiutil-2.6.8 +In Dec 2010 (2.7.3) added SuperMicro OEM functions +In Mar 2011 OpenSuSE 11.4 released with ipmituil-2.7.2 +In May 2011 (2.7.6) added VLAN support and WIN64 fixes +In Sep 2011 (2.7.8) added Dell OEM functions, PICMG 2.3, IPv6, systemd, tsol +In Oct 2011 (2.7.9) support Wind River and ARM cross-compile, Intel S2600 +In Dec 2011 (2.8.0) added DCMI 1.1 commands, devel pkg, MSI package +In Feb 2012 (2.8.1) added Quanta S99Q functions, Dell fixes, Intel ME fixes + diff --git a/README b/README new file mode 100644 index 0000000..1d58b89 --- /dev/null +++ b/README @@ -0,0 +1,156 @@ + + ------------------------------ + ipmiutil README + IPMI Management Utilities + ------------------------------ + +The ipmiutil IPMI utilities below allow the user to access the firmware +System Event Log and configure the Platform Event Filter table for the new +'OS Critical Stop' records, as well as other common IPMI system management +functions. + +ipmiutil - a meta-command to invoke all of the below as sub-commands +ievents - a standalone utility to interpret IPMI and PET event data +isel - show/set the firmware System Event Log records +isensor - show Sensor Data Records, sensor readings, and thresholds +ireset - cause the BMC to hard reset or power down the system +ilan - show and configure the BMC LAN port and Platform Event Filter + table to allow BMC LAN alerts from firmware events and + OS Critical Stop messages, +iserial - show and configure the BMC Serial port for various modes, + such as Terminal Mode. +ifru - show the FRU chassis, board, and product inventory data, + and optionally write a FRU asset tag. +ialarms - show and set front panel alarms (LEDs and relays) +iwdt - show and set watchdog timer parameters +igetevent - receive any IPMI events and display them +ihealth - check and report the basic health of the IPMI BMC +iconfig - list/save/restore the BMC configuration parameters +icmd - send specific IPMI commands to the BMC, + mainly for testing and debug purposes. +idiscover - discover the available IPMI LAN nodes on a subnet +isol - start/stop an IPMI Serial-Over-LAN Console session +ipicmg - show/set the IPMI PICMG parameters +ifirewall - show/set the IPMI firmware firewall configuration +iekanalyzer - run FRU-EKeying analyzer on FRU files +ifwum - OEM firmware update manager extensions +ihpm - HPM firmware update manager extensions +isunoem - Sun OEM functions +idelloem - Dell OEM functions +itsol - Tyan SOL console start/stop session +idcmi - get/set DCMI parameters, if supporting the DCMI spec + +Other supporting files: +checksel = cron script using ipmiutil sel to check the SEL, write new + events to the OS system log, and clear the SEL if nearly full. +ipmi_port = daemon to bind the RMCP port and sleep to prevent + Linux portmap from stealing the RMCP port +ipmi_port.sh = init script to reserve the RMCP port from portmap, + this also restores saved sensor thresholds, if any. +ipmiutil_wdt = init script to restart watchdog timer every 60 sec via cron +ipmiutil_asy = init script runs 'ipmiutil getevt -a' for remote shutdown +ipmiutil_evt = init script runs 'ipmiutil getevt -s' for monitoring events +evt.sh = sample script which can be invoked by ipmiutil_evt +ipmi_if.sh = script using dmidecode to determine the IPMI Interface Type +bmclanpet.mib = SNMP MIB for BMC LAN Platform Event Traps +test/* = scripts and utilities used in testing ipmiutil/panicsel +kern/* = kernel patches for panic handling + +-------------------- + Dependencies: +-------------------- +The IPMI Management Utilities currently work with platforms that +support the IPMI 1.5 or 2.0 specification. IPMI servers can be managed +locally, or remotely via IPMI LAN, even when the OS or main CPU is not +functional. + +The IPMI 1.5 spec, Table 36-3 defines the sensor types for SEL records, +as used by showsel. +The IPMI 1.5 spec, Table 15-2 defines the Platform Event Filter table +entries, as used by pefconfig. +The IPMI 1.5 spec, Table 19-4 defines the LAN Configuration Parameters, +as used by pefconfig. + +The ipmiutil utilities will use an IPMI Driver, either the Intel IPMI package +(ipmidrvr, /dev/imb), MontaVista OpenIPMI (/dev/ipmi0), the valinux IPMI +Driver (/dev/ipmikcs), or the LANDesk ldipmi daemon. The ipmiutil utilities +can also use direct user-space I/Os in Linux or FreeBSD if no IPMI driver +is detected. + +If ipmiutil is compiled with LANPLUS enabled, then it does depend upon +libcrypto.so, which is provided by the openssl package. + +------------------------ + Build Instructions +------------------------ + +See notes in the INSTALL file from the ipmiutil*.tar.gz archive. + +------------------------ + IPMI Configuration +------------------------ +See http://ipmiutil.sourceforge.net/docs/UserGuide + +Note that ipmiutil can autodetect the IPMI interface using SMBIOS/dmi +and use driverless KCS or SSIF if no IPMI driver is loaded. + +Various vendor IPMI firmware versions should support all of the +mandatory IPMI functions, but there are variations in which of +the optional IPMI functions that are supported. + +The 'ipmiutil lan' utility can be used to easily set up a working +configuration of BMC LAN, SOL, and PEF Alerting while Linux is running, +instead of a series of 40-50 commands with ipmitool, or a proprietary +vendor tool, which may even require booting to DOS. + +The bmc_panic patch has been obsoleted by the CONFIG_IPMI_PANIC option +in the OpenIPMI driver, which is included in kernel.org. +The bmc_panic functionality is also included in the Intel imb IPMI driver +build 28 and greater. +To apply the bmc_panic patch (in kern/) to a different version of kernel source: + kver=2.4.18 + cd /usr/src/linux-${kver} + cat bmcpanic-${kver}.patch | patch -p1 + make menuconfig (make sure CONFIG_BMCPANIC=y) + make oldconfig + make dep + make bzImage + make modules + make modules_install + mkinitrd -f /boot/initrd-${kver}.img ${kver} + make install + reboot + +The ipmiutil package does not set the Linux kernel panic timeout. +If a specific panic timeout is desired, do +"echo 10 >/proc/sys/kernel/panic" to set it to 10 seconds, for instance. +or add panic=10 to the kernel line in grub.conf. + +------------------------------ + KNOWN PROBLEMS +------------------------------ + +See http://sourceforge.net/tracker/?group_id=116222&func=browse for +a list of bugs. + +Contact for best-effort support: arcress at users.sourceforge.net or +ipmiutil-developers at lists.sourceforge.net or http://ipmiutil.sf.net + +-------------------- + LICENSING: +-------------------- +The BSD License in the COPYING file applies to all source files +herein, except for + * util/md5.c (Aladdin unrestricted license, compatible with BSD) + * util/md2.h (GPL) + * util/ipmi_ioctls.h (GPL, now defunct and removed) +While the BSD License allows code reuse in both open and non-open +applications, the md2.h and ipmi_ioctls.h files would have to be removed +if used in a non-open application. There is a ALLOW_GPL compile flag +for this that is disabled by default, but can be enabled for GPL +open-source by running "./configure --enable-gpl". + +-------------------- + CHANGE HISTORY: +-------------------- +See http://ipmiutil.sourceforge.net/docs/ChangeLog diff --git a/TODO b/TODO new file mode 100644 index 0000000..cec1931 --- /dev/null +++ b/TODO @@ -0,0 +1,293 @@ + +IPMIUTIL PROJECT TODO LIST: + +IPV6: + . implement IPV6 for Windows + +SuperMicro Users: + . implement OEM cmd to set user privilege level + +SPD decoding: + . expose SPD decoding from file/buffer, not just FRU + c handle DDR3 SPD 1.0 format + PARTIAL in ipmiutil-2.9.1 + +Add additional IPMI 2.0 commands from addendum: + c Get/Set System Info + . Get/Set SEL UTC Offset (requested 4/22/13) + . Forwarded Command + PARTIAL in ipmiutil-2.8.1, adding Get/Set System Info functions + +Add DCMI 1.5 commands for NetFn 0x2C to ipmiutil + . Get/Set DCMI Configuration Parameters (DCMI 1.5) + . Get/Set Thermal Limit (DCMI 1.5) + +Add an option/variant of canonical output for CSV (delimiter = ',') + +Change ipmicmd.c to be thread-safe if accessing multiple nodes. + Currently is only conditionally safe, if threads access the same node. + Will require adding a context struct param to the ipmi_cmd*() funcs. + Probably need to add new thread-safe functions to retain back-compatibility. + PARTIAL in ipmiutil-2.9.0, multiple nodes in sequence is fixed + +Add support for MAC OSX AppleBMC.kext driver + not yet implemented, pending some documentation. + +More automated testing + Started this in ipmiutil-2.6.6 with testipmi.sh, but it could be + more extensive and be tested on more types of IPMI firmware. + PARTIAL in ipmiutil-2.6.6 with testipmi.sh + +Remove assert() calls from lanplus code + Need to improve error handling and remove all assert() calls from + the lib/lanplus/ code: lanplus.c lanplus_crypt.c lanplus_crypt_impl.c + This requires test cases for the assert instances. + PARTIAL in ipmiutil-2.4.0, removed 2 asserts from lanplus.c + PARTIAL in ipmiutil-2.7.0, removed 1 more assert from lanplus.c + PARTIAL in ipmiutil-2.8.8, more from lanplus_crypt.c/lanplus_crypt_impl.c + +Add a function to send ctl-alt-del through SOL console + Although this is seldom used in a serial console environment, it + could be useful. To do this, the one-character escape sequence + would need to be changed to a 2 character escape sequence. + Also need a method to insert the key sequence in the console. + PARTIAL in ipmiutil-2.5.0 includes the 2-character escape sequence + and a send_break function. + +------------------------------------------------------------------------------ +IPMIUTIL COMPLETED TODO TASKS: + +Add support for a MAC OSX client + It should work with minor compile-time adjustments. + We need a system running OSX on which to build and test this. + Changes to compile on MACOS submitted to SVN on 04/12/2013 + Support for AppleBMC.kext not yet implemented, pending documentation. + COMPLETED in ipmiutil-2.9.1 + +Add snmptrap functionality to getevent -r example script + COMPLETE in ipmiutil-2.9.1 + +Add DCMI 1.1 commands for NetFn 0x2C to ipmiutil + (0xDC defines the body code) + The command codes under this NetFn are: + c Get DCMI Capabilities Info + c Get/Set Management Controller Identifier String + c Get/Set Asset Tag + c Get DCMI Sensor Info + c Get Temperature Readings + c Get Power Reading + c Get/Set Power Limit + The remainder DCMI specified commands are from the IPMI specification + IMPLEMENTED in ipmiutil-2.8.1 + COMPLETE (power options tested) in ipmiutil-2.8.4 + +Perform retries on retries for some get/set lan parameters + COMPLETE in ipmiutil-2.8.1 by using set_max_kcs_loops() + +Add an oem_hp.c module with decode_sensor_hp() to + interpret HP discrete sensors with analog readings + COMPLETE in ipmiutil-2.8.2 + +Add systemd scripts for ipmi_port, ipmiutil_evt, etc. + COMPLETE in ipmiutil-2.7.8, not default but installed in /usr/share/ipmiutil + ipmi_port.service, ipmiutil_evt.service, + ipmiutil_asy.service, ipmiutil_wdt.service + +Add IPv6 support + There is at least one IPMI BMC that has added IPv6 support, so + it would be nice to include support for it in ipmiutil. + Need access to a BMC that supports IPv6 for testing, or + someone to help test it whose BMC supports IPv6. + COMPLETE in ipmiutil-2.7.8, with contribution from Rajaganesh87 + +Add an option to 'ipmiutil fru' that discovers every child MC FRU also, +like the isensor.c code does for fchild. + COMPLETE in ipmiutil-2.7.5 (ifru -e) + +Pass event severities to syslog, instead of just writing them as 'info'. + COMPLETE in ipmiutil-2.7.5 + +Add OEM code for ekanalyzer + COMPLETE in ipmiutil-2.7.0 + +Add code for FRU multi-record area decoding and FRU PICMG records + COMPLETE in ipmiutil-2.7.0 + +Add OEM code for Sun + COMPLETE in ipmiutil-2.7.0 + +Add OEM code for Fujitsu + PARTIAL in ipmiutil-2.6.9 with iRMC S2 SEL decoding + COMPLETE in ipmiutil-2.7.0 with iRMC S2 LED routines + +Add SHA256 and Cipher Suite 17 support + Current max Cipher Suite ID is 14, but IPMI 2.0 Errata 4 and DCMI 1.1 + add these. + COMPLETE in ipmiutil-2.6.9 + +Add OEM code for fwum, hpm, and oem_kontron features. + COMPLETE in ipmiutil-2.6.9 + +Add more ATCA/picmg functionality. + Currently have std IPMI functions, plus fru and sensor and blue LED + capability for ATCA/picmg bladed systems. + Need to add some additional picmg-specific functionality, like: + properties - get PICMG properties + addrinfo - get address information + activate - activate a FRU + deactivate - deactivate a FRU + policy get - get the FRU activation policy + policy set - set the FRU activation policy + portstate get - get port state + portstate set - set port state + led prop - get led properties + led cap - get led color capabilities + led state get - get led state + led state set - set led state + power get - get power level info + power set - set power level + and firmware firewall functions + COMPLETE: added ipicmg.c and ifirewall.c in ipmiutil-2.6.5 + +Add older 1.5 SOL protocol capability + For ipmiutil sol with IPMI 1.5, the older (Intel-only) 1.5 SOL protocol + is implemented and will connect, but the 1.5 SOL data packets are not + right yet. This is in progress. Note that the standard IPMI 2.0 SOL + protocol is entirely separate and still works fine. + Lower priority right now. If you want to use this feature, email + ipmiutil-developers(at)lists.sourceforge.net + CANCELLED - Intel 1.5 SOL is too old to matter any more. It was + only supported on SE7501WV2 motherboards from <=2003. + +Fix the API interface to /dev/ipmi0 on FreeBSD + This FreeBSD ipmi driver is different than Linux. + We have support for ipmiutil driverless mode on FreeBSD. + COMPLETE in ipmiutil-2.5.2, support ipmi driver and driverless w FreeBSD 7.x + +Add a delimeted-output option for all utilities + Would make parsing the output in scripts easier. + 08/25/08 added ':' delimiters to lan/serial config output in 2.2.0 + PARTIAL in ipmiutil-2.2.0 - added 'ipmiutil config' + DONE in ipmiutil-2.4.1 for sensor and lan canonical output with -c + COMPLETE in ipmiutil-2.5.0 added -c to bmchealth, fruconfig + +Add support for a DOS build + CANCELLED - use Linux boot media instead, DOS is not as good. + +Add detection for Windows SOL when Command Prompt window is >25 rows. + DONE with AnsiTerm.cpp in ipmiutil-2.5.0 + +Build a bootable Linux CD with ipmiutil for use with other random OSs. + Note that with ipmiutil-1.7.5, any bootable Linux CD will do, since + the direct I/Os no longer require an IPMI driver. + We may still want to build and supply an example (like TRB or SLAX). + 2/06/07 Built an initial SLAX CD as http://ipmiutil.sf.net/ipmiutil.iso. + This ISO is too big to remain posted on sourceforge.net, however. + Need documentation on how to build an ISO to finish this. + 11/21/08 posted SLAX ISO as http://ipmiutil.sf.net/FILES/newgrab.iso + COMPLETE + +Add Solaris support + Needed because configuring IPMI LAN and PEF with ipmitool is too + complicated. + COMPLETE in ipmiutil-2.3.0 for Solaris 10 bmc driver + +Add output logging to ipmiutil sol + This is easy with stdio in Linux, but not possible in Windows without + adding a logging option in the code, since Windows uses the video + console buffer instead of stdio. + COMPLETE in ipmiutil-2.2.2 + +Add support for Microsoft Windows IPMI driver + Currently only support Intel Windows imbdrv.sys driver. + Requires adding WMI infrastructure. + COMPLETED 09/12/08 in ipmiutil-2.2.1 for 32-bit Win2003R2 + +Add support for remote soft reset via OpenIPMI driver + Currently 'ipmiutil reset -o -N' requires 'getevent -a' and the imb driver. + Requires adding async callback for OpenIPMI driver to getevent.c + COMPLETED 09/12/08 in ipmiutil-2.2.1 + +Add a function to save/restore BMC IPMI settings + This would combine lan, serial, and fru parameters in a key-value-pair + file that could be restored automatically. + COMPLETED 08/25/08 in ipmiutil-2.2.0 + +Eliminate duplication in binaries + Build only one Meta-command for ipmiutil, with static libs if possible. + Existing other commands would be sym-links or shortcuts, e.g. + showsel [args] => ipmiutil sel [args] + COMPLETED 03/31/08 in ipmiutil-2.1.0 for Linux + +Handle Windows command prompt terminal emulation for SOL + The Windows isolconsole.exe works, but the terminal emulation logic is + not finished. It works ok to Linux command-line and vi, but looks + bad for BIOS/POST. This is in progress. There are other (non-open) + tools available for Windows (e.g. Intel dpccli) in the interim. + The Linux isolconsole works fine, since the terminal emulation is + handled by the Linux termio. + COMPLETE in ipmiutil-2.0.0, no known issues + +Do an OS Agent for hwreset to do BMC LAN remote soft-shutdown. + Perhaps using an xinetd socket to not have a service always resident, + or sending a kill signal to init from the driver level would work. + i.e. kill(1,SIGINT); /*SIGINT==2*/ + COMPLETE in ipmiutil-2.0.0 with hwreset & "getevent -a" for IMB driver. + +Do a configure option with/without lanplus support, since this adds so +much size to the binary object code. + COMPLETE in ipmiutil-1.8.2 + +Include IPMI v2.0 RMCP+ LAN protocol also. + (IPMI 2.0 commands were previously supported, however.) + COMPLETE in ipmiutil-1.8.0 + +Add more boot parameters to hwreset, for things like: + . hwreset: Set which device to boot from (CD, Disk, LAN/PXE, etc.) + COMPLETE in ipmiutil-1.7.0 + . Forcing the boot to continue (i.e. no POST pause) - BIOS setting + REJECTED - too platform specific for this project, see platform vendor + . Set which OS/Software version/target to be downloaded for PXE (?) + REJECTED - too platform specific for this project, see platform vendor + +Make a real-time sensor monitoring tool to monitor a specified SDR for +sensor readings every second. + . partially complete with sensor -i option + . sensor 1.39 has -L option for looping + COMPLETE in ipmiutil-1.7.3 (sensor 1.39) + +Add encrypt/decrypt options to pefconfig & tmconfig, using RSA or DSA public +keys, perhaps with the gnupg.org library. + There is some concern about increasing the size of the utilities for + encryption, when this functionality can be scripted instead. + POSTPONED - perhaps someone else would like to help? + COMPLETE - using -E to get password from IPMI_PASSWORD environment + variable works, and does not put the password in the + command line or script. + ADDED -Y option to allow user to enter password at prompt w ipmiutil-1.9.0 + +Improve BMC LAN functionality and diagnosis with some custom IPMI LAN logic. + The built-in IPMI LAN also makes the Windows version able to use it. + COMPLETE in ipmiutil-1.7.0 with ipmilan.c + +pefconfig: Fix fSOL20 logic to work on supported platforms, currently + returns completion code 0x80. + COMPLETE in ipmiutil-1.6.5 + +Update hpiutil source for 1.1.9 changes + COMPLETE in ipmiutil-1.6.3 + +Add pre-built Windows *.exe files to the ipmiutil.sf.net home page. + COMPLETE in ipmiutil-1.6.3 + +sensor: Add an option to display timestamp for this run. Write it on each SDR line if -w is also specified. + COMPLETE in ipmiutil-1.5.6 + +fruconfig: Get FRU data from all FRU devices, not just baseboard. + COMPLETE in ipmiutil-1.5.6 + +Add User settings, like tmconfig has, to pefconfig + - added more Get User Access messages to pefconfig v1.30 in ipmiutil 1.4.9 + - added -u option with ipmiutil 1.5.3 + COMPLETE + diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..6b265a6 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,7261 @@ +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 48 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# Report which library types will actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +]) + +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.9.6])]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 7 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH]) +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.58])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. +# +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/beforeconf.sh b/beforeconf.sh new file mode 100755 index 0000000..535a597 --- /dev/null +++ b/beforeconf.sh @@ -0,0 +1,55 @@ +#!/bin/sh +# beforeconf.sh +# Run this to reconfigure after unpacking the tarball, +# before running ./configure +# +am_files="mkinstalldirs missing" +am_dir=`ls -d /usr/share/automake* |tail -n1` +lt_files="ltmain.sh config.guess config.sub" +lt_dir=/usr/share/libtool/libltdl +my_dir=`pwd` + +#ltver=`rpm -q libtool |cut -f2 -d'-'` +ltver=`libtool --version | head -n1 |awk '{ print $4 }'` +ltv1=`echo $ltver |cut -f1 -d'.'` +if [ "$ltv1" != "1" ]; then + # many distros have libtool-2.x.x + lt_dir="/usr/share/libtool/config" + lt_files="compile config.guess config.sub depcomp install-sh ltmain.sh missing" +fi + +cd $my_dir +rm -rf autom4te.cache +aclocal + +# Note that MacOS Darwin returns 0 to which even if error. +which libtoolize >/dev/null 2>&1 +if [ $? -eq 0 ]; then + # use libtoolize if possible + cd $my_dir + libtoolize --automake --copy --force +elif [ -d $lt_dir ]; then + cp -f /usr/bin/libtool $my_dir + cd $lt_dir + cp -f ${lt_files} $my_dir +fi +# copy missing am_files if needed +if [ -d $am_dir ]; then + cd $am_dir + for f in ${am_files} + do + if [ ! -f $my_dir/$f ]; then + cp -f $f $my_dir + fi + done +fi + +cd $my_dir +# autoreconf -fiv +autoheader +automake --foreign --add-missing --copy + +aclocal +autoconf +automake --foreign + diff --git a/buildsamp.cmd b/buildsamp.cmd new file mode 100644 index 0000000..886125c --- /dev/null +++ b/buildsamp.cmd @@ -0,0 +1,13 @@ + +set | findstr VCINSTALLDIR +if %errorlevel% EQU 1 goto vcerror + +cd util +nmake -f ipmi_sample.mak all +cd .. +goto done + +:vcerror +echo Need to first run vcvars.bat + +:done diff --git a/buildwin.cmd b/buildwin.cmd new file mode 100644 index 0000000..2057935 --- /dev/null +++ b/buildwin.cmd @@ -0,0 +1,45 @@ +@echo off +REM # buildwin.cmd +REM # build ipmiutil for windows +REM # +REM # First download a copy of getopt.c getopt.h. +REM # copy getopt.* util +REM # Then download and build a copy of openssl for Windows, +REM # and copy the built openssl files needed to lib & inc. +REM # copy libeay32.lib ssleay32.lib lib +REM # copy libeay32.dll ssleay32.dll util +REM # copy include\openssl\*.h lib\lanplus\inc\openssl +REM # +REM # You should either run this from the Visual Studio Command Line, +REM # or first run the appropriate vcvars.bat script. +set | findstr VCINSTALLDIR +if %errorlevel% EQU 1 goto vcerror + +REM TODO, prebuild checking: +REM check for getopt.c,h +REM check for ssl libs +REM check for ssl includes +REM call mkssl + +set UTMAKE=ipmiutil.mak +echo %LIBPATH% |findstr /C:amd64 >NUL +if %errorlevel% EQU 0 set UTMAKE=ipmiutil64.mak + +cd lib +nmake /nologo -f ipmilib.mak all +cd .. +REM # echo make lib done + +cd util +nmake /nologo -f %UTMAKE% all +cd .. +REM # echo make util done + +echo buildwin ipmiutil done +goto done + +:vcerror +echo First need to run vcvars.bat + +:done + diff --git a/buildwin2.cmd b/buildwin2.cmd new file mode 100644 index 0000000..c4fff81 --- /dev/null +++ b/buildwin2.cmd @@ -0,0 +1,31 @@ +@echo off +REM # buildwin2.cmd +REM # build ipmiutil for windows in standalone mode +REM # without IPMI LAN 2.0 libraries, so no SOL. Use for bootables. +REM # +REM # First download a copy of getopt.c getopt.h. +REM # copy getopt.* util +REM # + +REM TODO, prebuild checking: +REM check for getopt.c,h + +set | findstr VCINSTALLDIR +if %errorlevel% EQU 1 goto vcerror + +set UTMAKE=ipmiutil2.mak +echo %LIBPATH% |findstr /C:amd64 >NUL +if %errorlevel% EQU 0 set UTMAKE=ipmiutil2-64.mak + +cd util +nmake /nologo -f %UTMAKE% all +cd .. + +echo buildwin2 ipmiutil done +goto done + +:vcerror +echo Need to first run vcvars.bat + +:done + diff --git a/cleanwin.cmd b/cleanwin.cmd new file mode 100644 index 0000000..0fbd64e --- /dev/null +++ b/cleanwin.cmd @@ -0,0 +1,23 @@ +@echo off +REM # cleanwin.cmd +REM # clean ipmiutil for windows +REM # + +REM call cleanssl (?) + +set UTMAKE=ipmiutil.mak +echo %LIBPATH% |findstr /C:amd64 >NUL +if %errorlevel% EQU 0 set UTMAKE=ipmiutil64.mak + +cd lib +nmake /nologo -f ipmilib.mak clean +cd .. +REM # echo make lib done + +cd util +nmake /nologo -f %UTMAKE% clean +del *.pdb 2>NUL +cd .. +REM # echo make util done + +echo cleanwin ipmiutil done diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..2fc3acc --- /dev/null +++ b/config.guess @@ -0,0 +1,1411 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-06-17' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +## for Red Hat Linux +if test -f /etc/redhat-release ; then + VENDOR=redhat ; +else + VENDOR= ; +fi + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-${VENDOR:-unknown}-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-${VENDOR:-unknown}-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu + exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-${VENDOR:-unknown}-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..95d7e2c --- /dev/null +++ b/config.h.in @@ -0,0 +1,118 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `memcpy' function. */ +#undef HAVE_MEMCPY + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define to 1 if you have the `socket' function. */ +#undef HAVE_SOCKET + +/* if socklen_t is defined, make note of it */ +#undef HAVE_SOCKLEN_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcspn' function. */ +#undef HAVE_STRCSPN + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strftime' function. */ +#undef HAVE_STRFTIME + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strspn' function. */ +#undef HAVE_STRSPN + +/* Define to 1 if you have the `strtoul' function. */ +#undef HAVE_STRTOUL + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYSLOG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Version number of package */ +#undef VERSION + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `long' if does not define. */ +#undef off_t + +/* if socklen_t is not defined, provide something useful */ +#undef socklen_t diff --git a/config.sub b/config.sub new file mode 100755 index 0000000..6b2ff9f --- /dev/null +++ b/config.sub @@ -0,0 +1,1500 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-06-18' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | s390 | s390x \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | s390-* | s390x-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure new file mode 100755 index 0000000..9bd7483 --- /dev/null +++ b/configure @@ -0,0 +1,22199 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59. +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="util/ipmiutil.c" +ac_default_prefix=/usr +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S SED CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LANDESK_CFLAGS LANDESK_LDADD IA64_CFLAGS LANPLUS_CFLAGS LANPLUS_LDADD LANPLUS_LIB LANPLUS_CRYPTO LANPLUS_SAM LD_SAMX GPL_CFLAGS OS_CFLAGS OS_LFLAGS OS_DRIVERS PKG_DIR INIT_DIR LIB_DIR INS_LIB SUBDIR_S CROSS_CFLAGS CROSS_LFLAGS SYSTEMD_DIR SHR_LINK LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-shared[=PKGS] + build shared libraries [default=yes] + --enable-static[=PKGS] + build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-landesk adds landesk library support [default=no] + --disable-lanplus disable lanplus support [default=enabled] + --enable-sha256 build with SHA256 support, requires later openssl. + --enable-standalone build standalone, with no GPL or LanPlus libs. + --enable-gpl build with some GPL code [default=no] + --enable-systemd enable systemd service type=notify support and %_unitdir [default=disabled] + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] + include additional configurations [automatic] + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + +am__api_version="1.9" +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break +done + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=ipmiutil + VERSION=2.9.3 + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + ac_config_headers="$ac_config_headers config.h" + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + + ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" + +fi; +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + + +depcc="$CC" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +# Extract the first word of "sed", so it can be a program name with args. +set dummy sed; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$SED"; then + ac_cv_prog_SED="$SED" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_SED="sed" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +SED=$ac_cv_prog_SED +if test -n "$SED"; then + echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + +for ac_header in fcntl.h sys/ioctl.h syslog.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_const=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_off_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_off_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define off_t long +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_time=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +if test "${ac_cv_struct_tm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +struct tm *tp; tp->tm_sec; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_struct_tm=time.h +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_struct_tm=sys/time.h +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF + +fi + + +if test $ac_cv_c_compiler_gnu = yes; then + echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 +echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 +if test "${ac_cv_prog_gcc_traditional+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_pattern="Autoconf.*'x'" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TIOCGETP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +else + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + + + +for ac_header in stdlib.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_func in getpagesize +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !STDC_HEADERS && !HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#if !HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# if !HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# if HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + exit (1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + exit (1); + if (write (fd, data, pagesize) != pagesize) + exit (1); + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + exit (1); + data2 = (char *) malloc (2 * pagesize); + if (!data2) + exit (1); + data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit (1); + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + exit (1); + if (read (fd, data3, pagesize) != pagesize) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit (1); + close (fd); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF + +fi +rm -f conftest.mmap + + +for ac_func in strftime +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + # strftime is in -lintl on SCO UNIX. +echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 +echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6 +if test "${ac_cv_lib_intl_strftime+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strftime (); +int +main () +{ +strftime (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_intl_strftime=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_intl_strftime=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 +echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6 +if test $ac_cv_lib_intl_strftime = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_STRFTIME 1 +_ACEOF + +LIBS="-lintl $LIBS" +fi + +fi +done + + +for ac_func in vprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +echo "$as_me:$LINENO: checking for _doprnt" >&5 +echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 +if test "${ac_cv_func__doprnt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define _doprnt to an innocuous variant, in case declares _doprnt. + For example, HP-UX 11i declares gettimeofday. */ +#define _doprnt innocuous__doprnt + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _doprnt (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef _doprnt + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _doprnt (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__doprnt) || defined (__stub____doprnt) +choke me +#else +char (*f) () = _doprnt; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != _doprnt; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func__doprnt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func__doprnt=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 +echo "${ECHO_T}$ac_cv_func__doprnt" >&6 +if test $ac_cv_func__doprnt = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOPRNT 1 +_ACEOF + +fi + +fi +done + + + + + + + + + +for ac_func in select socket strcspn strdup strspn strtoul memcpy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi; + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi; + +# Check whether --enable-fast-install or --disable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval="$enable_fast_install" + p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi; + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done + +fi + +SED=$lt_cv_path_SED + +echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6 +NM="$lt_cv_path_NM" + +echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | kfreebsd*-gnu | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 5710 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +lt_cv_cc_needs_belf=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + + +esac + +need_locks="$enable_libtool_lock" + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cxx_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +depcc="$CXX" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6 +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_F77" && break +done + + F77=$ac_ct_F77 +fi + + +# Provide some information about the compiler. +echo "$as_me:6836:" \ + "checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_f77_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 +else + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 +fi + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6 +else + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 +fi + +echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6 +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + AR=$ac_ct_AR +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=no + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi; +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7899: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7903: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8167: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8171: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 + +if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8271: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8275: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix3*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6 +test "$ld_shlibs" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 9740 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6 + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which library types will actually be built +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags or --without-tags was given. +if test "${with_tags+set}" = set; then + withval="$with_tags" + tagnames="$withval" +fi; + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13080: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:13084: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13184: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:13188: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 13720 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6 + +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" + +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:14778: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:14782: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:14882: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:14886: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_F77=no + fi + ;; + + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_F77=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_F77=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6 +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 16331 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6 + +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_F77" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17109: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17113: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17377: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17381: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17481: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:17485: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_GCJ=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6 +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 18950 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6 + +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_GCJ" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# Compile-time system search path for libraries +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_RC" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_const=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include +int +main () +{ +socklen_t len = 42; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_socklen_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_socklen_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_type_socklen_t != yes; then + +cat >>confdefs.h <<\_ACEOF +#define socklen_t int +_ACEOF + +else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SOCKLEN_T 1 +_ACEOF + +fi + +tmpspec=/tmp/iuspec.tmp$$ +archm=`uname -m` +sysname=`uname -s` +LIB_DIR="/usr/lib" +isredhat=0 +init_scripts="scripts/ipmi_port.sh scripts/ipmiutil_evt scripts/ipmiutil_asy scripts/ipmiutil_wdt" +projdir=`pwd` +SUBDIR_S="doc scripts lib util" +os=Linux + +# ltmain.sh, config.sub, et al should have been created, but check to be sure. +beforeprog="./beforeconf.sh" +progs="config.sub ltmain.sh" +for p in $progs +do + echo -e "checking for $p... \c" + if test -f "$p"; then + echo "yes" + else + echo "no" + echo "Run $beforeprog to configure the build environment." + exit 1 + fi +done + +#[ if test -n "$GCC"; then +# CFLAGS="$CFLAGS -Wall -D_REENTRANT" +# fi] + +drv_landesk=0 +# Check whether --enable-landesk or --disable-landesk was given. +if test "${enable_landesk+set}" = set; then + enableval="$enable_landesk" + if test "x$enableval" = "xyes"; then + drv_landesk=1 + LANDESK_CFLAGS="-DLINK_LANDESK" + LANDESK_LDADD="-lipmiapi -L../lib" + + + fi + +fi; + +# Check whether --enable-lanplus or --disable-lanplus was given. +if test "${enable_lanplus+set}" = set; then + enableval="$enable_lanplus" + +fi; +if test "x$enable_lanplus" = "xno"; then + drv_lanplus="" + LANPLUS_CFLAGS="" + LANPLUS_LDADD="" + LANPLUS_LIB="" + LANPLUS_CRYPTO="" + LANPLUS_SAM="no" + LD_SAMX="" +else + drv_lanplus="lanplus" + LANPLUS_CFLAGS="-DHAVE_LANPLUS" + # LANPLUS_CFLAGS="-DHAVE_LANPLUS -I${projdir}/lib/lanplus/inc" + # LANPLUS_LDADD="-L../lib -lintf_lanplus -L/usr/local/lib -lcrypto" + LANPLUS_LDADD="-L../lib -lipmi_lanplus -L/usr/local/lib -lcrypto" + LANPLUS_LIB="../lib/libipmi_lanplus.a" + LANPLUS_CRYPTO="-lcrypto" + LANPLUS_SAM="yes" + LD_SAMX="../lib/libipmi_lanplus.a -lcrypto" +fi + +#AC_ARG_ENABLE([liblanplus], +# [ --enable-liblanplus build libipmiutil.a with lanplus [[default=disabled]]],) +#if test "x$enable_liblanplus" = "xyes"; then +# LANPLUS_SAM="yes" +# LD_SAMX= "../lib/libipmi_lanplus.a -lcrypto" +#else +# LANPLUS_SAM="no" +# LD_SAMX="" +#fi + +# strings /lib/libssl.so* |grep EVP_sha256 +# Check whether --enable-sha256 or --disable-sha256 was given. +if test "${enable_sha256+set}" = set; then + enableval="$enable_sha256" + if test "x$enableval" = "xyes"; then + LANPLUS_CFLAGS="$LANPLUS_CFLAGS -DHAVE_SHA256" + fi + +fi; + +CROSS_LFLAGS="" +CROSS_CFLAGS="" + +# Check whether --enable-standalone or --disable-standalone was given. +if test "${enable_standalone+set}" = set; then + enableval="$enable_standalone" + if test "x$enableval" = "xyes"; then + GPL_CFLAGS="" + LANPLUS_CFLAGS="" + LANPLUS_LDADD="" + LANPLUS_LIB="" + LANPLUS_CRYPTO="" + LANPLUS_SAM="no" + LD_SAMX="" + CFLAGS="-O2" + SUBDIR_S="doc scripts util" + if test "x$cross_compiling" = "xyes"; then + # cross-compiling, so link with -static (e.g. Android ARM) + CROSS_LFLAGS="-static" + CROSS_CFLAGS="-DCROSS_COMPILE" + sed -i -e 's/^# ipmiutil: $(METASOURCE:.c=.o)/ipmiutil:\t$(METASOURCE:.c=.o)\n\t$(CC) $(CFLAGS) $(LDFLAGS) -o ipmiutil $(METASOURCE:.c=.o) $(LDADD)/' util/Makefile.am + fi + fi + +fi; + +# Check whether --enable-gpl or --disable-gpl was given. +if test "${enable_gpl+set}" = set; then + enableval="$enable_gpl" + if test "x$enableval" = "xyes"; then + GPL_CFLAGS="-DALLOW_GPL" + else + GPL_CFLAGS="" + fi + +fi; + +# Check whether --enable-systemd or --disable-systemd was given. +if test "${enable_systemd+set}" = set; then + enableval="$enable_systemd" + +fi; +if test "x$enable_systemd" = "xyes"; then + GPL_CFLAGS="$GPL_CFLAGS -DENABLE_SYSTEMD" + # if systemd enabled, install service scripts in unitdir + SYSTEMD_DIR=`rpm --eval "%{_unitdir}"` +else + # otherwise install the systemd service scripts in the data dir + if test "x$sysname" = "xDarwin" ; then + # MacOS 'which' command returns 0 always + SYSTEMD_DIR=/usr/share/ipmiutil + else + which rpm >/dev/null 2>&1 + if test $? -eq 0 ; then + datad=`rpm --eval "%{_datadir}"` + SYSTEMD_DIR=${datad}/ipmiutil + else + SYSTEMD_DIR=/usr/share/ipmiutil + fi + fi +fi + +case "$archm" in + ia64) + IA64_CFLAGS="-D__IA64__" + LIB_DIR="/usr/lib64" + ;; + ppc64) + IA64_CFLAGS="-DSTUB_IO" + LIB_DIR="/usr/lib64" + ;; + x86_64) + IA64_CFLAGS="" + LIB_DIR="/usr/lib64" + ;; + i386) + IA64_CFLAGS="" + ;; + i586) + IA64_CFLAGS="" + ;; + i686) + IA64_CFLAGS="" + ;; + sun4u) + IA64_CFLAGS="-D__SPARC__" + ;; + *) + IA64_CFLAGS="-DSTUB_IO" + ;; +esac + +echo $libdir |grep exec_prefix >/dev/null 2>&1 +if test $? -ne 0; then + LIB_DIR="$libdir" + echo "libdir set to $libdir" +fi + +PKG_DIR=/usr/src/packages +INS_LIB="" +SHR_LINK="libipmiutil.so" +init0= +if test "x$sysname" = "xSunOS"; then + echo "Detected Solaris" + os=solaris + archp=`uname -p` + if test -d "/usr/sfw/lib"; then + sfwdir=/usr/sfw + else + sfwdir=/usr/local + fi + OS_CFLAGS="-DSOLARIS -I${sfwdir}/include" + OS_LFLAGS="-L${sfwdir}/lib -lxnet -lsocket -lnsl -lresolv" + OS_DRIVERS="ipmibmc.c ipmilipmi.c" + drivers="bmc lipmi" + INS_LIB="# " + SHR_LINK="" +else + if test "x$sysname" = "xLinux"; then + MD2_CFLAGS="" + OS_LFLAGS="" + OS_DRIVERS="imbapi.c ipmimv.c ipmild.c ipmidir.c" + if test $drv_landesk -eq 1; then + drivers="open imb landesk direct" + else + drivers="open imb direct" + fi + os=linux + tmpc=/tmp/tmp.c + tmpo=/tmp/tmp.o + echo $ECHO_N "checking compile warning flags ... $ECHO_C" + cfwarn="-Wno-pointer-sign -Wno-sign-conversion -Wunused-result -Wgnu-designator" + echo "int main() { return(1); }" >$tmpc + gcc -o $tmpo -c $cfwarn $tmpc >/dev/null 2>&1 + if test $? -ne 0 ; then + cfwarn= + echo "skip" + else + echo "ok, suppress excess warnings" + fi + rm -f $tmpc $tmpo >/dev/null 2>&1 + echo $ECHO_N "checking compile fortify flags ... $ECHO_C" + cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" + echo "int main() { return(1); }" >$tmpc + gcc -o $tmpo -c $cfhard $tmpc >/dev/null 2>&1 + if test $? -ne 0 ; then + cfhard= + echo "skip" + else + echo "ok, add" + fi + rm -f $tmpc $tmpo >/dev/null 2>&1 + if test -f "/etc/debian_version"; then + echo "Detected Debian Linux" + os=debian + PKG_DIR=.. + INS_LIB="# " + # use dpkg-buildpackage instead of rpmbuild + else + which rpm >/dev/null 2>&1 + if test $? -eq 0; then + pkgtop=`rpm --eval "%{_topdir}"` + PKG_DIR=$pkgtop + fi + fi + if test -f "/etc/redhat-release"; then + echo "Detected Red Hat Linux" + os=redhat + isredhat=1 + fi + if test -f "/etc/SuSE-release"; then + echo "Detected SuSE Linux" + os=suse + sed -e 's/# POST_INSTALL/if [ ! -f \/etc\/snmp\/snmpd.conf ]; then\n if [ -f \/etc\/ucdsnmpd.conf ]; then\n mkdir -p \/etc\/snmp; ln -s \/etc\/ucdsnmpd.conf \/etc\/snmp\/snmpd.conf\n fi\nif [ -f \/etc\/snmpd.conf ]; then\nmkdir -p \/etc\/snmp; ln -s \/etc\/snmpd.conf \/etc\/snmp\/snmpd.conf\nfi\nfi\n#/' -e 's/make install DEST/make install-strip DEST/' doc/ipmiutil.spec >$tmpspec + cp -f $tmpspec doc/ipmiutil.spec + fi + if test -f "/etc/mvl-release"; then + echo "Detected MontaVista Linux" + os=montavista + init0=/etc/init.d + sed -e 's/openssl-devel/openssl-dev\n%ifarch x86_pentium3 x86_pentium4\nAutoReqProv: No\n%endif/' -e 's/%{_mandir}/\/usr\/share\/man/' -e 's/%{_initrddir}/\/etc\/init.d/' -e 's/%{_sysconfdir}/\/etc/' -e 's/# POST_INSTALL/newcrypto=%{_libdir}\/libcrypto.so.4\nif [ ! -f $newcrypto ]; then\n cp -f %{_libdir}\/libcrypto.so.0 $newcrypto\nfi\n#/' -e 's/make install DEST/make install-strip DEST/' doc/ipmiutil.spec >$tmpspec + cp -f $tmpspec doc/ipmiutil.spec + fi + if test -f "/etc/wrs-release" -o -d "$WIND_HOME"; then + echo "Detected WindRiver Linux" + os=windriver + echo "Be sure to set up the WR build environment first" + # WR requires extra steps in the spec file. + grep "%configure_target" doc/ipmiutil.spec >/dev/null 2>&1 + if test $? -ne 0; then + # WR changes have not been patched in, so make them. + sed -e 's/Release: 1%{?dist}/Release: 1_WR/' -e 's/%build/%build\n%configure_target\n%define _config_cache config.cache\n/' -e 's/^make$/make CC="$CC" TARGET_CFLAGS="$CFLAGS" TARGET_LDADD="-L%{_host_cross_lib_dir}" LDFLAGS="$LDFLAGS" CXX="$CXX" CXXFLAGS="$CXXFLAGS" LD="$LD" AS="$AS" AR="$AR" CPP="$CPP" NM="$NM" OBJCOPY="$OPBJCOPY" OBJDUMP="$OPBJDUMP" RANLIB="$RANLIB" STRIP="$STRIP"/' -e 's/%install/%install\n%configure_target\n/' doc/ipmiutil.spec >$tmpspec + cp -f $tmpspec doc/ipmiutil.spec + fi + # WRL libcrypto does not have MD2 + MD2_CFLAGS="-DSKIP_MD2" + init0=/etc/rc.d/init.d + fi + if test $isredhat -eq 0 ; then + # set default start/stop for init scripts + sed -i 's/# Default-Start:/# Default-Start: 3 4 5/' $init_scripts + sed -i 's/# Default-Stop:/# Default-Stop: 0 1 2 6/' $init_scripts + fi + if test -f "$LIB_DIR/libcrypto.so"; then + strings $LIB_DIR/libcrypto.so | grep EVP_md2 >/dev/null 2>&1 + if test $? -ne 0; then + echo "No MD2 detected in openssl libcrypto.so" + MD2_CFLAGS="-DSKIP_MD2" + fi + else + echo "No openssl $LIB_DIR/libcrypto.so detected" + MD2_CFLAGS="-DSKIP_MD2" + fi + OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfhard" + else + # usually "x$sysname" = "xFreeBSD", but allow NetBSD + echo $sysname | grep BSD >/dev/null 2>&1 + if test $? -eq 0; then + os=bsd + OS_CFLAGS="-DBSD" + OS_LFLAGS="" + OS_DRIVERS="ipmimv.c ipmidir.c" + drivers="open direct" + else + uname -a | grep -i HP-UX >/dev/null 2>&1 + hpux=$? + if test $hpux -eq 0; then + echo "Detected HP-UX" + os=hpux + MD2_CFLAGS="-DSKIP_MD2" + OS_CFLAGS="-DHPUX" + OS_LFLAGS="" + OS_DRIVERS="ipmimv.c" + drivers="open" + SHR_LINK="" + elif test "x$sysname" = "xDarwin" ; then + echo "Detected MacOSX" + os=macos + MD2_CFLAGS="-DSKIP_MD2" + OS_CFLAGS="-DMACOS" + OS_LFLAGS="" + OS_DRIVERS="ipmimv.c ipmidir.c" + drivers="open direct" + SHR_LINK="" + # optionally check for AppleBMC.kext here? + else + # not Solaris, Linux, BSD, or HP-UX = error + echo "OS $sysname not yet supported" + exit 1 + fi + fi + fi +fi + +if test "x$init0" = "x" ; then + if test "x$os" != "xmacos" ; then + which rpmbuild >/dev/null 2>&1 + if test $? -eq 0 ; then + init1=`rpmbuild --showrc |grep " _initrddir" | cut -d'}' -f2` + if test "x$init1" != "x" ; then + init0=/etc/${init1} + fi + fi + fi +fi +if test "x$init0" = "x" ; then + if test -d ${etcdir}/rc.d/init.d ; then + init0=/etc/rc.d/init.d; + else + init0=/etc/init.d; + fi +fi +INIT_DIR=${init0} + + + + + + + + + + + + + + + + + + + + + + + ac_config_files="$ac_config_files Makefile util/Makefile lib/lanplus/Makefile doc/Makefile scripts/Makefile" +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "util/Makefile" ) CONFIG_FILES="$CONFIG_FILES util/Makefile" ;; + "lib/lanplus/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/lanplus/Makefile" ;; + "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@mkdir_p@,$mkdir_p,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@am__leading_dot@,$am__leading_dot,;t t +s,@AMTAR@,$AMTAR,;t t +s,@am__tar@,$am__tar,;t t +s,@am__untar@,$am__untar,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@DEPDIR@,$DEPDIR,;t t +s,@am__include@,$am__include,;t t +s,@am__quote@,$am__quote,;t t +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +s,@CCDEPMODE@,$CCDEPMODE,;t t +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s,@LN_S@,$LN_S,;t t +s,@SED@,$SED,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@ECHO@,$ECHO,;t t +s,@AR@,$AR,;t t +s,@ac_ct_AR@,$ac_ct_AR,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@CXXDEPMODE@,$CXXDEPMODE,;t t +s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t +s,@CXXCPP@,$CXXCPP,;t t +s,@F77@,$F77,;t t +s,@FFLAGS@,$FFLAGS,;t t +s,@ac_ct_F77@,$ac_ct_F77,;t t +s,@LIBTOOL@,$LIBTOOL,;t t +s,@LANDESK_CFLAGS@,$LANDESK_CFLAGS,;t t +s,@LANDESK_LDADD@,$LANDESK_LDADD,;t t +s,@IA64_CFLAGS@,$IA64_CFLAGS,;t t +s,@LANPLUS_CFLAGS@,$LANPLUS_CFLAGS,;t t +s,@LANPLUS_LDADD@,$LANPLUS_LDADD,;t t +s,@LANPLUS_LIB@,$LANPLUS_LIB,;t t +s,@LANPLUS_CRYPTO@,$LANPLUS_CRYPTO,;t t +s,@LANPLUS_SAM@,$LANPLUS_SAM,;t t +s,@LD_SAMX@,$LD_SAMX,;t t +s,@GPL_CFLAGS@,$GPL_CFLAGS,;t t +s,@OS_CFLAGS@,$OS_CFLAGS,;t t +s,@OS_LFLAGS@,$OS_LFLAGS,;t t +s,@OS_DRIVERS@,$OS_DRIVERS,;t t +s,@PKG_DIR@,$PKG_DIR,;t t +s,@INIT_DIR@,$INIT_DIR,;t t +s,@LIB_DIR@,$LIB_DIR,;t t +s,@INS_LIB@,$INS_LIB,;t t +s,@SUBDIR_S@,$SUBDIR_S,;t t +s,@CROSS_CFLAGS@,$CROSS_CFLAGS,;t t +s,@CROSS_LFLAGS@,$CROSS_LFLAGS,;t t +s,@SYSTEMD_DIR@,$SYSTEMD_DIR,;t t +s,@SHR_LINK@,$SHR_LINK,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'`/stamp-h$_am_stamp_count +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`(dirname "$file") 2>/dev/null || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p $dirpart/$fdir + else + as_dir=$dirpart/$fdir + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + { (exit 1); exit 1; }; }; } + + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + +if test "x$sysname" = "xSunOS"; then + sed -e 's/^LDFLAGS = /LDFLAGS = -L\/usr\/sfw\/lib -lxnet -lsocket -lnsl /' -e 's/-DLINUX/-DSOLARIS -I\/usr\/sfw\/include/' util/Makefile >/tmp/make + # -e 's/ipmidir.c/ipmibmc.c/' + cp -f /tmp/make util/Makefile +fi + +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 +echo "$as_me:$LINENO: result: ipmiutil $VERSION" >&5 +echo "${ECHO_T}ipmiutil $VERSION" >&6 +echo "$as_me:$LINENO: result: OS : $os" >&5 +echo "${ECHO_T} OS : $os" >&6 +echo "$as_me:$LINENO: result: ARCH : $archm" >&5 +echo "${ECHO_T} ARCH : $archm" >&6 +echo "$as_me:$LINENO: result: DRIVERS : $drivers lan $drv_lanplus" >&5 +echo "${ECHO_T} DRIVERS : $drivers lan $drv_lanplus" >&6 +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..8f3e301 --- /dev/null +++ b/configure.ac @@ -0,0 +1,441 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(util/ipmiutil.c) +AM_INIT_AUTOMAKE(ipmiutil,2.9.3) +AM_CONFIG_HEADER(config.h) + +AC_PREFIX_DEFAULT(/usr) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_CHECK_PROG([SED], [sed], [sed]) + +dnl Checks for libraries. + +dnl Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(fcntl.h sys/ioctl.h syslog.h unistd.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_OFF_T +AC_HEADER_TIME +AC_STRUCT_TM + +dnl Checks for library functions. +AC_PROG_GCC_TRADITIONAL +AC_FUNC_MMAP +AC_FUNC_STRFTIME +AC_FUNC_VPRINTF +AC_CHECK_FUNCS(select socket strcspn strdup strspn strtoul memcpy) + +AM_PROG_LIBTOOL + +AC_CONST +AC_TRY_COMPILE([#include + #include ], + [socklen_t len = 42; return 0;], + ac_cv_type_socklen_t=yes, + ac_cv_type_socklen_t=no) +if test $ac_cv_type_socklen_t != yes; then + AC_DEFINE(socklen_t, int, [if socklen_t is not defined, provide something useful]) +else + AC_DEFINE(HAVE_SOCKLEN_T, 1, [if socklen_t is defined, make note of it]) +fi + +tmpspec=/tmp/iuspec.tmp$$ +archm=`uname -m` +sysname=`uname -s` +LIB_DIR="/usr/lib" +isredhat=0 +init_scripts="scripts/ipmi_port.sh scripts/ipmiutil_evt scripts/ipmiutil_asy scripts/ipmiutil_wdt" +projdir=`pwd` +SUBDIR_S="doc scripts lib util" +os=Linux + +# ltmain.sh, config.sub, et al should have been created, but check to be sure. +beforeprog="./beforeconf.sh" +progs="config.sub ltmain.sh" +for p in $progs +do + echo -e "checking for $p... \c" + if test -f "$p"; then + echo "yes" + else + echo "no" + echo "Run $beforeprog to configure the build environment." + exit 1 + fi +done + +#[ if test -n "$GCC"; then +# CFLAGS="$CFLAGS -Wall -D_REENTRANT" +# fi] + +drv_landesk=0 +dnl configure for LANDESK libipmiapi or not +AC_ARG_ENABLE([landesk], + [ --enable-landesk adds landesk library support [[default=no]]], + [if test "x$enableval" = "xyes"; then + drv_landesk=1 + LANDESK_CFLAGS="-DLINK_LANDESK" + LANDESK_LDADD="-lipmiapi -L../lib" + AC_SUBST(LANDESK_CFLAGS) + AC_SUBST(LANDESK_LDADD) + fi] + ) + +dnl Configure ipmiutil for lanplus (libipmi_lanplus.a) or not (default yes) +AC_ARG_ENABLE([lanplus], + [ --disable-lanplus disable lanplus support [[default=enabled]]],) +if test "x$enable_lanplus" = "xno"; then + drv_lanplus="" + LANPLUS_CFLAGS="" + LANPLUS_LDADD="" + LANPLUS_LIB="" + LANPLUS_CRYPTO="" + LANPLUS_SAM="no" + LD_SAMX="" +else + drv_lanplus="lanplus" + LANPLUS_CFLAGS="-DHAVE_LANPLUS" + # LANPLUS_CFLAGS="-DHAVE_LANPLUS -I${projdir}/lib/lanplus/inc" + # LANPLUS_LDADD="-L../lib -lintf_lanplus -L/usr/local/lib -lcrypto" + LANPLUS_LDADD="-L../lib -lipmi_lanplus -L/usr/local/lib -lcrypto" + LANPLUS_LIB="../lib/libipmi_lanplus.a" + LANPLUS_CRYPTO="-lcrypto" + LANPLUS_SAM="yes" + LD_SAMX="../lib/libipmi_lanplus.a -lcrypto" +fi + +dnl Configure libipmiutil.a for lanplus or not +dnl Only SOL requires lanplus, so usually build libipmiutil.a without lanplus +#AC_ARG_ENABLE([liblanplus], +# [ --enable-liblanplus build libipmiutil.a with lanplus [[default=disabled]]],) +#if test "x$enable_liblanplus" = "xyes"; then +# LANPLUS_SAM="yes" +# LD_SAMX= "../lib/libipmi_lanplus.a -lcrypto" +#else +# LANPLUS_SAM="no" +# LD_SAMX="" +#fi + +# strings /lib/libssl.so* |grep EVP_sha256 +dnl configure for SHA256, build lanplus with SHA256 support, uses later openssl. +AC_ARG_ENABLE([sha256], + [ --enable-sha256 build with SHA256 support, requires later openssl.], + [if test "x$enableval" = "xyes"; then + LANPLUS_CFLAGS="$LANPLUS_CFLAGS -DHAVE_SHA256" + fi] + ) + +CROSS_LFLAGS="" +CROSS_CFLAGS="" + +dnl configure for standalone, with no lanplus or GPL libs +AC_ARG_ENABLE([standalone], + [ --enable-standalone build standalone, with no GPL or LanPlus libs.], + [if test "x$enableval" = "xyes"; then + GPL_CFLAGS="" + LANPLUS_CFLAGS="" + LANPLUS_LDADD="" + LANPLUS_LIB="" + LANPLUS_CRYPTO="" + LANPLUS_SAM="no" + LD_SAMX="" + CFLAGS="-O2" + SUBDIR_S="doc scripts util" + if test "x$cross_compiling" = "xyes"; then + # cross-compiling, so link with -static (e.g. Android ARM) + CROSS_LFLAGS="-static" + CROSS_CFLAGS="-DCROSS_COMPILE" + sed -i -e 's/^# ipmiutil: $(METASOURCE:.c=.o)/ipmiutil:\t$(METASOURCE:.c=.o)\n\t$(CC) $(CFLAGS) $(LDFLAGS) -o ipmiutil $(METASOURCE:.c=.o) $(LDADD)/' util/Makefile.am + fi + fi] + ) + +dnl configure for GPL build or not (GPL files: md2.h, ipmi_ioctl.h) +AC_ARG_ENABLE([gpl], + [ --enable-gpl build with some GPL code [[default=no]]], + [if test "x$enableval" = "xyes"; then + GPL_CFLAGS="-DALLOW_GPL" + else + GPL_CFLAGS="" + fi] + ) + +dnl Does this Linux have systemd enabled? Otherwise use sysv init. +AC_ARG_ENABLE([systemd], + [ --enable-systemd enable systemd service type=notify support and %_unitdir [[default=disabled]]],) +if test "x$enable_systemd" = "xyes"; then + GPL_CFLAGS="$GPL_CFLAGS -DENABLE_SYSTEMD" + # if systemd enabled, install service scripts in unitdir + SYSTEMD_DIR=`rpm --eval "%{_unitdir}"` +else + # otherwise install the systemd service scripts in the data dir + if test "x$sysname" = "xDarwin" ; then + # MacOS 'which' command returns 0 always + SYSTEMD_DIR=/usr/share/ipmiutil + else + which rpm >/dev/null 2>&1 + if test $? -eq 0 ; then + datad=`rpm --eval "%{_datadir}"` + SYSTEMD_DIR=${datad}/ipmiutil + else + SYSTEMD_DIR=/usr/share/ipmiutil + fi + fi +fi + +case "$archm" in + ia64) + IA64_CFLAGS="-D__IA64__" + LIB_DIR="/usr/lib64" + ;; + ppc64) + IA64_CFLAGS="-DSTUB_IO" + LIB_DIR="/usr/lib64" + ;; + x86_64) + IA64_CFLAGS="" + LIB_DIR="/usr/lib64" + ;; + i386) + IA64_CFLAGS="" + ;; + i586) + IA64_CFLAGS="" + ;; + i686) + IA64_CFLAGS="" + ;; + sun4u) + IA64_CFLAGS="-D__SPARC__" + ;; + *) + IA64_CFLAGS="-DSTUB_IO" + ;; +esac + +dnl # libdir can be set with --libdir=/usr/lib (default=${exec_prefix}/lib) +echo $libdir |grep exec_prefix >/dev/null 2>&1 +if test $? -ne 0; then + LIB_DIR="$libdir" + echo "libdir set to $libdir" +fi + +PKG_DIR=/usr/src/packages +INS_LIB="" +SHR_LINK="libipmiutil.so" +init0= +if test "x$sysname" = "xSunOS"; then + echo "Detected Solaris" + os=solaris + archp=`uname -p` + if test -d "/usr/sfw/lib"; then + sfwdir=/usr/sfw + else + sfwdir=/usr/local + fi + OS_CFLAGS="-DSOLARIS -I${sfwdir}/include" + OS_LFLAGS="-L${sfwdir}/lib -lxnet -lsocket -lnsl -lresolv" + OS_DRIVERS="ipmibmc.c ipmilipmi.c" + drivers="bmc lipmi" + INS_LIB="# " + SHR_LINK="" +else + if test "x$sysname" = "xLinux"; then + MD2_CFLAGS="" + OS_LFLAGS="" + OS_DRIVERS="imbapi.c ipmimv.c ipmild.c ipmidir.c" + if test $drv_landesk -eq 1; then + drivers="open imb landesk direct" + else + drivers="open imb direct" + fi + os=linux + tmpc=/tmp/tmp.c + tmpo=/tmp/tmp.o + echo $ECHO_N "checking compile warning flags ... $ECHO_C" + cfwarn="-Wno-pointer-sign -Wno-sign-conversion -Wunused-result -Wgnu-designator" + echo "int main() { return(1); }" >$tmpc + gcc -o $tmpo -c $cfwarn $tmpc >/dev/null 2>&1 + if test $? -ne 0 ; then + cfwarn= + echo "skip" + else + echo "ok, suppress excess warnings" + fi + rm -f $tmpc $tmpo >/dev/null 2>&1 + echo $ECHO_N "checking compile fortify flags ... $ECHO_C" + cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" + echo "int main() { return(1); }" >$tmpc + gcc -o $tmpo -c $cfhard $tmpc >/dev/null 2>&1 + if test $? -ne 0 ; then + cfhard= + echo "skip" + else + echo "ok, add" + fi + rm -f $tmpc $tmpo >/dev/null 2>&1 + if test -f "/etc/debian_version"; then + echo "Detected Debian Linux" + os=debian + PKG_DIR=.. + INS_LIB="# " + # use dpkg-buildpackage instead of rpmbuild + else + which rpm >/dev/null 2>&1 + if test $? -eq 0; then + pkgtop=`rpm --eval "%{_topdir}"` + PKG_DIR=$pkgtop + fi + fi + if test -f "/etc/redhat-release"; then + echo "Detected Red Hat Linux" + os=redhat + isredhat=1 + fi + if test -f "/etc/SuSE-release"; then + echo "Detected SuSE Linux" + os=suse + sed -e 's/# POST_INSTALL/if [ ! -f \/etc\/snmp\/snmpd.conf ]; then\n if [ -f \/etc\/ucdsnmpd.conf ]; then\n mkdir -p \/etc\/snmp; ln -s \/etc\/ucdsnmpd.conf \/etc\/snmp\/snmpd.conf\n fi\nif [ -f \/etc\/snmpd.conf ]; then\nmkdir -p \/etc\/snmp; ln -s \/etc\/snmpd.conf \/etc\/snmp\/snmpd.conf\nfi\nfi\n#/' -e 's/make install DEST/make install-strip DEST/' doc/ipmiutil.spec >$tmpspec + cp -f $tmpspec doc/ipmiutil.spec + fi + if test -f "/etc/mvl-release"; then + echo "Detected MontaVista Linux" + os=montavista + init0=/etc/init.d + sed -e 's/openssl-devel/openssl-dev\n%ifarch x86_pentium3 x86_pentium4\nAutoReqProv: No\n%endif/' -e 's/%{_mandir}/\/usr\/share\/man/' -e 's/%{_initrddir}/\/etc\/init.d/' -e 's/%{_sysconfdir}/\/etc/' -e 's/# POST_INSTALL/newcrypto=%{_libdir}\/libcrypto.so.4\nif [ ! -f $newcrypto ]; then\n cp -f %{_libdir}\/libcrypto.so.0 $newcrypto\nfi\n#/' -e 's/make install DEST/make install-strip DEST/' doc/ipmiutil.spec >$tmpspec + cp -f $tmpspec doc/ipmiutil.spec + fi + if test -f "/etc/wrs-release" -o -d "$WIND_HOME"; then + echo "Detected WindRiver Linux" + os=windriver + echo "Be sure to set up the WR build environment first" + # WR requires extra steps in the spec file. + grep "%configure_target" doc/ipmiutil.spec >/dev/null 2>&1 + if test $? -ne 0; then + # WR changes have not been patched in, so make them. + sed -e 's/Release: 1%{?dist}/Release: 1_WR/' -e 's/%build/%build\n%configure_target\n%define _config_cache config.cache\n/' -e 's/^make$/make CC="$CC" TARGET_CFLAGS="$CFLAGS" TARGET_LDADD="-L%{_host_cross_lib_dir}" LDFLAGS="$LDFLAGS" CXX="$CXX" CXXFLAGS="$CXXFLAGS" LD="$LD" AS="$AS" AR="$AR" CPP="$CPP" NM="$NM" OBJCOPY="$OPBJCOPY" OBJDUMP="$OPBJDUMP" RANLIB="$RANLIB" STRIP="$STRIP"/' -e 's/%install/%install\n%configure_target\n/' doc/ipmiutil.spec >$tmpspec + cp -f $tmpspec doc/ipmiutil.spec + fi + # WRL libcrypto does not have MD2 + MD2_CFLAGS="-DSKIP_MD2" + init0=/etc/rc.d/init.d + fi + if test $isredhat -eq 0 ; then + # set default start/stop for init scripts + sed -i 's/# Default-Start:/# Default-Start: 3 4 5/' $init_scripts + sed -i 's/# Default-Stop:/# Default-Stop: 0 1 2 6/' $init_scripts + fi + if test -f "$LIB_DIR/libcrypto.so"; then + strings $LIB_DIR/libcrypto.so | grep EVP_md2 >/dev/null 2>&1 + if test $? -ne 0; then + echo "No MD2 detected in openssl libcrypto.so" + MD2_CFLAGS="-DSKIP_MD2" + fi + else + echo "No openssl $LIB_DIR/libcrypto.so detected" + MD2_CFLAGS="-DSKIP_MD2" + fi + OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfhard" + else + # usually "x$sysname" = "xFreeBSD", but allow NetBSD + echo $sysname | grep BSD >/dev/null 2>&1 + if test $? -eq 0; then + os=bsd + OS_CFLAGS="-DBSD" + OS_LFLAGS="" + OS_DRIVERS="ipmimv.c ipmidir.c" + drivers="open direct" + else + uname -a | grep -i HP-UX >/dev/null 2>&1 + hpux=$? + if test $hpux -eq 0; then + echo "Detected HP-UX" + os=hpux + MD2_CFLAGS="-DSKIP_MD2" + OS_CFLAGS="-DHPUX" + OS_LFLAGS="" + OS_DRIVERS="ipmimv.c" + drivers="open" + SHR_LINK="" + elif test "x$sysname" = "xDarwin" ; then + echo "Detected MacOSX" + os=macos + MD2_CFLAGS="-DSKIP_MD2" + OS_CFLAGS="-DMACOS" + OS_LFLAGS="" + OS_DRIVERS="ipmimv.c ipmidir.c" + drivers="open direct" + SHR_LINK="" + # optionally check for AppleBMC.kext here? + else + # not Solaris, Linux, BSD, or HP-UX = error + echo "OS $sysname not yet supported" + exit 1 + fi + fi + fi +fi + +dnl determine where the init.d directory is +if test "x$init0" = "x" ; then + if test "x$os" != "xmacos" ; then + which rpmbuild >/dev/null 2>&1 + if test $? -eq 0 ; then + init1=`rpmbuild --showrc |grep " _initrddir" | cut -d'}' -f2` + if test "x$init1" != "x" ; then + init0=/etc/${init1} + fi + fi + fi +fi +if test "x$init0" = "x" ; then + if test -d ${etcdir}/rc.d/init.d ; then + init0=/etc/rc.d/init.d; + else + init0=/etc/init.d; + fi +fi +INIT_DIR=${init0} + +AC_SUBST(IA64_CFLAGS) +AC_SUBST(LANPLUS_CFLAGS) +AC_SUBST(LANPLUS_LDADD) +AC_SUBST(LANPLUS_LIB) +AC_SUBST(LANPLUS_CRYPTO) +AC_SUBST(LANPLUS_SAM) +AC_SUBST(LD_SAMX) +AC_SUBST(GPL_CFLAGS) +AC_SUBST(OS_CFLAGS) +AC_SUBST(OS_LFLAGS) +AC_SUBST(OS_DRIVERS) +AC_SUBST(PKG_DIR) +AC_SUBST(INIT_DIR) +AC_SUBST(LIB_DIR) +AC_SUBST(INS_LIB) +AC_SUBST(SUBDIR_S) +AC_SUBST(CROSS_CFLAGS) +AC_SUBST(CROSS_LFLAGS) +AC_SUBST(SYSTEMD_DIR) +AC_SUBST(SHR_LINK) + +AC_OUTPUT(Makefile util/Makefile lib/lanplus/Makefile doc/Makefile scripts/Makefile) + +if test "x$sysname" = "xSunOS"; then + sed -e 's/^LDFLAGS = /LDFLAGS = -L\/usr\/sfw\/lib -lxnet -lsocket -lnsl /' -e 's/-DLINUX/-DSOLARIS -I\/usr\/sfw\/include/' util/Makefile >/tmp/make + # -e 's/ipmidir.c/ipmibmc.c/' + cp -f /tmp/make util/Makefile +fi + +AC_MSG_RESULT([]) +AC_MSG_RESULT([ipmiutil $VERSION]) +AC_MSG_RESULT([ OS : $os]) +AC_MSG_RESULT([ ARCH : $archm]) +AC_MSG_RESULT([ DRIVERS : $drivers lan $drv_lanplus]) +AC_MSG_RESULT([]) + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..36a5f39 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,272 @@ +ipmiutil (2.9.3-1) unstable; urgency=low + + * New upstream version. + + -- Andy Cress Mon, 02 Dec 2013 22:39:56 -0500 + +ipmiutil (2.9.3-2) unstable; urgency=low + + * New upstream version. + + -- Andy Cress Mon, 02 Dec 2013 22:39:26 -0500 + +ipmiutil (2.9.2-2) unstable; urgency=low + + * New upstream version. + + -- Andy Cress Fri, 18 Oct 2013 04:11:06 -0400 + +ipmiutil (2.9.2-1) unstable; urgency=low + + * Initial official Debian release (Closes: #650323) + * Updated debian/copyright to DEP-5 format, and included more detail + * See also ChangeLog file in source + + -- Andy Cress Fri, 14 Jun 2013 12:08:08 -0400 + +ipmiutil (2.9.1+nmu1) UNRELEASED; urgency=low + + * updated rules to use dh syntax and debhelper 9 (up from 4); many lintian + cleanups as a result + * added dh-autoreconf as a build dependency; can now stop using beforeconf.sh + * updated control file with additional information and standards-version + * --enable-gpl is now used in rules; enables MD2 hash for IPMI LAN + * daily cronjob is no longer installed via postinst script + * prerm script added, properly deletes /var/lib/ipmiutil on purge + + -- Alex Waite Fri, 14 Jun 2013 17:21:15 +0200 + +ipmiutil (2.9.1) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Fri, 12 Apr 2013 07:21:54 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 04 Apr 2013 21:14:03 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 04 Apr 2013 21:12:25 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 04 Apr 2013 21:09:44 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 04 Apr 2013 21:06:46 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 04 Apr 2013 21:00:16 -0400 + +ipmiutil (2.9.0) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 04 Apr 2013 20:58:37 -0400 + +ipmiutil (2.8.9) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Sun, 31 Mar 2013 18:51:35 -0400 + +ipmiutil (2.8.9) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Sun, 31 Mar 2013 18:51:07 -0400 + +ipmiutil (2.8.9) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Sun, 31 Mar 2013 18:50:35 -0400 + +ipmiutil (2.8.9) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Sun, 31 Mar 2013 18:49:23 -0400 + +ipmiutil (2.8.9) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Sun, 31 Mar 2013 18:46:31 -0400 + +ipmiutil (2.8.8) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 17 Jan 2013 06:06:40 -0500 + +ipmiutil (2.8.7) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Tue, 11 Dec 2012 16:17:16 -0500 + +ipmiutil (2.8.6) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 30 Aug 2012 11:57:52 -0400 + +ipmiutil (2.8.5) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Wed, 13 Jun 2012 12:16:30 -0400 + +ipmiutil (2.8.5) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Wed, 13 Jun 2012 12:15:57 -0400 + +ipmiutil (2.8.5) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Wed, 13 Jun 2012 11:39:40 -0400 + +ipmiutil (2.8.4) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 03 May 2012 11:03:55 -0400 + +ipmiutil (2.8.4) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Wed, 02 May 2012 15:53:24 -0400 + +ipmiutil (2.8.3) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 22 Mar 2012 16:36:45 -0400 + +ipmiutil (2.8.2) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Mon, 13 Feb 2012 10:12:08 -0500 + +ipmiutil (2.8.1) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Fri, 13 Jan 2012 10:27:46 -0500 + +ipmiutil (2.8.0) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Wed, 07 Dec 2011 16:50:02 -0500 + +ipmiutil (2.8.0) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Wed, 07 Dec 2011 16:49:11 -0500 + +ipmiutil (2.8.0b) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Fri, 02 Dec 2011 18:37:57 -0500 + +ipmiutil (2.8.0) UNRELEASED; urgency=low + + * New upstream version, added prerm script + + -- Andy Cress Fri, 28 Oct 2011 16:44:02 -0400 + +ipmiutil (2.7.9) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Fri, 28 Oct 2011 16:43:35 -0400 + +ipmiutil (2.8.0) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Wed, 26 Oct 2011 11:01:02 -0400 + +ipmiutil (2.7.9) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Tue, 20 Sep 2011 08:17:01 -0400 + +ipmiutil (2.7.9) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Tue, 20 Sep 2011 08:14:05 -0400 + +ipmiutil (2.7.9) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 15 Sep 2011 17:13:31 -0400 + +ipmiutil (2.7.8) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Tue, 19 Jul 2011 12:57:11 -0400 + +ipmiutil (2.7.7) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Mon, 16 May 2011 16:49:12 -0400 + +ipmiutil (2.7.6) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Fri, 15 Apr 2011 12:47:17 -0400 + +ipmiutil (2.7.5) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Fri, 25 Feb 2011 12:43:45 -0500 + +ipmiutil (2.7.4) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Tue, 11 Jan 2011 13:52:43 -0500 + +ipmiutil (2.7.3) UNRELEASED; urgency=low + + * New upstream version. + + -- Andy Cress Fri, 17 Dec 2010 14:30:28 -0500 + +ipmiutil (2.7.2) UNRELEASED; urgency=low + + * New upstream version. + * Patch to allow Debian package builds from svn. + + -- Andy Cress Fri, 29 Oct 2010 16:44:31 -0500 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..b69ef91 --- /dev/null +++ b/debian/control @@ -0,0 +1,27 @@ +Source: ipmiutil +Section: utils +Priority: optional +Maintainer: Andy Cress +Build-Depends: debhelper (>> 9), dh-autoreconf, libssl-dev +Standards-Version: 3.9.4.0 +Vcs-Svn: svn://svn.code.sf.net/p/ipmiutil/code/trunk +Vcs-Browser: https://sourceforge.net/p/ipmiutil/code/HEAD/tree/trunk/ +Homepage: http://ipmiutil.sourceforge.net/ + +Package: ipmiutil +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base +Suggests: openipmi +Description: Easy-to-use IPMI server management utilities + The ipmiutil package provides easy-to-use utilities to view the SEL, + perform an IPMI chassis reset, set up the IPMI LAN and Platform Event Filter + entries to allow SNMP alerts, Serial-Over-LAN console, event daemon, and + other IPMI tasks. + . + These can be invoked with the metacommand ipmiutil, or via subcommand + shortcuts as well. IPMIUTIL can also write sensor thresholds, FRU asset tags, + and has a full IPMI configuration save/restore. + An IPMI driver can be provided by either the OpenIPMI driver (/dev/ipmi0) + or the Intel IPMI driver (/dev/imb), etc. If used locally and no driver is + detected, ipmiutil will use user-space direct I/Os instead. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..1800759 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,129 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ipmiutil +Upstream-Contact: Andy Cress +Source: http://ipmiutil.sourceforge.net +Comment: This package was debianized by Andy Cress on 2010-10-29, + with Debian package updates by Alex Waite on 2013-06-14 + +Files: * +Copyright: 2001-2008, Intel Corporation + 2009-2012, Kontron America + 2013, Andy Cress +License: BSD-3-clause + +Files: lib/lanplus/* +Copyright: 2003 Sun Microsystems, Inc. +License: BSD-3-clause + +Files: util/itsol.c +Copyright: 2005 Tyan Computer Corp. +License: BSD-3-clause + +Files: util/iekanalyzer.c +Copyright: 2007 Kontron Canada, Inc. + 2003 Sun Microsystems, Inc. +License: BSD-3-clause + +Files: util/md2.h +Copyright: 2003 FreeIPMI Core Team +Comment: Optional to include this file, based on configure options +License: GPL-2.0 + +Files: util/AnsiTerm.cpp +Copyright: 2009 Robert Nelson +License: BSD-2-clause + +Files: util/oem_dell.c +Copyright: 2008, Dell Inc +License: BSD-3-clause + +Files: util/oem_sun.c +Copyright: 2005 Sun Microsystems, Inc. +License: BSD-3-clause + +Files: util/ifirewall.c +Copyright: 2010 Kontron America Inc. + 2005 International Business Machines, Inc. + 2003 Sun Microsystems, Inc. +License: BSD-3-clause + +Files: util/ifwum.c util/ihpm.c +Copyright: 2004-2006 Kontron Canada, Inc. + 2003 Sun Microsystems, Inc. +License: BSD-3-clause + +Files: util/md5.c +Copyright: 1999, 2000, 2002 Aladdin Enterprises. +Comment: Aladdin unrestricted license is compatible with BSD-3-clause +License: Aladdin + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + L. Peter Deutsch + ghost@aladdin.com + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + a. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + c. Neither the name of Kontron, nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + a. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: GPL-2.0 + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + A copy of the GNU General Public License is available as + /usr/share/common-licenses/GPL-2 in the Debian distribution or on + the World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can + also obtain it by writing to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..d398c09 --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +etc/init.d +etc/cron.daily diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..55bc0a6 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README +AUTHORS diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..793f54c --- /dev/null +++ b/debian/files @@ -0,0 +1 @@ +ipmiutil_2.9.1_amd64.deb utils optional diff --git a/debian/ipmiutil.cron.daily b/debian/ipmiutil.cron.daily new file mode 120000 index 0000000..9241b18 --- /dev/null +++ b/debian/ipmiutil.cron.daily @@ -0,0 +1 @@ +../scripts/checksel \ No newline at end of file diff --git a/debian/ipmiutil.lintian-overrides b/debian/ipmiutil.lintian-overrides new file mode 100644 index 0000000..5667e46 --- /dev/null +++ b/debian/ipmiutil.lintian-overrides @@ -0,0 +1,4 @@ +# The only GPL code in ipmiutil is md2.h, which is excluded +# by default, so ignore unsafe link with openssl warning +ipmiutil: possible-gpl-code-linked-with-openssl + diff --git a/debian/ipmiutil.substvars b/debian/ipmiutil.substvars new file mode 100644 index 0000000..275a91d --- /dev/null +++ b/debian/ipmiutil.substvars @@ -0,0 +1,2 @@ +shlibs:Depends=libc6 (>= 2.15), libssl1.0.0 (>= 1.0.0) +misc:Depends= diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..399957f --- /dev/null +++ b/debian/postinst @@ -0,0 +1,41 @@ +#!/bin/sh +# Debian postinstall script +# +# see: dh_installdeb(1) +set -e +case "$1" in + configure) + sbindir=/usr/bin + vardir=/var/lib/ipmiutil + sensorout=$vardir/sensor_out.txt + + mkdir -p $vardir + + # Run some ipmiutil command to see if any IPMI interface works. + IPMIcmd=true + $sbindir/ipmiutil sel -v >/dev/null 2>&1 || IPMIcmd=false + + # If IPMIcmd is still true, then the IPMI command was successful, and IPMI is enabled locally. + if $IPMIcmd ; then + # Capture a snapshot of IPMI sensor data once now for later reuse. + if [ ! -f $sensorout ]; then + $sbindir/ipmiutil sensor -q >$sensorout + fi + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/prerm b/debian/prerm new file mode 100755 index 0000000..e66d2d9 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,26 @@ +#!/bin/sh +# Debian prerm script +# +set -e + +case "$1" in + purge) + if [ -d /var/lib/ipmiutil/ ] + then + rm -Rf /var/lib/ipmiutil/ + fi + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..49191d6 --- /dev/null +++ b/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f +%: + dh $@ --with autoreconf + +PKD = $(abspath $(dir $(MAKEFILE_LIST))) +PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source)) +VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};') + +.PHONY: get-orig-source +## http://wiki.debian.org/onlyjob/get-orig-source +get-orig-source: $(info I: $(PKG)_$(VER)) + @echo "# Downloading..." + uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD) + +override_dh_auto_configure: + dh_auto_configure -- --enable-gpl + +# work around bug #670796 +override_dh_autoreconf: + dh_autoreconf --exclude=mkinstalldirs + +override_dh_installchangelogs: + dh_installchangelogs ChangeLog diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..f1d1c3c --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/ipmiutil/ipmiutil-(.+)\.tar\.gz diff --git a/depcomp b/depcomp new file mode 100755 index 0000000..04701da --- /dev/null +++ b/depcomp @@ -0,0 +1,530 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2005-07-09.11 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mecanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..3c9c43a --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,383 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# doc/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +srcdir = . +top_srcdir = .. + +pkgdatadir = $(datadir)/ipmiutil +pkglibdir = $(libdir)/ipmiutil +pkgincludedir = $(includedir)/ipmiutil +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = /usr/bin/install -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-redhat-linux-gnu +host_triplet = x86_64-redhat-linux-gnu +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.3/missing --run aclocal-1.9 +AMDEP_FALSE = # +AMDEP_TRUE = +AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.3/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.3/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.3/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.3/missing --run automake-1.9 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CROSS_CFLAGS = +CROSS_LFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = grep -E +EXEEXT = +F77 = f95 +FFLAGS = -g -O2 +GPL_CFLAGS = +IA64_CFLAGS = +INIT_DIR = /etc//rc.d/init.d +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s +INS_LIB = +LANDESK_CFLAGS = +LANDESK_LDADD = +LANPLUS_CFLAGS = -DHAVE_LANPLUS +LANPLUS_CRYPTO = -lcrypto +LANPLUS_LDADD = -L../lib -lipmi_lanplus -L/usr/local/lib -lcrypto +LANPLUS_LIB = ../lib/libipmi_lanplus.a +LANPLUS_SAM = yes +LDFLAGS = +LD_SAMX = ../lib/libipmi_lanplus.a -lcrypto +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIB_DIR = /usr/lib64 +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.3/missing --run makeinfo +OBJEXT = o +OS_CFLAGS = -DLINUX -fPIC -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 +OS_DRIVERS = imbapi.c ipmimv.c ipmild.c ipmidir.c +OS_LFLAGS = +PACKAGE = ipmiutil +PACKAGE_BUGREPORT = +PACKAGE_NAME = +PACKAGE_STRING = +PACKAGE_TARNAME = +PACKAGE_VERSION = +PATH_SEPARATOR = : +PKG_DIR = /usr/src/redhat +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +SHR_LINK = libipmiutil.so +STRIP = strip +SUBDIR_S = doc scripts lib util +SYSTEMD_DIR = /usr/share/ipmiutil +VERSION = 2.9.3 +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_F77 = f95 +ac_ct_RANLIB = ranlib +ac_ct_STRIP = strip +am__fastdepCC_FALSE = # +am__fastdepCC_TRUE = +am__fastdepCXX_FALSE = # +am__fastdepCXX_TRUE = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-redhat-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = redhat +datadir = ${prefix}/share +exec_prefix = ${prefix} +host = x86_64-redhat-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = redhat +includedir = ${prefix}/include +infodir = ${prefix}/info +install_sh = /usr/dev/ipmiutil-2.9.3/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localstatedir = ${prefix}/var +mandir = ${prefix}/share/man +mkdir_p = mkdir -p -- +oldincludedir = /usr/include +prefix = /usr +program_transform_name = s,x,x, +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +sysconfdir = ${prefix}/etc +target_alias = + +#!/bin/sh +# Makefile to build/install doc files +# +MKDIR = sh ../mkinstalldirs +INSTALL_SH = sh ../install-sh -c +INSTALL_DATA_SH = ${INSTALL_SH} -m 644 +docdir = ${prefix}/share/doc/ipmiutil-${version} +etcdir = /etc +datato = ${DESTDIR}${datadir}/ipmiutil +cronto = ${DESTDIR}${etcdir}/cron.daily +manto = ${DESTDIR}${mandir}/man8 +varto = ${DESTDIR}/var/lib/ipmiutil +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + + +all: + +clean: + +clobber: + +distclean: + +check: + +install: + $(MKDIR) ${manto} + $(MKDIR) ${datato} + $(MKDIR) ${varto} + ${INSTALL_DATA_SH} isel.8 ${manto} + ${INSTALL_DATA_SH} isensor.8 ${manto} + ${INSTALL_DATA_SH} ireset.8 ${manto} + ${INSTALL_DATA_SH} ialarms.8 ${manto} + ${INSTALL_DATA_SH} iwdt.8 ${manto} + ${INSTALL_DATA_SH} ifru.8 ${manto} + ${INSTALL_DATA_SH} ilan.8 ${manto} + ${INSTALL_DATA_SH} iserial.8 ${manto} + ${INSTALL_DATA_SH} icmd.8 ${manto} + ${INSTALL_DATA_SH} igetevent.8 ${manto} + ${INSTALL_DATA_SH} ihealth.8 ${manto} + ${INSTALL_DATA_SH} ipmiutil.8 ${manto} + ${INSTALL_DATA_SH} isol.8 ${manto} + ${INSTALL_DATA_SH} idiscover.8 ${manto} + ${INSTALL_DATA_SH} ievents.8 ${manto} + ${INSTALL_DATA_SH} iconfig.8 ${manto} + ${INSTALL_DATA_SH} ipmi_port.8 ${manto} + ${INSTALL_DATA_SH} ipicmg.8 ${manto} + ${INSTALL_DATA_SH} ifirewall.8 ${manto} + ${INSTALL_DATA_SH} ifwum.8 ${manto} + ${INSTALL_DATA_SH} ihpm.8 ${manto} + ${INSTALL_DATA_SH} isunoem.8 ${manto} + ${INSTALL_DATA_SH} itsol.8 ${manto} + ${INSTALL_DATA_SH} iekanalyzer.8 ${manto} + ${INSTALL_DATA_SH} idelloem.8 ${manto} + ${INSTALL_DATA_SH} idcmi.8 ${manto} + ${INSTALL_DATA_SH} ismcoem.8 ${manto} + ${INSTALL_DATA_SH} bmclanpet.mib ${datato} + cd ${manto}; gzip -f *.8 +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..832b0d1 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,61 @@ +#!/bin/sh +# Makefile to build/install doc files +# +MKDIR = sh ../mkinstalldirs +INSTALL_SH = sh ../install-sh -c +INSTALL_DATA_SH = ${INSTALL_SH} -m 644 +prefix = /usr + +datadir = ${prefix}/share +mandir = ${prefix}/share/man +docdir = ${prefix}/share/doc/ipmiutil-${version} +etcdir = /etc +datato = ${DESTDIR}${datadir}/ipmiutil +cronto = ${DESTDIR}${etcdir}/cron.daily +manto = ${DESTDIR}${mandir}/man8 +varto = ${DESTDIR}/var/lib/ipmiutil + +all: + +clean: + +clobber: + +distclean: + +check: + +install: + $(MKDIR) ${manto} + $(MKDIR) ${datato} + $(MKDIR) ${varto} + ${INSTALL_DATA_SH} isel.8 ${manto} + ${INSTALL_DATA_SH} isensor.8 ${manto} + ${INSTALL_DATA_SH} ireset.8 ${manto} + ${INSTALL_DATA_SH} ialarms.8 ${manto} + ${INSTALL_DATA_SH} iwdt.8 ${manto} + ${INSTALL_DATA_SH} ifru.8 ${manto} + ${INSTALL_DATA_SH} ilan.8 ${manto} + ${INSTALL_DATA_SH} iserial.8 ${manto} + ${INSTALL_DATA_SH} icmd.8 ${manto} + ${INSTALL_DATA_SH} igetevent.8 ${manto} + ${INSTALL_DATA_SH} ihealth.8 ${manto} + ${INSTALL_DATA_SH} ipmiutil.8 ${manto} + ${INSTALL_DATA_SH} isol.8 ${manto} + ${INSTALL_DATA_SH} idiscover.8 ${manto} + ${INSTALL_DATA_SH} ievents.8 ${manto} + ${INSTALL_DATA_SH} iconfig.8 ${manto} + ${INSTALL_DATA_SH} ipmi_port.8 ${manto} + ${INSTALL_DATA_SH} ipicmg.8 ${manto} + ${INSTALL_DATA_SH} ifirewall.8 ${manto} + ${INSTALL_DATA_SH} ifwum.8 ${manto} + ${INSTALL_DATA_SH} ihpm.8 ${manto} + ${INSTALL_DATA_SH} isunoem.8 ${manto} + ${INSTALL_DATA_SH} itsol.8 ${manto} + ${INSTALL_DATA_SH} iekanalyzer.8 ${manto} + ${INSTALL_DATA_SH} idelloem.8 ${manto} + ${INSTALL_DATA_SH} idcmi.8 ${manto} + ${INSTALL_DATA_SH} ismcoem.8 ${manto} + ${INSTALL_DATA_SH} bmclanpet.mib ${datato} + cd ${manto}; gzip -f *.8 + diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..a6825ce --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,383 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CROSS_CFLAGS = @CROSS_CFLAGS@ +CROSS_LFLAGS = @CROSS_LFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GPL_CFLAGS = @GPL_CFLAGS@ +IA64_CFLAGS = @IA64_CFLAGS@ +INIT_DIR = @INIT_DIR@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INS_LIB = @INS_LIB@ +LANDESK_CFLAGS = @LANDESK_CFLAGS@ +LANDESK_LDADD = @LANDESK_LDADD@ +LANPLUS_CFLAGS = @LANPLUS_CFLAGS@ +LANPLUS_CRYPTO = @LANPLUS_CRYPTO@ +LANPLUS_LDADD = @LANPLUS_LDADD@ +LANPLUS_LIB = @LANPLUS_LIB@ +LANPLUS_SAM = @LANPLUS_SAM@ +LDFLAGS = @LDFLAGS@ +LD_SAMX = @LD_SAMX@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_DIR = @LIB_DIR@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +OS_CFLAGS = @OS_CFLAGS@ +OS_DRIVERS = @OS_DRIVERS@ +OS_LFLAGS = @OS_LFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_DIR = @PKG_DIR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHR_LINK = @SHR_LINK@ +STRIP = @STRIP@ +SUBDIR_S = @SUBDIR_S@ +SYSTEMD_DIR = @SYSTEMD_DIR@ +VERSION = @VERSION@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = ${prefix}/share +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = ${prefix}/share/man +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = /usr +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +#!/bin/sh +# Makefile to build/install doc files +# +MKDIR = sh ../mkinstalldirs +INSTALL_SH = sh ../install-sh -c +INSTALL_DATA_SH = ${INSTALL_SH} -m 644 +docdir = ${prefix}/share/doc/ipmiutil-${version} +etcdir = /etc +datato = ${DESTDIR}${datadir}/ipmiutil +cronto = ${DESTDIR}${etcdir}/cron.daily +manto = ${DESTDIR}${mandir}/man8 +varto = ${DESTDIR}/var/lib/ipmiutil +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + + +all: + +clean: + +clobber: + +distclean: + +check: + +install: + $(MKDIR) ${manto} + $(MKDIR) ${datato} + $(MKDIR) ${varto} + ${INSTALL_DATA_SH} isel.8 ${manto} + ${INSTALL_DATA_SH} isensor.8 ${manto} + ${INSTALL_DATA_SH} ireset.8 ${manto} + ${INSTALL_DATA_SH} ialarms.8 ${manto} + ${INSTALL_DATA_SH} iwdt.8 ${manto} + ${INSTALL_DATA_SH} ifru.8 ${manto} + ${INSTALL_DATA_SH} ilan.8 ${manto} + ${INSTALL_DATA_SH} iserial.8 ${manto} + ${INSTALL_DATA_SH} icmd.8 ${manto} + ${INSTALL_DATA_SH} igetevent.8 ${manto} + ${INSTALL_DATA_SH} ihealth.8 ${manto} + ${INSTALL_DATA_SH} ipmiutil.8 ${manto} + ${INSTALL_DATA_SH} isol.8 ${manto} + ${INSTALL_DATA_SH} idiscover.8 ${manto} + ${INSTALL_DATA_SH} ievents.8 ${manto} + ${INSTALL_DATA_SH} iconfig.8 ${manto} + ${INSTALL_DATA_SH} ipmi_port.8 ${manto} + ${INSTALL_DATA_SH} ipicmg.8 ${manto} + ${INSTALL_DATA_SH} ifirewall.8 ${manto} + ${INSTALL_DATA_SH} ifwum.8 ${manto} + ${INSTALL_DATA_SH} ihpm.8 ${manto} + ${INSTALL_DATA_SH} isunoem.8 ${manto} + ${INSTALL_DATA_SH} itsol.8 ${manto} + ${INSTALL_DATA_SH} iekanalyzer.8 ${manto} + ${INSTALL_DATA_SH} idelloem.8 ${manto} + ${INSTALL_DATA_SH} idcmi.8 ${manto} + ${INSTALL_DATA_SH} ismcoem.8 ${manto} + ${INSTALL_DATA_SH} bmclanpet.mib ${datato} + cd ${manto}; gzip -f *.8 +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/UserGuide b/doc/UserGuide new file mode 100644 index 0000000..d1b1090 --- /dev/null +++ b/doc/UserGuide @@ -0,0 +1,6497 @@ + + IPMIUTIL USER GUIDE + VERSION 2.9.3 + An easy-to-use IPMI server management utility + + +------------------------ + CONTENTS +------------------------ +1.0 Overview + 1.1 Features +2.0 Dependencies + 2.1 Configuration + 2.2 References +3.0 Utility Man Pages + 3.1 IPMIUTIL (ipmiutil) + 3.2 IALARMS (ipmiutil alarms) + 3.3 ICMD (ipmiutil cmd) + 3.4 ICONFIG (ipmiutil config) + 3.5 IDISCOVER (ipmiutil discover) + 3.6 IEVENTS (ipmiutil events) + 3.7 IFRU (ipmiutil fru) + 3.8 IGETEVENT (ipmiutil getevt) + 3.9 IHEALTH (ipmiutil health) + 3.10 ILAN (ipmiutil lan) + 3.11 IRESET (ipmiutil reset) + 3.12 ISEL (ipmiutil sel) + 3.13 ISENSOR (ipmiutil sensor) + 3.14 ISERIAL (ipmiutil serial) + 3.15 ISOL (ipmiutil sol) + 3.16 IWDT (ipmiutil wdt) + 3.17 IFRUSET (ifruset) + 3.18 IPMI_PORT (ipmi_port) + 3.19 IPICMG (ipmiutil picmg) + 3.20 IFIREWALL (ipmiutil ifirewall) + 3.21 IFWUM (ipmiutil fwum) + 3.22 IHPM (ipmiutil hpm) + 3.23 ISUNOEM (ipmiutil sunoem) + 3.24 IEKANALYZER (ipmiutil ekanalyzer, deprecated) + 3.25 ITSOL (ipmiutil tsol) + 3.26 IDELLOEM (ipmiutil delloem) + 3.27 IDCMI (ipmiutil dcmi) + 3.28 ISMCOEM (ipmiutil smcoem) + 3.29 ISELTIME (iseltime) +4.0 Use Cases + 4.1 Usage of IPMI utilities for sensor thresholds + 4.2 Usage to configure a system for IPMI LAN + 4.3 Usage of IPMI utilities for Automated IPMI LAN configuration + 4.4 Usage of IPMI utilities to Set Watchdog timer + 4.5 Usage of kernel panic handler code + 4.6 Interpreting BMC LAN SNMP Traps from Platform Events + 4.7 Interpreting newer PECI sensors for CPU Thermal Margin + 4.8 How to configure a system for IPMI Serial-Over-LAN Console + 4.9 Using ipmiutil Library APIs for custom programs + 4.10 How to configure a system for SNMP Traps via IPMI PEF rules +5.0 IPMI Utilities on Windows + 5.1 Windows Install Instructions + 5.2 Windows Build Instructions + 5.3 Windows Command Usage +6.0 Sample output +7.0 Problems + 7.1 Error Return Codes + 7.2 IPMI Completion Codes +8.0 Building IPMI Utilities + 8.1 Building ipmiutil on Linux + 8.2 Building ipmiutil on Windows + 8.3 Building ipmiutil on Solaris + 8.4 Building ipmiutil on FreeBSD + 8.5 Building ipmiutil on ARM (Android) +9.0 IPMIUtil Library APIs +10.0 Related Information + 9.1 History + 9.2 Links + + + +------------------------ +1.0 OVERVIEW +------------------------ + +The IPMI Specification provides a standard way to do both simple and complex +server management functions. Everything from remote reset/power-off to sending +an SNMP alert from a sensor event even if the OS is down. Being able to +perform these tasks in Baseboard Management Controller (BMC) firmware allows +OS-independent management. What many integrators need, however, is a set of +utilities and/or sample code to perform these functions within their +enterprise management subsystem without a learning curve. + +The IPMI Management Utilities project provides a series of utilities that +perform common IPMI server management functions, such as viewing the firmware +log, or configuring the BMC LAN & PEF features. +The utilities are designed for end-users, so that they should not require +intimate knowledge of how to build IPMI commands. Each of the utilities detects or reasonably assigns default values so that a working configuration can be +easily obtained. More detailed options allow changes to these default values. +These utilities can be used separately, or merged with a larger server +management subsystem. The source license is BSD and ipmiutil compiles under +Linux (Makefile) and Windows (buildwin.cmd). There are also corresponding +SA Forum HPI standard utilities that run with two different HPI +implementations, including OpenHPI. These were the basis of the current +openhpi/clients. + +This project includes both IPMI utilities and a kernel patch for +panic handler enhancements. See the project web site for binaries +and documentation at http://ipmiutil.sourceforge.net. + +The ipmiutil IPMI utilities below allow the user to access the firmware +System Event Log and configure the Platform Event Filter table for the new +'OS Critical Stop' records, as well as other common IPMI system management +functions. + +ipmiutil - a meta-command to invoke all of the below as sub-commands +ievents - a standalone utility to interpret IPMI and PET event data +isel - show/set the firmware System Event Log records +isensor - show Sensor Data Records, sensor readings, and thresholds +ireset - cause the BMC to hard reset or power down the system +ilan - show and configure the BMC LAN port and Platform Event Filter + table to allow BMC LAN alerts from firmware events and + OS Critical Stop messages, +iserial - show and configure the BMC Serial port for various modes, + such as Terminal Mode. +ifru - show the FRU chassis, board, and product inventory data, + and optionally write a FRU asset tag. +ialarms - show and set front panel alarms (LEDs and relays) +iwdt - show and set watchdog timer parameters +igetevent - receive any IPMI events and display them +ihealth - check and report the basic health of the IPMI BMC +iconfig - list/save/restore the BMC configuration parameters +icmd - send specific IPMI commands to the BMC, + mainly for testing and debug purposes. +idiscover - discover the available IPMI LAN nodes on a subnet +isol - start/stop an IPMI Serial-Over-LAN Console session +ipicmg - show/set the IPMI PICMG parameters +ifirewall - show/set the IPMI firmware firewall configuration +iekanalyzer - run FRU-EKeying analyzer on FRU files +ifwum - OEM firmware update manager extensions +ihpm - HPM firmware update manager extensions +isunoem - Sun OEM functions +idelloem - Dell OEM functions +itsol - Tyan SOL console start/stop session +idcmi - get/set DCMI parameters, if supporting the DCMI spec + +Other supporting files: +checksel = cron script using ipmiutil sel to check the SEL, write new + events to the OS system log, and clear the SEL if nearly full. +ipmi_port = daemon to bind the RMCP port and sleep to prevent + Linux portmap from stealing the RMCP port +ipmi_port.sh = init script to reserve the RMCP port from portmap, + this also restores saved sensor thresholds, if any. +ipmiutil_wdt = init script to restart watchdog timer every 60 sec via cron +ipmiutil_asy = init script runs 'ipmiutil getevt -a' for remote shutdown +ipmiutil_evt = init script runs 'ipmiutil getevt -s' for monitoring events +evt.sh = sample script which can be invoked by ipmiutil_evt +ipmi_if.sh = script using dmidecode to determine the IPMI Interface Type +bmclanpet.mib = SNMP MIB for BMC LAN Platform Event Traps +test/* = scripts and utilities used in testing ipmiutil/panicsel +kern/* = kernel patches for panic handling + +The kernel panic handler patch (kern/bmcpanic.patch) adds additional +features to the Linux Panic Handler so that more information can be +saved and passed along if a Linux panic condition occurs. +bmc_panic features: + + 1. Write an OS Critical Stop event to firmware System Event Log (SEL) + This is in bmcpanic.patch, in OpenIPMI and in Intel IMB. + 2. Send SNMP trap via BMC LAN Alerting mechanism + Accomplished by configuring the BMC with 'ipmiutil lan'. + 3. Turn on the Critical Alarm LED on the Telco Alarms Panel + This is in bmcpanic.patch, but not in OpenIPMI due to + platform-specific issues with the alarms panel. + +The kernel portion of this, except item 3, is now included in the OpenIPMI +project with the CONFIG_IPMI_PANIC_EVENT option, and the OpenIPMI +driver has merged into Linux kernel 2.4.21 and beyond. +The latest version of the OpenIPMI driver can be obtained from +http://openipmi.sourceforge.net. +This patch is also included in the Intel IMB IPMI driver v28 and greater, +for any Linux kernel. This Intel IMB IPMI driver can be obtained from +http://downloadcenter.intel.com/Product_Search.aspx?Prod_nm=imbsrc or +a copy is cached on http://ipmiutil.sf.net also. + + +------------------------ +1.1 FEATURES +------------------------ + +These are the key strengths, user features and functions that are +supported by ipmiutil. + +Key Strengths = supports any IPMI server platforms, + top-down user-friendly IPMI functions, + detection, portability, + incorporates fixes and new features quickly +Target Market = Administrators, Developers, and OEMs +OS Support = Linux, Windows, Solaris, and FreeBSD + (supports Windows natively for remote or local interface) +License = BSD +Drivers = For Linux: openipmi, imb, valinux ipmikcs, lan, lanplus, + landesk, and driverless direct KCS & SSIF + For Windows: Intel IMB and Microsoft IPMI drivers + For Solaris: bmc + For FreeBSD: openipmi, driverless KCS or SSIF +LEDs = Show/set ATCA LEDs, set identify LED, Intel Telco Alarm LEDs +health = show overall health and product information +discovery = find all IPMI LAN servers on a given subnet +fru = Display all FRU and SPD inventory data, also + Set some FRU product fields (asset tag, serial number) +sensor = Show SDRs and sensor readings, also set sensor thresholds +getevent = Receive any IPMI events and decode them, + The IPMI event monitoring service is automated in Linux via + the ipmiutil_evt init script. +reset = IPMI local and remote reset/power-control, + IPMI boot device selection. +remote IPMI = Perform an OS shutdown/restart request via IPMI LAN, +soft-shutdown using ipmiutil getevt -a and invoking ipmiutil reset -o. + This async bridge service is automated in Linux via the + ipmiutil_asy init script. +cmd = Execute raw IPMI commands locally or remotely +lan = Show/set IPMI LAN and PEF configuration parameters, + adds more PEF rules, or can add a custom PEF rule +serial = Show/set IPMI serial configuration parameters +sel = Show decoded System Event Log records, clear SEL, + see the checksel cron script to automate SEL management. +sol console = Start/stop an SOL console session +watchdog = Show, set, and reset the IPMI watchdog timer and its actions, + The watchdog timer service can be automated in Linux via the + ipmiutil_wdt init script. +save/restore = save and restore all BMC configuration parameters +ievents = Standalone app to decode IPMI or PET event data, + especially useful at the management station for interpreting + IPMI PET SNMP traps. See also SNMP PET MIB (bmclanpet.mib). +picmg = Support IPMI PICMG functions +firewall = Support IPMI firmware firewall functions + +Through various services, ipmiutil allows automatic management of common +IPMI tasks: +ipmi_port = Automatically prevent Linux port mapper from stealing + the RMCP port 623 used by IPMI LAN firmware. +checksel = a cron script to daily write new SEL records to syslog, and + clear the SEL if nearly full. +ipmiutil_asy = A Linux init script using the ipmiutil getevt -a service to + enable receiving soft-shutdown requests from ipmiutil reset -o +ipmiutil_wdt = A Linux init script to reset the watchdog timer every 60 sec. +ipmiutil_evt = A Linux init script using the ipmiutil getevt -s service to + monitor IPMI events, log them, and optionally run a script. + + + +------------------------ +2.0 DEPENDENCIES +------------------------ + +The IPMI Utilities will run on Linux, Windows Solaris, or FreeBSD, and should +be portable to other OSs, if an IPMI driver for that OS can be obtained. + +The IPMI Utilities and Panic Handler Enhancements currently work with +platforms that support the IPMI standard. If the platform does not +support IPMI, these changes are inert. The Service Availability Forum +has developed a Hardware Platform Interface (HPI) specification that +can be used to group IPMI and other system management interfaces +together. A set of comparable HPI utilities is included in the +ipmiutil project source as hpiutil/*. + +The Panic Handler kernel enhancements (via kern/bmcpanic.patch) are now +included in the Intel IMB driver v28 and later, and in the OpenIPMI driver +via the CONFIG_IPMI_PANIC_EVENT and CONFIG_IPMI_PANIC_STRING parameters in +the kernel config file (/usr/src/linux/.config) with kernels 2.4.21 or greater. + +If run locally, the ipmiutil utilities must be run as +superuser/Administrator and an IPMI driver must be used. + +For Linux, these IPMI drivers are supported: + . the MontaVista OpenIPMI driver (/dev/ipmi0), + . the Intel IMB IPMI driver (/dev/imb, via 'ipmidrvr' or 'ipmi_imb'), + . the valinux IPMI Driver (/dev/ipmikcs), + . the LANDesk ldipmi daemon, + . or direct user-space I/Os to the IPMI KCS or SSIF/SMBus interfaces, + if no other driver is detected. + +For Windows, these drivers are supported: + . the Intel IMB IPMI driver (imbdrv.sys) for any Windows Server OS, + . the Microsoft IPMI driver (ipmidrv.sys) for Win2003R2 or Win2008. + +For Solaris, these drivers are supported: + . the Sun bmc driver (/dev/bmc) for Solaris 10 and greater + +For FreeBSD, these drivers are supported: + . the FreeBSD 7.x OpenIPMI driver port (kldload ipmi, /dev/ipmi0) + . direct user-space I/Os to the IPMI KCS or SSIF/SMBus interfaces + +Each of the IPMI management utilities will detect which IPMI driver +is present, and in Linux, if none are found, it will attempt to use direct +KCS or SSIF I/Os to communicate with the IPMI BMC. + +If using the IPMI LAN interface, neither the local or remote system requires +any IPMI driver, but the remote target system must have had IPMI LAN enabled, +(e.g. via ipmiutil lan) which is done locally on the target system. +Note that the IPMI LAN session password is sent with either MD5 or MD2 +encryption by default. + +See http://openipmi.sourceforge.net for the OpenIPMI driver. +See http://downloadcenter.intel.com/Product_Search.aspx?Prod_nm=imbsrc for Intel IMB driver +See http://cvs.sf.net/cgi-bin/viewcvs.cgi/ipmitools/ipmitools/kernel/kcs/patches/2.4.x/ for the valinux driver. +See http://www.landesk.com/ or the CD supplied with your server for LANDesk. + +List of companies that have adopted IPMI (over 198): + http://www.intel.com/design/servers/ipmi/adopterlist.htm + +Example IPMI Server Platforms tested with ipmiutil, by BMC manufacturer: + Intel RackMount Servers (various, both 32-bit and 64-bit) + Intel ATCA (MPCMM0001 and MPBL00xx) + Kontron CRMS servers and KTC5520 + Dell PowerEdge 18xx, 19xx, 2800 + SuperMicro with AOC-IPMI20 (by LMC) + SuperMicro with AOC-SIMSO (by Peppercon) + Sun (product id 0x4701) + Tyan (product id 0x14e9) + NSC (product id 0x4311, National SemiConductor) + NEC (product id 0x024b) + Tatung TS-2552 (product id 0x09f8) + AMI IPMI MegaRAC + + +------------------------ +2.1 CONFIGURATION +------------------------ + +To find the base address of the IPMI KCS interface, or to find the IPMI +SSIF/SMBus slave address, you can use the 'dmidecode' utility provided +with most Linux distributions. See also http://www.nongnu.org/dmidecode. +The ipmi_if.sh script can determine the IPMI Interface Type, and the +resulting /usr/share/ipmiutil/ipmi_if.txt file can be edited if needed. +The ipmiutil binary uses the same mechanism to detect the IPMI KCS or +SSIF interface parameters by default if no driver is loaded. + +For some IPMI systems, a minimum firmware version may be needed to +support the BMC LAN/PEF feature. On an Intel TSRLT2 system, for instance, +these are the minimum levels: + BMC Firmware ver 54 or greater +Systems with IPMI versions prior to 1.5 do not support BMC LAN or PEF features + +By default, the ipmiutil IPMI utilities rpm does not set the panic timeout. +If a different kernel panic timeout is desired, add the kernel parameter +"panic=10" in grub.conf/lilo.conf, or do "echo 10 >/proc/sys/kernel/panic" +in one of the /etc/init.d scripts to set it to 10 seconds, for instance. + +The ipmiutil lan (ilan) utility can be used to configure the BMC LAN +Alerting while the OS is running. It has additional PEF rules and LAN +parameter detection logic beyond what most other utilities provide. + +The ipmiutil serial (iserial) utility is intended to configure the EMP +serial port on the server for shared access between BMC/IPMI functions +and BIOS Console Redirection. Some older platforms only support only Basic +Mode for BMC/IPMI functions. Basic Mode requires a remote client application +to utilize it (Windows ISC Console/DPC applet, or a special modified Linux +telnet). There are many platforms which implement Terminal Mode via IPMI v1.5 +Appendix E to make remote management with character commands available +on the serial port without a special remote client application. + +Notes about BMC Users: +Most IPMI 1.5 systems support at least 3 users, numbered 1,2,3, where +user 1 is the default and has a null username. Users 2 and 3 are +alternate users whose usernames can be set. For ipmiutil, these are +currently implemented by default as follows: +user 1: used by default for BMC LAN and Serial (ilan & iserial) +user 2: set for BMC LAN if ipmiutil lan -u is specified +user 3: set for BMC Serial/EMP if ipmiutil serial -u is specified +Also note that the -q option can be used to set different users by number. + +Note that the checksel script will be copied to /etc/cron.daily when +the Linux ipmiutil rpm is installed, so that ipmiutil sel will automatically +save SEL records to syslog and clear the SEL if it gets nearly full. +If you do not want this to happen automatically, remove the checksel +script from the /etc/cron.daily directory. + +In order for the ipmiutil sel -w function to work cleanly on a Windows system, +the showselmsg.dll should be copied to %SystemRoot%\system32, and the +showsel.reg should be run to set up the corresponding EventLog service +registry values. See install.cmd to perform these functions. + +The BSD License in the COPYING file applies to all source files +herein, except for + * util/md5.c (Aladdin unrestricted license, compatible with BSD) + * util/md2.h (GPL) + * util/ipmi_ioctls.h (GPL) +While the BSD License allows code reuse in both open and non-open +applications, the md2.h and ipmi_ioctls.h files would have to be removed +if used in a non-open application. The default ipmiutil build omits GPL code. +There is a ALLOW_GPL compile flag for this that is disabled by default, but +can be enabled for open-source by running "./configure --enable-gpl". + +See the INSTALL file for build instructions for various configurations. + + +------------------------ +2.2 REFERENCES +------------------------ + +The IPMI 1.5 spec, Table 36-3 defines the sensor types for SEL records, +as used by ipmiutil sel. +The IPMI 1.5 spec, Table 15-2 defines the Platform Event Filter table +entries, as used by ipmiutil lan. +The IPMI 1.5 spec, Table 19-4 defines the LAN Configuration Parameters, +as used by ipmiutil lan. +The IPMI 2.0 spec, Section 15 defines the Serial-Over-LAN functionality. + +The enterprises.3183 SNMP traps come from the BMC firmware, and are defined in +bmclan*.mib files in the ipmiutil project. Details about the format of these +Platform Event Traps are available in section 12.2 through 12.5 of the ISM +(Intel Server Management) 5.x Technical Product Specification at +http://www.intel.com/support/motherboards/server/isc/sb/cs-008024.htm + +The enterprises.343 SNMP traps come from ISM or SNMPSA and are defined in +basebrd*.mib or mapbase*.mib files on the platform CD. +The enterprises.412 SNMP traps come from ISM/DMTF, defined in dmtf*.mib files +on the platform CD. + + +------------------------ +3.0 UTILITY MAN PAGES +------------------------ + + +-------------------------------------- +3.1 IPMIUTIL (ipmiutil) + +IPMIUTIL(8) IPMIUTIL(8) + +NAME + ipmiutil - a meta-command to invoke various IPMI functions. + +SYNOPSIS + ipmiutil [-x -NUPREFJTVY] [other command options] + +DESCRIPTION + This utility performs various IPMI functions. Each of the individual + commands in the ipmiutil project can be invoked via this meta-command. + The is one of the following: + alarms show/set the front panel alarm LEDs and relays + leds show/set the front panel alarm LEDs and relays + cmd send a specified raw IPMI command to the BMC + config list/save/restore BMC configuration parameters + dcmi get/set DCMI parameters + discover discover all IPMI servers on this LAN + ekanalyzer run FRU-EKeying analyzer on FRU files (deprecated, see fru) + events decode IPMI events and display them + firewall show/set firmware firewall functions + fru show decoded FRU inventory data, write asset tag + fwum OEM firmware update manager extensions + getevt get IPMI events and display them, event daemon + getevent get IPMI events and display them, event daemon + health check and show the basic health of the IPMI BMC + hpm HPM firmware update manager extensions + lan show/set IPMI LAN parameters and PEF table + picmg show/set picmg extended functions + reset cause the BMC to reset or power down the system + sel show/clear firmware System Event Log records + sensor show Sensor Data Records, readings, thresholds + serial show/set IPMI Serial & Terminal Mode parameters + sol start/stop an SOL console session + smcoem SuperMicro OEM functions + sunoem Sun OEM functions + delloem Dell OEM functions + tsol Tyan SOL console start/stop session + wdt show/set/reset the watchdog timer + For help on each command (e.g. ’sel’), enter: + ipmiutil sel -? + For man pages on each command, its man page is named "i", or + refer to SEE ALSO below. + + This utility can use either the /dev/ipmi0 driver from OpenIPMI, the + /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, + direct user-space IOs, or the IPMI LAN interface if -N is used. + + +OPTIONS + Command options are described in the man page for each command. Below + are a few of the common options. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +EXAMPLES + ipmiutil sel + Shows the IPMI System Event Log entries. + + ipmiutil wdt + Shows the watchdog timer values. + + + +SEE ALSO + ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifirewall(8) + ifru(8) ifruset(8) ifwum(8) igetevent(8) ihealth(8) ihpm(8) ilan(8) + ipicmg(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) isunoem(8) + iwdt(8) ipmiutil(8) ipmi_port(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.2 IALARMS (ipmiutil alarms) + +IALARMS(8) IALARMS(8) + + + +NAME + ipmiutil_alarms - display and set alarm indicators + +SYNOPSIS + ipmiutil alarms [-abcdimnoprx -N node -U user -P/-R pswd -EFJTVY] + + +DESCRIPTION + ipmiutil alarms is a program that uses IPMI commands to display and set + alarm indicators, which are usually LEDs on the system chassis front + panel. This utility can use either the /dev/ipmi0 driver from + OpenIPMI, the /dev/imb driver from Intel, the /dev/ipmikcs driver from + valinux, direct user-space IOs, or the IPMI LAN interface if -N. Note + that a LAN user must have Administrative privileges to read or write + the alarm LEDs. + + Note that this utility may not be the only logic setting alarm states. + The BMC firmware, system management software, or cluster fault manager + may also want to set alarm states. Intel provides a Telco Alarms Man- + ager API which presents a consolidated interface for all alarm manage- + ment applications. + + +OPTIONS + Command line options are described below. + + -r Read-only. Show the alarms status, but do not set any states. + This is also the default mode if no parameters are specified. + + -iN Sets the Chassis Identify feature, which can be an LED or some + other alarm. If N=0, turn off the Chassis ID, otherwise turn + the ID on for N seconds. N=255 will turn on the ID indefi- + nitely, if it is IPMI 2.0. + + -aN Sets Disk A Fault LED. If N=0, turn it off. If N=1, turn it + on. Used only for TIGPT1U platform. + + -bN Sets Disk B Fault LED. If N=0, turn it off. If N=1, turn it + on. Used only for TIGPT1U platform. + + -dXN Sets Disk X Fault LED, where X=0-6. If N=0, turn it off. If + N=1, turn it on. Used only for NSC2U platform. + + -cN Sets the Critical Alarm. If N=0, turn it off. If N=1, turn it + on. + + -mN Sets the Major Alarm. If N=0, turn it off. If N=1, turn it on. + + -nN Sets the Minor Alarm. If N=0, turn it off. If N=1, turn it on. + + -pN Sets the Power Alarm. If N=0, turn it off. If N=1, turn it on. + Note that the Power LED is also wired to the System Fault LED in + the back of the system, so this state may be off for Power, but + the LED could be lit for a System Fault reason instead. Refer + to the system Technical Product Specification for System Faults. + + -o Sets all alarms off, including the Chassis ID. + + -x Causes extra debug messages to be displayed. + + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use this IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, + 4=Straight Password, 5=OEM. + + -V Use this IPMI LAN privilege level. 1=Callback level, 2=User + level, 3=Operator level, 4=Administrator level (default), 5=OEM + level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + + +SEE ALSO + ipmiutil(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.3 ICMD (ipmiutil cmd) + +ICMD(8) ICMD(8) + + + +NAME + ipmiutil_cmd - a tool to send specific IPMI commands via the command + line. + + +SYNOPSIS + ipmiutil cmd [-qsx -NUPREFJTVY] bus rsSa netFn/lun cmd [data bytes] + + +DESCRIPTION + This ipmiutil cmd tool sends specific IPMI commands to the firmware. + The commands are composed as hex values on the command line. This tool + was written to allow in-band use to match the DOS CMDTOOL.EXE or IPMI- + TOOL.EXE program which is distributed with many Intel servers. Certain + scripts or pre-written commands may have been supplied for the DOS tool + that can now be used while the system is running Linux or Windows. + + This utility can use either the /dev/ipmi0 driver from OpenIPMI, the + /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, + direct user-space IOs, or the IPMI LAN interface if -N. + + This tool should only be used if you are familiar with the IPMI 1.5 + specification, or you have specific pre-written commands to send. + + + +OPTIONS + Command line options are described below. + + -q Quiet mode. Show only minimal header information. + + -s Skips the GetDeviceID command + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +PARAMETERS + The following parameters are used by icmd. Each is represented as a + two-digit hex byte. The parameters have no default values. + + + bus This byte contains the bus number for this command, usually 00. + + + rsSa This is the resource slave address, usually 0x20 for the BMC. + + + netFn/lun + This byte combines the net Function and Lun. The 2 low-order + bits are the Lun and the 6 high-order bits are the net Function. + This representation is consistent with the DOS CMDTOOL/IPMITOOL. + + + cmd This byte contains the IPMI command. + + + [data bytes] + This is a sequence of zero to 16 bytes that represent data bytes + specific to this command. + + +EXAMPLES + icmd 00 20 18 01 + Sends the GetDevice ID command to the BMC. + + icmd 00 20 28 43 00 00 ff ff 00 ff + Sends a Get SEL entry command for the last entry in the firmware log. + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.4 ICONFIG (ipmiutil config) + +ICONFIG(8) ICONFIG(8) + + + +NAME + ipmiutil_config - list, save, and restore BMC configuration parameters + +SYNOPSIS + ipmiutil config [-lpxLNUPREFJTVY] [-r file] [-s file] + + +DESCRIPTION + ipmiutil config is a program that uses an IPMI driver to send IPMI com- + mands which list, save and restore BMC configuration parameters for + LAN, Serial, PEF, SOL, User, Channel. This combines the functionality + of ipmiutil lan (ilan) and ipmiutil serial (iserial). Note that some + of the LAN parameters cannot be restored remotely over the IPMI LAN, + changing the configuration that is in use. This utility can use either + the /dev/ipmi0 driver from OpenIPMI, the /dev/imb driver from Intel, + the /dev/ipmikcs driver from valinux, direct user-space IOs, or the + IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. + + + -l Lists BMC configuration parameters with a keyword, index, and + its hex values. This is the default behavior if no options are + specified. + + -r config_file + Restores BMC configuration from config_file, which was produced + with -s below. + + -s config_file + Saves BMC configuration to config_file. This file could be + edited, in certain cases, such as to vary the BMC IP address + (LanParam 3), or to use the UserPassword records. Note that + lines beginning with ’#’ are comments and are ignored. For + editing UserPassword records, convert your text value to hex + format; for example "echo ’mypassword’ |od -t x1", and leave off + the trailing 0a. + + -x Causes extra debug messages to be displayed. + + -p password_to_set + This specifies the firmware password to set for BMC LAN access + for all users during the restore. If not specified, the pass- + word configuration will not be changed, unless a valid UserPass- + word record is present in the file to be restored. Note that + user passwords are write-only via standard IPMI commands. + + -L lan_ch_num + This specifies the IPMI LAN channel number used for BMC LAN. + This varies by platform, and can be found in the platform tech- + nical specifications. By default, bmcconfig scans all IPMI + channels to find a LAN channel for BMC LAN. + + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + + +SEE ALSO + ipmiutil(8) ialarms(8) icmd(8) idiscover(8) ievents(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.5 IDISCOVER (ipmiutil discover) + +IDISCOVER(8) IDISCOVER(8) + + + +NAME + ipmiutil_discover - discover IPMI LAN-enabled nodes + +SYNOPSIS + idiscover [-abegisx] + + +DESCRIPTION + idiscover is a program that uses IPMI LAN commands to discover any + nodes on the LAN that are available, by probing the RMCP port (623.) + on those nodes. This utility uses IPMI LAN, so no IPMI drivers are + needed. There are three methods that can be used: + -a = broadcast RMCP ping method (default) + -g = GetChannelAuthCap command method + else = specific RMCP ping method + + A beginning IP address can be specified with -b for broadcast and spe- + cific methods. An ending IP can be specified for non-broadcast methods. + + +OPTIONS + Command line options are described below. + + -a All nodes, use the broadcast ping method. This is the default + if no options are specified. This will detect the first enabled + ethernet interface, and defaults to the broadcast address + x.x.x.255 (where x.x.x.x is IP address) unless -b is used to + specify otherwise. + + -b + Beginning IP address, required, unless using broadcast with + defaults. This could be a specific IP address, or a broadcast + address, ending in 255, if the broadcast method (-a) is used. + + -e + Endign IP address of the range. Not used for broadcast method. + If this is not specified, a range of one IP address matching the + beginning IP is assumed. + + -g Use the GetChannelAuthenticationCapabilities command method over + IPMI LAN instead of the RMCP ping. Not compatible with broad- + cast. This may be useful if the vendor BMC does not support + RMCP ping for some reason. + + -i eth0 + The interface name to use when sending the probes. The default + is to detect the first enabled ethernet interface (e.g. eth0). + + -m shows MAC address. Uses the broadcast ping method, but uses a + raw socket so that the MAC address can be displayed. This + detects the first enabled ethernet interface, and defaults to + the broadcast address 255.255.255.255 like -a. Using -m with + raw sockets requires root privilege. + + -r N Repeat the ping N times to each node. Default is to send 1 ping + per node. + + -x Causes extra debug messages to be displayed. + + + +EXAMPLES + idiscover -a -b 192.168.1.255 + Sends a broadcast RMCP ping to discover IPMI LAN nodes on the specified + subnet. + + idiscover -b 192.168.1.100 -e 192.168.1.254 + Sends RMCP pings to a range of IP addresses. + + idiscover -g -b 192.168.1.100 -e 192.168.1.254 + Sends GetChannelAuthCap commands to a range of IP addresses. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) ievents(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.6 IEVENTS (ipmiutil events) + +IEVENTS(8) IEVENTS(8) + + + +NAME + ievents - decode IPMI and PET event data + +SYNOPSIS + ievents [-bfhnprsx] 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 + + +DESCRIPTION + ievents is a standalone utility delivered with ipmiutil, used to inter- + pret raw hex data from IPMI events or from IPMI PET SNMP trap varbind + data. This utility uses the same interpretation logic as is used by + "ipmiutil sel" (showsel) and "ipmiutil getevt" (getevents). + + The data bytes in the input are always assumed to be in hex form. + + This could be useful if a utility other than "ipmiutil sel" were used + to obtain IPMI SEL records or events and interpretation is needed. + + This would also be needed at an enterprise management station to inter- + pret the PET SNMP trap hex data into human-readable form, see option + -p. + + +OPTIONS + -b bin_file + Interpret a file containing raw binary/hex SEL data dumped in + binary form, such as that produced by "ipmitool sel writeraw + bin_file". Each set of 16 bytes in the file will be interpreted + as an IPMI event. (same as -h) + + + -f sel_file + Interpret a file containing raw ascii text SEL data captured + with ipmiutil sel -r, or some other similar utility. Each line + in the file should be in this form, with no leading spaces: + 04 00 02 76 a9 4a 47 20 00 04 10 09 6f 42 0f ff + If this option is not specified, the default is to use the 16 + bytes taken from the command-line arguments. (same as -r) + + + -h bin_file + Interpret a file containing raw binary/hex SEL data dumped in + binary form, such as that produced by "ipmitool sel writeraw + bin_file". Each set of 16 bytes in the file will be interpreted + as an IPMI event. (same as -b) + + + -n This option generates a New IPMI platform event, using 9 bytes + of input. The input bytes are the same as the last 9 bytes of + an IPMI event. + + + -p Decode as PET event bytes, where the input is 34 PET hex data + bytes, skipping the first 8 of the 47-byte PET data. The + default without -p assumes that the input is a 16-byte IPMI + event. + + + -r sel_file + Interpret a file containing raw ascii text SEL data captured + with ipmiutil sel -r, or some other similar utility. (same as + -f) + + + -s sensor_file + Sensor file with the output of "ipmiutil sensor", used to get + the PET sensor_type from the sensor_num. The default is + /usr/share/ipmiutil/sensor_out.txt as generated during the + ipmiutil package installation. This is only needed with PET + interpretation (-p). + + + -x show eXtra debug messages + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.7 IFRU (ipmiutil fru) + +IFRU(8) IFRU(8) + + + +NAME + ipmiutil_fru - show Field Replacable Unit configuration data + +SYNOPSIS + ipmiutil fru [-abcdeikmsvx -N node -U user -P/-R pswd -EFJTVY] + + +DESCRIPTION + ipmiutil fru is a program that uses IPMI commands to show FRU configu- + ration data and optionally write an asset tag string into the FRU data. + Setting the asset tag is a function that can be used to uniquely iden- + tify the unit, even if the storage devices are removed or changed. + This utility can use either the /dev/ipmi0 driver from OpenIPMI, the + /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, + direct user-space IOs, or the IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. + + -a asset_string + This option specifies an asset tag string to be written to the + baseboard FRU Product area. The asset tag length is limited by + the existing FRU Product data, but is usually allowed up to 16 + characters. The default is to not modify this FRU field. + + -b Only show the Baseboard FRU data. The default behavior is to + also scan for any SDR FRU data or DIMM SPD data referenced by + the SDRs. + + -c Show FRU output in a canonical format, with a default delimiter + of '|'. + + -d file + Dump binary FRU data to the specified file. + + -e Show Every FRU output in a bladed chassis, including those under + child MCs. The default is to show FRUs referred to by just the + target MC. + + -i 00 This option specifies a specific FRU ID to show. The input + value should be in hex (0b, 1a, etc.), as shown from the sensor + SDR output. By default, all FRU IDs that are specified in the + FRU locator SDRs are shown. + + -k + These Kontron OEM functions set FRU data based on existing data + stored elsewhere. The setsn option sets the FRU Board and Prod- + uct serial number, and the setmfgdate option sets the FRU Board + Mfg DateTime. The nextboot option specifies the boot device for + the next boot: BIOS, FDD, HDD, CDROM, or network. These options + are only supported on Kontron ATCA boards which have this func- + tionality. + + -m 002000 + Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). This + could be used for PICMG or ATCA blade systems. The trailing + character, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -s serial_num + This option specifies a serial number string to be written to + the baseboard FRU Product area. The serial number can be any + string up to 16 characters. The default is to not modify this + FRU field. + + -v prod_ver + This option specifies a product version number string to be + written to the baseboard FRU Product area. The version number + can be any string up to 16 characters. The default is to not + modify this FRU field. + + -x Causes eXtra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.8 IGETEVENT (ipmiutil getevt) + +IGETEVENT(8) IGETEVENT(8) + + + +NAME + ipmiutil_getevt - wait for IPMI events + +SYNOPSIS + ipmiutil getevt [-abosx -t secs -N node -U user -P/-R pswd -EFJTVY] + + +DESCRIPTION + ipmiutil getevt is a program that uses IPMI commands to wait for IPMI + events sent from the BMC firmware. These events are also sent to the + IPMI System Event Log (SEL). This utility can use either the + /dev/ipmi0 driver from OpenIPMI, the /dev/imb driver from Intel, the + /dev/ipmikcs driver from valinux, direct user-space IOs, or the IPMI + LAN interface if -N. + + Some server management functions want to trigger custom actions or + alerts when IPMI hardware-related events occur, but do not want to + track all events, just newly occurring events. This utility waits a + specified timeout period for any events, and returns interpreted output + for each event. It is designed as a scriptable command-line utility, + but if the timeout is infinite (-t 0), then this code could be used for + a sample service as well. + + There are several methods to do this which are implemented here. + + The SEL method: + This method polls the SEL once a second, keeps track of the last SEL + event read, and only new events are processed. This ensures that in a + series of rapid events, all events are received in order, however, some + transition-to-OK events may not be configured to write to the SEL on + certain platforms. This method is used if getevent -s is specified. + This is the only method supported over IPMI LAN, i.e. with -N. + + The ReadEventMessageBuffer method: + This uses an IPMI Message Buffer in the BMC firmware to read each new + event. This receives any event, but if two events occur nearly simul- + taneously, only the most recent of the two will be returned with this + method. An example of simultaneous events might be, if a fan + stops/fails, both the non-critical and critical fan threshold events + would occur at that time. This is the default method for getevent. + + The OpenIPMI custom method: + Different IPMI drivers may have varying behavior. For instance, the + OpenIPMI driver uses the IPMI GetMessage commands internally and does + not allow client programs to use those commands. It has its own custom + mechanism, see getevent_mv(). This method is used if the OpenIPMI + driver is detected, and no other method is specified. + + The Async Event method: + This only gets certain Asynchronous requests from the BMC to an SMS OS + service, like a remote OS shutdown, and get_software_id. This method + is disabled by default and only turned on if the getevent -a option is + specified. This method is only supported via the Intel IMB and + OpenIPMI driver interfaces. There is an init script provided with + ipmiutil to automate the task of starting this async event daemon. + # chkconfig --add ipmiutil_asy (skip this if no chkconfig) + # /etc/init.d/ipmiutil_asy start + This listens for IPMI LAN requests for soft-shutdown, and logs the out- + put to /var/log/ipmiutil_asy.log + + +OPTIONS + Command line options are described below. + + + -a Use the Async request method, which receives SMS OS requests + from the BMC using the IMB or OpenIPMI driver interface. This + services remote SMS bridge agent requests, like remote OS shut- + down and get software_id. + + -b Run in Background as a daemon. If this option is specified, + normal output will be redirected to /var/log/ipmiu- + til_getevt.log. The default is to run in foreground. + + -c Show output in a canonical format, with a delimiter of '|'. + + -e N Wait for a specific event sensor type N. The parameter can be + in hex (0x23) or decimal (35). The default is 0xFF which means + wait for any event. + + -r F Run script file F when an event occurs. The filename can + include a full path. The script will be passed the event + description as a parameter. A sample evt.sh script is included + with the ipmiutil package. + + -o Only run one pass to wait for the first event. Default is to + loop for multiple events for the timeout period. + + -s Use the SEL method to get events. This polls the SEL once a + second for new events. The last SEL record read is saved in + /usr/share/ipmiutil/evt.idx. Otherwise, the default is to use + the ReadEventMessageBuffer method to get new events. + + -t N Set the timeout period to N seconds. Default is 120 seconds. A + timeout of 0 means an infinite period. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.9 IHEALTH (ipmiutil health) + +IHEALTH(8) IHEALTH(8) + + + +NAME + ipmiutil_health- show IPMI health + +SYNOPSIS + ipmiutil health [-ifhglmnopqsx -N node -U user -P/-R pswd -EFJTVY] + + +DESCRIPTION + ipmiutil health is a program that uses IPMI commands to show the health + of the BMC. This utility can use either the /dev/ipmi0 driver from + OpenIPMI, the /dev/imb driver from Intel, the /dev/ipmikcs driver from + valinux, direct user-space IOs, or the IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. + + + -c Show canonical, delimited output. + + -f Show the FRUSDR version also. + + -g Show the IPMI GUID of this system. The GUID is a read-only + unique identifier. + + -h Check the health of the HotSwap Controller also. + + -l Show the IPMI LAN channel statistics also. + + -m 002000 + Target a specific MC (e.g. bus 00, sa 20, lun 00). This could + be used for PICMG or ATCA blade systems. The trailing charac- + ter, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -n string + Set the System Name to this string in the IPMI System Informa- + tion. + + -o string + Set the Primary Operating System to this string in the IPMI Sys- + tem Information. + + -p 1 Set the chassis Power restore policy, governing the desired + behavior when power was lost and is restored. Values: 0 = stay + off, 1 = last state, 2 = always on. + + -q string + Set the Secondary Operating System to this string in the IPMI + System Information. + + -s Show the IPMI Session information also. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.10 ILAN (ipmiutil lan) + +ILAN(8) ILAN(8) + + + +NAME + ipmiutil_lan - show and configure BMC LAN parameters and set up a PEF + entry to send BMC LAN Alerts for OS Critical Stop log events + +SYNOPSIS + ipmiutil lan [-abcdefghijklmnopq#rstuvwxyzBDQK -i eth1 ] + [-I ipadr -M macadr -S subnet -B baud_sol ] + [-G gwyip -H gwymac -L lan_channel_num ] + [-A alertip -X alertmac -C community ] + [-u user_to_set -p password_to_set ] + [-N nodename -U username -Fimb ] + [-P/-R rmt_node_pswd -EFJTVY ] + + +DESCRIPTION + ipmiutil lan shows or sets all of the IPMI LAN Parameters to enable + remote LAN sessions or BMC LAN Alerts. The IP address and MAC address + of the local system, the default gateway, and the alert destination can + be defaulted to those specified in Linux, or can be overridden by user + parameters. It also creates a new Platform Event Filter table entry + for an OS Critical Stop (0x20) SEL firmware log event, so that it will + be enabled to send a BMC LAN Alert. This utility will skip the PEF + records if the system does not support IPMI 1.5 or greater. This util- + ity can use either the /dev/ipmi0 driver from OpenIPMI, the /dev/imb + driver from Intel, the /dev/ipmikcs driver from valinux, direct user- + space IOs, or the IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. Note that without options, + ipmiutil lan behaves as if option -r were used. To configure IPMI LAN + & PEF, use option -e. + + + -a alertnum + Specify which PEF alert number is to be used. Default is 1. + This would only be used if extra PEF alert destinations had been + set. + + -b authmask + Specify a certain authtype mask in hex to use when configuring + this channel. The default mask is 0x16, so to include authtype + None (bit 0), it would require entering ’-b 17’. + + -c Show Canonical output, which shows only interpreted text and + streamlines the parameters shown, using a common delimiter. + + -d This option disables the IPMI LAN and PEF parameters, so as not + to allow BMC LAN connections or alerts. This option also sets + the IP address to zeros. + + -e This option enables the BMC LAN configuration and PEF event + alerts. The utility will attempt to obtain the default BMC LAN + parameters from the OS automatically, or they can be specified + with command options below. + + -f Set the ARP control parameter to 1 = gratuituous ARPs, 2 = ARP + responses, or 3 = both grat ARP and ARP responses. The default + is 1. + + -g This specifies the secondary gateway IP address to use for the + BMC LAN. The default is to omit this parameter and only use the + default gateway. See also -G. + + -h Set the IPMI VLAN ID to this value. Setting to a value >=4096 + disables the VLAN ID. The default behavior is not to set this + parameter. + + -i ethif + By default, the eth0 interface is used to find IP and MAC + addresses. Sometimes, however, the first ethernet port on the + baseboard may be represented by Linux as eth1 or eth2 instead. + If so, use this option to indicate the correct ethernet inter- + face to use. By default, ipmiutil lan will scan up to 32 eth + interfaces for the onboard one that BMC LAN uses. + + -j This sets a custom PEF rule as the last PEF entry. The input is + a series of 10 hex bytes, forming the PEF entry. For example, + this sample PEF entry would perform a power down action if the + Baseboard Temp reached its threshold. + "ipmiutil lan -e -j020110ffff013001950a" + + -k This causes ipmiutil lan to also insert two rules to send alerts + for transition-to-OK events, including Power Redundancy OK and + Temperature OK. + + -l This option enables the BMC LAN configuration, but not PEF + events. The utility will attempt to obtain the default BMC LAN + parameters from the OS automatically, or they can be specified + with command options below. + + -n num By default, the new PEF entry for OS Critical Stop is inserted + at offset 12 into the table. This can be changed to insert it + at an offset > 12 if another entry already exists at offset 12. + + -o Disable Only SOL. This could be used after the IPMI LAN was + configured, to disable Serial-Over-LAN console access but still + allow other IPMI LAN access. + + -p password_to_set + This specifies the firmware password to set for BMC LAN access. + If not specified, the user and password configuration will not + be changed. + + -q Specify an alternate user number for the LAN username from the + -u option. This is normally user number 2, 3, or 4, where 2 is + the default. The maximum number of users is 15. Same as -# + below. + + -# Specify an alternate user number for the LAN username from the + -u option. Same as -q above. + + -r This option just reads the configuration without writing any BMC + LAN parameters or writing any new entries to the PEF table. + + -s This option will also display some of the Serial parameters. + + -t Test if the BMC LAN has already been configured. Returns 0 if + so. + + -u username_to_set + This specifies the firmware username to set for BMC LAN access. + If a username is specified, user 3 will be set. If not speci- + fied, the default user 1 will be used. + + -v priv + Set a specific access priVilege for this user, where priv can + be: 1=Callback, 2=User, 3=Operator, 4=Admin, 5=OEM, 15=NoAccess + The default if not specified or specified in error, is to use + 4=Admin. + + -w N Set the Gratuitous ARP Interval to N seconds. This has no + effect if the firmware does not support Grat-ARP, as shown in + Lan Param 10. If not set, the interval remains at the firmware + default. + + -x Causes extra debug messages to be displayed. + + -y N Set the OEM LAN Failover parameter to N. Values for N with + Intel Romley/S2600 baseboards: 1 = enable, 0 = disable. Val- + ues for N with SuperMicro baseboards: 2 = failover, 1 = lan1 , 0 + = dedicated. + + -z Also show the IPMI LAN Statistics + + -A alert_ip_addr + This specifies the SNMP Alert Destination IP address to use for + the BMC LAN. By default, this utility will attempt to obtain + this from the /etc/snmp/snmpd.conf file, via the trapsink param- + eter. The alert destination will see the BMC LAN traps with the + enterprises.3183.1.1 OID. If no alert IP address is specified + in either snmpd.conf or this parameter, or if that IP address + does not respond, the other SNMP parameters for BMC LAN will be + skipped. + + -B baud_sol + This specifies the Baud rate for SerialOverLan. The possible + values are: 9600, 19.2k, 38.4k, 57.6k, and 115.2k. The default + is 19.2k. + + -C snmp_community + This specifies the SNMP Community name to use for BMC LAN + Alerts. The default community string is "public". This parame- + ter is ignored if there is no Alert IP address. + + -D This causes the local IP address to be determined by DHCP + instead of a static IP address. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -G gwy_ip_addr + This specifies the default gateway IP address to use for the BMC + LAN. The default is to automatically obtain this from the Linux + route table. + + -H gwy_mac_addr + This specifies the default gateway MAC address to use for the + BMC LAN. The format can be either 11:22:33:44:55:66 or + 11-22-33-44-55-66. The default is to try to automatically + obtain this by sending an arp request from an OS LAN eth inter- + face: the default one, or as specified by -i. + + -K hostname + This specifies the IPMI hostname to set, for Kontron servers + only. This enables the firmware to properly map the IP address + to a hostname, especially with the web interface. The default + is not to set this parameter, and use IP address only. + + -I ip_addr + This specifies the local IP address to use for the BMC LAN on + eth0. The default is to automatically obtain this from the + Linux ifconfig. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -L lan_ch_num + This specifies the IPMI LAN channel number used for BMC LAN. + This varies by platform, and can be found in the platform tech- + nical specifications. For instance, Intel platforms usually use + channels 1 & 2 for onboard NICs, and channel 3 for optional RMM + NICs. By default, ipmiutil lan scans all IPMI channels to find + the first LAN channel for BMC LAN. To just list all IPMI chan- + nels to see what is available, use the string ’list’ instead of + a LAN channel number. This will list the channels and exit. + + -M mac_addr + This specifies the local MAC address to use for the BMC LAN on + eth0. The format can be either 11:22:33:44:55:66 or + 11-22-33-44-55-66. The default is to automatically obtain this + from the Linux ifconfig. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P rmt_pswd + Remote password for the nodename given. The default is a null + password. Same as -R below. + + -Q Set the IPMI VLAN Priority. The default priority is 0. + + -R rmt_pswd + Remote password for the nodename given. The default is a null + password. Same as -P above. + + -S subnet + This specifies the local subnet mask to use for the BMC LAN on + eth0. The default is to automatically obtain this from the + Linux ifconfig. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -X alert_mac_addr + This specifies the SNMP Alert Destinations’s MAC address to use + for the BMC LAN. The format can be either 11:22:33:44:55:66 or + 11-22-33-44-55-66. The default is to attempt to obtain this + from the Linux arp cache. This parameter is ignored if there is + no Alert IP address. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +EXAMPLES + To read existing settings: + ipmiutil lan -r + + To enable IPMI LAN with default settings detected, assuming shared + MAC/IP: + ipmiutil lan -e + + To set up IPMI LAN for a unique IP address and set PEF SNMP Alerts: + ipmiutil lan -e -I 192.168.1.1 -A 192.168.1.10 + + To set the IPMI LAN password for the default user: + ipmiutil lan -e -p mypassword + + To disable access to the IPMI LAN channel: + ipmiutil lan -d + + +SAMPLE PEF TABLE + These 11 PEF table entries are configured from the factory for various + Intel Sahalee BMC systems, and will be applied as the defaults for a + system with an empty PEF table: + PEF(01): 01 Temperature Sensor event - enabled for alert + 01 c0 01 01 00 ff ff 01 ff 01 95 0a 00 00 00 00 00 00 00 00 00 + PEF(02): 02 Voltage Sensor event - enabled for alert + 02 c0 01 01 00 ff ff 02 ff 01 95 0a 00 00 00 00 00 00 00 00 00 + PEF(03): 04 Fan Failure event - enabled for alert + 03 c0 01 01 00 ff ff 04 ff 01 95 0a 00 00 00 00 00 00 00 00 00 + PEF(04): 05 Chassis Intrusion event - enabled for alert + 04 c0 01 01 00 ff ff 05 05 6f 01 00 00 00 00 00 00 00 00 00 00 + PEF(05): 08 Power Supply Fault event - enabled for alert + 05 c0 01 01 00 ff ff 08 ff 6f 06 00 00 00 00 00 00 00 00 00 00 + PEF(06): 0c Memory ECC Error event - enabled for alert + 06 c0 01 01 00 ff ff 0c 08 6f 02 00 00 00 00 00 00 00 00 00 00 + PEF(07): 0f FRB Failure event - enabled for alert + 07 c0 01 01 00 ff ff 0f 06 6f 01 00 00 00 00 00 00 00 00 00 00 + PEF(08): 07 BIOS POST Error event - enabled for alert + 08 c0 01 01 00 ff ff 07 ff 6f 1c 00 00 00 00 00 00 00 00 00 00 + PEF(09): 13 Fatal NMI event - enabled for alert + 09 c0 01 01 00 ff ff 13 ff 6f 3e 03 00 00 00 00 00 00 00 00 00 + PEF(10): 23 Watchdog Timer Reset event - enabled for alert + 0a c0 01 01 00 ff ff 23 03 6f 0e 00 00 00 00 00 00 00 00 00 00 + PEF(11): 12 System Restart event - enabled for alert + 0b c0 01 01 00 ff ff 12 ff 6f 02 00 00 00 00 00 00 00 00 00 00 + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ihealth(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.11 IRESET (ipmiutil reset) + +IRESET(8) IRESET(8) + + + +NAME + ipmiutil_reset - perform a hardware reset on the system + +SYNOPSIS + ipmiutil reset [-bcdDefhijmnoprsuwxy -N node -U user -P/-R pswd + -EFJTVY] + + +DESCRIPTION + ipmiutil reset is a program that uses IPMI commands to perform a hard- + ware reset of the chassis, or boot to a specific device. This utility + can use either the /dev/ipmi0 driver from OpenIPMI, the /dev/imb driver + from Intel, the /dev/ipmikcs driver from valinux, direct user-space + IOs, or the IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. + + -c Power Cycle the system chassis + + -d Power Down the system chassis + + -n Send NMI to the system + + -u Power Up the system chassis + + -r Hard Reset the system chassis + + -D Do a soft shutdown of the OS, and then power down. Note that + remote soft shutdown (-D -N) for Intel S5000 baseboard requires + ipmiutil getevt -a running on the target server. + + -o Do a soft shutdown of the OS, and then reset. Note that remote + soft shutdown (-o -N) for Intel S5000 baseboard requires ipmiu- + til getevt -a running on the target server. + + -k Do a cold reset to restart the BMC firmware. + + -m 002000s + Perform these function for a specific MC (e.g. bus 00, sa 20, + lun 00). The trailing character, if present, indicates SMI + addressing if ’s’, or IPMB addressing if ’i’ or not present. + + -b Do a hard reset and reboot to the BIOS Setup menu, for this + reboot only. + + -e Do a hard reset to EFI, if IPMI EFI boot is enabled, for this + reboot only. + + -f Do a hard reset to Floppy/Removable, for this reboot only. + + -h Do a hard reset to a Hard Disk, for this reboot only. + + -i Set the boot Initiator mailbox string, usually for PXE use. The + string must be less than 78 characters. + + -j Set the IANA number used for the boot Initiator mailbox string. + + -p Do a hard reset and network boot to PXE server, for this reboot + only. + + -s Do a hard reset and reboot to the Service/Diagnostic Partition, + for this reboot only. Reboots to the default if no service par- + tition is configured. + + -v Do a hard reset to DVD/CDROM Media, for this reboot only. + + -w Wait for BMC ready after a reset before exiting the utility. + + -x Causes extra debug messages to be displayed. + + -y Yes, try to persist any boot options used [-befhprsv]. This + requires the IPMI firmware to ask the BIOS to change boot order + settings, so it may not be supported by all BMC firmware ven- + dors. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ihealth(8) ilan(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.12 ISEL (ipmiutil sel) + +ISEL(8) ISEL(8) + + + +NAME + ipmiutil_sel - show firmware System Event Log records + +SYNOPSIS + ipmiutil sel [-abcflswvx -N node -P/-R pswd -U user -EFJTVY] + + +DESCRIPTION + ipmiutil sel is a program that uses IPMI commands to to read and dis- + play the System Event Log (SEL) which is stored by the BMC firmware. + IPMI commands are issued to read each record, and, if specified, incre- + mentally write records that have not previously been read into the + Linux syslog (/var/log/messages). This utility can use either the + /dev/ipmi0 driver from OpenIPMI, the /dev/imb driver from Intel, the + /dev/ipmikcs driver from valinux, direct user-space IOs, or the IPMI + LAN interface if -N. + + +OPTIONS + Command line options are described below. + + + -a string + Add a SEL record with a string of up to 13 characters. Longer + strings will be truncated. Note that this should be used spar- + ingly, but would be useful for changes made to the hardware or + firmware environment, like "Fan replaced" or "flash FW2.1". + + + -b bin_file + Interpret a file containing raw binary/hex SEL data dumped in + binary form, such as that produced by "ipmitool sel writeraw + bin_file". Each set of 16 bytes in the file will be interpreted + as an IPMI event. + + + -c Show output in a canonical format, with a default delimiter of + '|'. (same as -n). + + + -d Deletes/Clears the SEL of all records. If the SEL becomes full + (free space = 0), it no longer accepts new records, so the SEL + should be cleared periodically (use checksel cron script). + + + -e Show Extended sensor descriptions for events if run locally. + This option will attempt to get the full sensor description from + /var/lib/ipmiutil/sensor_out.txt, and also use its SDR to decode + any raw threshold values in the event, if present. + + + -f sel_file + Interpret a file containing raw ascii text SEL data captured + with ipmiutil sel -r, or some other similar utility. Each line + in the file should be in this form, with no leading spaces: + 04 00 02 76 a9 4a 47 20 00 04 10 09 6f 42 0f ff + Lines not in this format will be ignored. + + + -l N Show last N SEL records, in reverse order (newest first). For + some BMC implementations, this may not show all N records speci- + fied. + + -n Show output in a nominal/canonical format, with a default delim- + iter of '|'. (same as -c). + + -r Show the 16 raw hex bytes for each SEL entry. The default is to + display interpreted entries, and include relevant hex event + bytes. + + -p By default, all SEL records are displayed. This option causes + only the Panic events with sensor_type = 0x20 (OS Critical Stop) + to be displayed. + + -s N Show only SEL events with severity N or greater. Severity + 0=INF, 1=MIN, 2=MAJ, 3=CRT. The default is to show all SEL + events. + + -u Show the SEL time as UTC and also get the SEL Time UTC offset if + that command is supported. The default is to convert the SEL + Time to local time. + + -v Only show the version information. This shows: the ipmiutil + sel utility version, the BMC version, the IPMI version, the SEL + version, and the amount of free space in the SEL. + + -w This option writes SEL records to the Linux syslog + (/var/log/messages) or Windows Application Log. It only writes + SEL records that have timestamps newer than the last record + written to syslog. It saves the last timestamp in an index file + named /usr/share/ipmiutil/sel.idx (.\sel.idx in Windows). + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.13 ISENSOR (ipmiutil sensor) + +ISENSOR(8) ISENSOR(8) + + + +NAME + ipmiutil_sensor - show Sensor Data Records + +SYNOPSIS + ipmiutil sensor [-abcdefgmpqrstuvwx -i id -n snum -h tval -l tval + -NUPREFJTVY] + + +DESCRIPTION + ipmiutil sensor is a program that uses IPMI commands to show and decode + Sensor Data Records and current sensor readings for all sensors in the + system. This utility can use either the /dev/ipmi0 driver from + OpenIPMI, the /dev/imb driver from Intel, the /dev/ipmikcs driver from + valinux, direct user-space IOs, or the IPMI LAN interface if -N. + + Note that this utility by default only displays Sensor Data Records + reported by from the Baseboard Management Controller. To show sensors + for other controllers, see options -b and -m below. + + +OPTIONS + Command line options are described below. + + -a snum + ReArms the sensor number for events + + -b Shows SDRs for Bladed (PICMG or ATCA) systems by traversing the + child MCs (same as -e). + + -c Show sensor list in a simpler/Canonical format without uninter- + preted binary values. Only the user-friendly interpreted sensor + information is shown. (same as -s). + + -d + Dump the SDRs to a specified binary file. + + -e Show Every SDR in a bladed system by traversing the child MCs + (same as -b). + + -f + Restore the SDRs from the specified binary File. This is nor- + mally only done with the initial factory provisioning. + + -g sens_type + Shows only those SDRs matching the given sensor type group. The + sens_type string can be "fan", "temp", "voltage", or any string + or substring matching those in the IPMI 2.0 Table 42-3 for Sen- + sor Types. Multiple types can be listed, separated by a comma + (,) but no spaces. + + -h tval + Highest threshold value to set for the specified sensor. This + tval can be in decimal, or of the form 0x1a, to match the raw + reading value shown by sensor following the " = ". The value + passed is set as the non-critical threshold value, with the more + critical ones set by the utility as incrementally lower. This + simplifies the interface and ensures that the threshold values + do not get out of order. This requires specifying the sensor + number via -n. + + -i ID Show or set only the sensor Index corresponding to ID, where ID + is the hex ID of the SDR as shown in the sensor output under + "_ID_". The ID argument can be one hex number (e.g. 0x0e or + 0e), or a range of hex numbers (e.g. 0e-1a or 1a,2a or + 0x0e-0x2a). This is useful to repeatedly view just a few sensor + readings for changes, or to set just one sensor quickly without + reading all of the SDRs. + + -l tval + Lowest threshold value to set for the specified sensor. This + tval can be in decimal, or of the form 0x1a, to match the raw + reading value shown by sensor following the " = ". The value + passed is set as the non-critical threshold value, with the more + critical ones set by the utility as incrementally higher. This + simplifies the interface and ensures that the threshold values + do not get out of order. This requires specifying the sensor + number via -n. + + -m 002000s + Show SDRs for a specific MC (e.g. bus 00, sa 20, lun 00). This + could be used for PICMG or ATCA blade systems. The trailing + character, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -n snum + Number of the sensor to set. This num can be in decimal, or of + the form 0x1a, to match the value shown by sensor following the + "snum" tag. This is required if setting hi/lo thresholds via + -h/-l. + + -o Output the memory DIMM information from SMBIOS, including size. + Not available if using IPMI LAN via -N. Sample output: + Memory Device (0,0): DIMM_A1 : size=2048MB + Memory Device (0,1): DIMM_A2 : not present + + -p Persist the threshold being set (as specified via -l or -h). + This writes a "sensor -i" script line to the file + /usr/share/ipmiutil/thresholds.sh, which can then be executed at + each reboot by starting the /etc/init.d/ipmi_port service for + the desired runlevels. For Windows, the filename is thresh- + olds.cmd. + + -q Show any thresholds for each sensor in short format with ’:’ + delimiters, useful as an example for setting thresholds with + ’-u’. + + -r Show Raw SDR bytes also. + + -s Show sensor list in a simpler/canonical format without uninter- + preted binary values. Only the user-friendly interpreted sensor + information is shown. (same as -c). + + -t Show any Thresholds for each sensor also, in text format. + + -u Set unique threshold values. The values are specified in a + string of threshold values. It can be in raw hex characters or + in float values. All 6 possible thresholds must be specified, + but only the ones that are valid for this sensor will be + applied. These values are validated for ordering. For example: + -u 6:5:4:60:65:69 (float) or + -u 0x0605043c4145 (raw hex) + would mean 0x06=noncrit_lo, 0x05=crit_lo, 0x04=nonrec_lo, + 0x3c=noncrit_hi, 0x41=crit_hi, 0x45=nonrec_hi. + + -v Show Verbose output, including volatile thresholds, SDR thresh- + olds, max/min, hysteresis, and BMC_TAM decoding. + + -w Wrap the threshold data onto the same line as the sensor. This + may be convenient for scripting. + + -x Causes eXtra debug messages to be displayed. + + -L n Loop n times. This is useful along with -i. Default is one + loop. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +EXAMPLES + ipmiutil sensor sample output is below. + ipmiutil ver 2.21 + sensor: version 2.21 + -- BMC version 0.17, IPMI version 2.0 + _ID_ SDR_Type_xx ET Own Typ S_Num Sens_Description Hex & Interp Read- + ing + 000b SDR Full 01 01 20 a 01 snum 30 Baseboard Temp = 2e OK 46.00 + degrees C + 000e SDR Full 01 01 20 m 04 snum 50 Fan 1A = 6f OK 7659.00 + RPM + 0042 SDR Comp 02 6f 20 a 21 snum e0 DIMM 1A = 00 c0 04 00 + Present + 004e SDR FRU 11 1b dev: 20 03 80 00 0a 01 Pwr Supply 1 FRU + 0050 SDR IPMB 12 1b dev: 20 00 bf 07 01 Basbrd Mgmt Ctlr + 0051 SDR OEM c0 09 Intel: 02 02 00 01 70 71 + 0065 SDR OEM c0 11 Intel: SDR Package 17 + [...] + + Output Columns: + _ID_: This is an SDR ID or index number, in hex. This may vary from + chassis to chassis. + SDR_Type_xx: This shows the SDR Type and its hex representation. Some + SDR types have a custom display. The OEM SDRs only show the OEM vendor + by IANA number and then usually the data is listed in hex. + ET: For Full or Comp SDRs, this shows the Event Type. For other SDRs, + this shows the size of the SDR entry in hex (Sz). + Own: This is the hex slave address of the SDR Owner, usually 20 if BMC. + a/m: This indicates whether this sensor is either automatically or man- + ually rearmed, respectively. + Typ: This is the Sensor Type as defined in Table 42-3 of the IPMI 2.0 + spec. (01 = Temperature, 02 = Voltage, 03 = Current, 04 = Fan, etc.) + S_Num: This is the sensor number in hex. This remains consistent + across baseboards of the same type. The output can be parsed with the + "snum" delimiter to extract this value. + Sens_Description: This is the text description of this SDR, which is + stored within the SDR on the BMC. + Hex & Interp Reading: This is the raw hex value returned by GetSensor- + Reading, and its interpreted meaning. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.14 ISERIAL (ipmiutil serial) + +ISERIAL(8) ISERIAL(8) + + + +NAME + ipmiutil_serial - configure a system for Serial/EMP management func- + tions, such as Terminal Mode, and optionally share the port with the + Serial Console. + +SYNOPSIS + ipmiutil serial [-bcdeflq#rsvxB -m0 -m1 -n ser_chan -u user -p passwd + -NUPREFJTVY] + + +DESCRIPTION + ipmiutil serial is a program that uses an IPMI driver to send IPMI com- + mands which configure a system to enable EMP/serial Terminal Mode man- + agement functions within the firmware, so that an administrator can use + command-line character commands via the serial port to power cycle the + system and perform other functions, even if the system is not running + an OS. This level of access needs to be protected by a username/pass- + word login, which can be specified with this utility. This utility can + use either the /dev/ipmi0 driver from OpenIPMI, the /dev/imb driver + from Intel, the /dev/ipmikcs driver from valinux, direct user-space + IOs, or the IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. + + -b Set up and enable the Serial Port EMP parameters for Basic Mode + management functions. This does not set a username or password. + + -c Configure and enable the Serial Port EMP parameters for Terminal + Mode management functions, shared with BIOS Console Redirection. + Setting a new username and password for serial access via -u and + -p is recommended for security. + + -d Disable the serial port access for IPMI commands. The serial + port is then only available for BIOS console and OS functions. + A side-effect of this option is that it sets the default user + (1) back to admin access. + + -e Enable EMP Terminal Mode without shared BIOS console. The + serial port is then only available for EMP Terminal Mode func- + tions. + + -f Specifies the Flow Control for the Serial EMP. 0 means no flow + control, and 1 means RTS/CTS flow control (default). This must + match the BIOS Serial Console setting. + + -l Show LAN Parameters. This option reads and displays the LAN + Parameter configuration also. + + -m0 Switch the Serial Port MUX to Baseboard/BIOS Console operation. + Set no other configuration parameters. + + -m1 Switch the Serial Port MUX to Terminal Mode management. Set no + other configuration parameters. + + -n ser_chan + Sets the IPMI channel number to use for the EMP serial channel + (often 4). Note that the IPMI channels for LAN, Serial, etc. + are numbered differently on each platform type. The default is + to detect the first available IPMI serial channel. + + -# Same as -q below. + + -q Specify an alternate user number for the EMP Username from the + -u option. This is normally user number 2, 3, or 4, where 3 is + the default. The maximum number of users is 15. + + -r Read Only. This option just reads the Serial Parameter configu- + ration without writing any values. + + -s Set up and enable the Serial Port EMP parameters for Shared + operation between Basic Mode management functions and Baseboard + (BIOS) Remote Console. This option switches the Serial Port MUX + to Baseboard Console operation. + + -t Configure and enable the Serial Port EMP parameters for Terminal + Mode management functions, shared with BIOS Console Redirection. + Same as -c, but easier to remember. + + -u username + This specifies a username for the EMP Terminal Mode login. It + can be any string, up to 15 characters. If -u is not used, the + default user 1 (null) will be assumed. The username, if speci- + fied, will be set for user 3, unless option -q is specified. + + -p password + This specifies a password for the EMP Terminal Mode login. It + can be any string, up to 15 characters. A null password is used + if none is specified. This password applies to user 3 if -u is + used, to user 1 otherwise. + + -v priv + Set a specific access priVilege for this user, where priv can + be: 1=Callback, 2=User, 3=Operator, 4=Admin, 5=OEM, 15=NoAccess + The default if not specified or specified in error, is to use + 4=Admin. + + -x Causes extra debug messages to be displayed. + + -B Set the Baud rate of the serial port to one of the following: + 9600, 19,2K, 38.4K, 57.6K, or 115.2K. The default is 19.2K bps. + + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +EXAMPLES + ipmiutil serial -t (or -c) + Enables Terminal Mode management functions, shared with BIOS + Serial Console redirection. The user can switch between serial + console operations and IPMI Terminal Mode commands by typing ESC + ’)’ and ESC ’Q’. + + + ipmiutil serial -s + Enables Basic Mode management functions shared with BIOS Serial + Console redirection. The user can switch between serial console + operations and IPMI Basic Mode management programs on the same + serial port. + + + ipmiutil serial -d + Disables the serial port management functions. This would be + used if only the BIOS Serial Console were used and no BMC serial + management functions. + + + How to login to a Terminal Mode console: + ESC ( (switch to Terminal mode) + [SYS PWD -N ] (login for default user, null psw) + [SYS PWD -U ROOT -N PASSWORD] (syntax example for user 3) + [SYS 000157 ACTIVATE] (activate advanced commands) + [SYS HEALTH QUERY] + [SYS HELP] + [SYS PWD] (logoff) + ESC Q (switch to BIOS console) + See IPMI 1.5 Spec, Appendix E, and Intel TIGPR2U TPS for more informa- + tion. + + +DEPENDENCIES + The ipmiutil serial utility is intended to configure the EMP serial + port on the server for shared access between BMC/IPMI functions and + BIOS Console Redirection. Some platforms only support only Basic Mode + for BMC/IPMI functions. Basic Mode requires a remote client applica- + tion to utilize it (Windows ISC Console/DPC, or a special modified + Linux telnet). There are some platforms which implement Terminal Mode + via IPMI v1.5 Appendix E to make remote management with character com- + mands available on the serial port without a special remote client + application. + + For example, Intel TSRLT2 systems would use "ipmiutil serial -s" for + Basic Mode shared functions, but Intel TIGPR2U systems could use + "ipmiutil serial -c" to configure Terminal Mode functions. On your + system, run "ipmiutil serial -r" to check whether Serial Param(29): + "Terminal Mode Config" is supported. If not, configure Basic Mode via + "ipmiutil serial -s". + + + +PLATFORM SERIAL PORT CONFIGURATION EXAMPLES + First, enter BIOS Setup for Serial Console Redirection parameters: + (these vary by platform) + Console Redirection = Serial Port B + ACPI Redirection = Disabled + Baud Rate = 115.2K + Flow Control = CTS/RTS + Terminal Type = VT100 + Legacy Redirection = Enabled + Note that the Baud Rate can vary, but it must match in all locations + where it is used (BIOS, IPMI, and Linux). + For some non-Intel platforms, the serial console would be COM1 instead + of COM2, but should be enabled in BIOS. + From Linux, run "ipmiutil serial -c" for Terminal Mode shared configu- + ration. + Or, on older Intel TSRLT2 platforms: From Linux, run "ipmiutil serial + -s" for Basic Mode Shared configuration. + + +LINUX CONFIGURATION FOR SERIAL CONSOLE + If using lilo, in /etc/lilo.conf, add + append="console=ttyS1,19200n8 console=tty0" + (and comment out the "message=" line because it includes graphics) + Note that the append line can be placed in the global section and + removed from each kernel section if there are no other differences. + + + Or, if using grub, edit /boot/grub/grub.conf as follows: + #Omit the splashimage or gfxmenu + # splashimage=(hd0,0)/grub/splash.xpm.gz + #The serial and terminal lines are not usually needed + # serial --unit=1 --speed=19200 --word=8 --parity=no --stop=1 + # terminal --timeout=10 serial console + #Add the console=ttyS* parameter to the kernel line + kernel (hd0,0) /vmlinuz root=/dev/sda2 console=ttyS1,19200n8 + + + Add this line to /etc/initab, if ttyS1 is not already there: + co:2345:respawn:/sbin/agetty ttyS1 19200 vt100 + + Add this line to /etc/securetty, if ttyS1 is not already there: + ttyS1 + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.15 ISOL (ipmiutil sol) + +ISOL(8) ISOL(8) + + + +NAME + ipmiutil_sol - an IPMI Serial-Over-LAN Console application + + +SYNOPSIS + ipmiutil sol [-acdeilorsvwxz -NUPREFJTVY] + + +DESCRIPTION + This utility starts an IPMI Serial-Over-LAN console session. A Serial- + over-LAN console allows the client to see and modify functions before + the OS boots, such as BIOS setup, grub, etc. This utility uses either + the IPMI LAN 1.5 or 2.0 SOL interface. The 1.5 SOL interface is spe- + cific to Intel BMCs, while any IPMI 2.0 BMC should support 2.0 SOL. + The target system/node must first have these parameters configured + before SOL sessions can be started: + - [BIOS] serial console redirection parameters, + - [IPMI] lan and SOL parameters (see ipmiutil lan or ilan), and + - [OS] For Linux, edit grub.conf, inittab, and securetty parameters. + Be sure that the baud rate matches in all of the above places. See the + ipmiutil UserGuide section 4.8 for details. + + +OPTIONS + -a Activate the SOL Console session, and enter console mode. Use + the escape sequence (’~.’) to exit the session. + + -c ’^’ Set the escape Character to ’^’, or another ANSI character. + This changes the default two-character escape sequence (’~.’) to + the specified single escape character, which will end the SOL + session. + + -d Deactivate the SOL Console session. Use this if the previous + session was aborted abnormally and starting a new session gives + an error. + + -e Turn Encryption off in negotiation when activating a session. + By default, encryption is on for Serial-Over-LAN console ses- + sions. + + -l Use Legacy BIOS mapping for Enter key (CR+LF) instead of just + LF. This is needed for BIOS Setup menus and DOS, but causes an + extra LF to occur in Linux. So, only use this option if doing + BIOS or DOS changes. This should be seldom be needed since now + the default is to automatically detect these menus with colored + backgrounds and change the mapping. + + -i input_file + Use this file as an input script. The input_file will be read + after the session is established. This can be used to automate + certain tasks. The input_file is read one line at a time. If + the input_file does not have an escape character (~) to end the + session, then the input is returned to the keyboard when the + file ends. + + -o output_file + Use a Trace log. The output_file is created and all SOL screen + output is written to the file, including VT100 escape sequences. + If the output_file exists, the output is appended to it. This + can be used to log what the user has done in an SOL session. + + -r Use Raw terminal I/O instead of custom VT100 to ANSI translation + (in Windows). Use this option if the server is configured in + BIOS and BMC for ANSI and the utility is being invoked from Win- + dows. + + -s NNN For a slow link with high latency, this adds a delay of NNN + microseconds between sending and receiving SOL packets. The + default is 100 microseconds. + + -w (Windows only) Do not use the Windows Console buffer, but use + Windows stdio instead. This does not handle cursor positioning + correctly in some cases, however. + + -v log_file + Causes debug messages to be displayed to the specified debug + log_file. The default log_file is isoldbg.log in the current + directory. + + -x Causes debug messages to be displayed to the debug log file. + + -z Causes more verbose debug messages to be displayed to the debug + log file. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any supported + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +EXAMPLES + ipmiutil sol -a -N nodename -U username -P password + Starts an SOL console session to the nodename. Detect the lan proto- + col. + + ipmiutil sol -a -N nodename -U username -P password -Flan2 + Starts an SOL console session to the nodename. Force lan protocol to + 2.0. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) + iserial(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.16 IWDT (ipmiutil wdt) + +IWDT(8) IWDT(8) + + + +NAME + ipmiutil_wdt- display and set WatchDog Timer parameters + +SYNOPSIS + ipmiutil wdt [-acdelrtx -N node -P/-R pswd -U user -EFJTVY] + + +DESCRIPTION + ipmiutil wdt is a program that uses IPMI commands to display and set + WatchDog Timer parameters. + + This utility can use either any available IPMI driver, or direct user- + space IOs, or the IPMI LAN interface if -N. + + This utility is an example of how to access the IPMI watchdog parame- + ters directly, which allows changing the timer configuration. + + There is an init script provided with ipmiutil to automate the task of + managing the watchdog timer in user-space. + # chkconfig --add ipmiutil_wdt (skip this if no chkconfig) + # /etc/init.d/ipmiutil_wdt start + This sets the watchdog timer to reset the system if the wdt is not + restarted within 90 seconds. It creates an /etc/cron.d/wdt file to + restart wdt every 60 seconds. See also ipmiutil UserGuide section 4.4 + for more information. + + +OPTIONS + Command line options are described below. + + -a N Set watchdog event Action to N. Values: 0 = No action, 1 = Hard + Reset(default), 2 = Power down, 3 = Power cycle. + + -c Show watchdog output in a canonical format, with a default + delimiter of '|'. + + -d Disables the watchdog timer. + + -e Enables the watchdog timer. The timer is not actually started, + however, until the timer is reset. The pre-timeout action is + not enabled. + + -l Set the watchdog dontLog bit to not log watchdog events in the + SEL. + + -p N Set watchdog Pretimeout event action to N. Values: 0 = No + action(default), 1 = SMI, 2 = NMI, 3 = Messaging Interrupt. If + this is set to an action other than 0, the pretimeout will also + be set to 90% of the timeout. However, if the timeout is less + than 20 seconds, the pretimeout will not be enabled. + + -q S Set watchdog pretimeout value to S seconds, rather than 90% of + the timeout as in -p. The pretimeout value must be >= 5 and at + least 5 seconds less than the timeout value. + + -r Resets the watchdog timer. This should be done every N seconds + if the timer is running to prevent the watchdog action (usually + a system reset) from occurring. + + -tN Set the watchdog Timeout to N seconds. The default is 120 sec- + onds (2 minutes). + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + + +SEE ALSO + ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifirewall(8) + ifru(8) ifruset(8) ifwum(8) igetevent(8) ihealth(8) ihpm(8) ilan(8) + ipicmg(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) isunoem(8) + iwdt(8) ipmiutil(8) ipmi_port(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.17 IFRUSET (ifruset) + +IFRUSET(8) IFRUSET(8) + + + +NAME + ifruset - show/set Field Replacable Unit configuration data + +SYNOPSIS + ifruset [-bcimx -unpvsafo -N node -U user -P/-R pswd -EFJTVY] + + +DESCRIPTION + ifruset is a program that uses IPMI commands to show FRU configuration + data and optionally write any Product area fields into the FRU data. + Setting the FRU Product area fields is a function that might be done by + a manufacturer or system integrator. This utility can use either the + /dev/ipmi0 driver from OpenIPMI, the /dev/imb driver from Intel, the + /dev/ipmikcs driver from valinux, direct user-space IOs, or the IPMI + LAN interface if -N. + + This program is not built or installed by default. Integrators who + wish to use it should build ipmiutil from source, then do ’cd util; + make ifruset’. + + +OPTIONS + Command line options are described below. + + -u manuf + This option specifies a product manufacturer string to be writ- + ten to the baseboard FRU Product area field 0. This field can + be any string up to 20 characters. The default is to not modify + this FRU field. + + -n name + This option specifies a product name string to be written to the + baseboard FRU Product area field 1. This field can be any + string up to 20 characters. The default is to not modify this + FRU field. + + -p partnum + This option specifies a product part number string to be written + to the baseboard FRU Product area field 2. This field can be + any string up to 20 characters. The default is to not modify + this FRU field. + + -v prod_ver + This option specifies a product version number string to be + written to the baseboard FRU Product area field 3. The version + number can be any string up to 20 characters. The default is to + not modify this FRU field. + + -s serial_num + This option specifies a serial number string to be written to + the baseboard FRU Product area field 4. The serial number can + be any string up to 20 characters. The default is to not modify + this FRU field. + + -a asset_string + This option specifies an asset tag string to be written to the + baseboard FRU Product area field 5. The asset tag length is + limited by the existing FRU Product data, but is usually allowed + up to 20 characters. The default is to not modify this FRU + field. + + -f fruid + This option specifies a product FRU file ID string to be written + to the baseboard FRU Product area field 6. This field can be + any string up to 20 characters. + + -o oem This option specifies a product OEM field string to be written + to the baseboard FRU Product area field 7. This field can be + any string up to 20 characters. + + + -b Only show the Baseboard FRU data. The default behavior is to + also scan for any SDR FRU data or DIMM SPD data referenced by + the SDRs. + + -c Show FRU output in a canonical format, with a default delimiter + of '|'. + + -i 00 This option specifies a specific FRU ID to show. The input + value should be in hex (0b, 1a, etc.), as shown from the sensor + SDR output. By default, all FRU IDs that are specified in the + FRU locator SDRs are shown. + + -m 002000 + Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). This + could be used for PICMG or ATCA blade systems. The trailing + character, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -x Causes eXtra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.18 IPMI_PORT (ipmi_port) + +IPMI_PORT(8) IPMI_PORT(8) + + + +NAME + ipmi_port - a daemon to bind RMCP port 623 to prevent portmap from + using it + + +SYNOPSIS + ipmi_port [-bx] + + +DESCRIPTION + This ipmi_port service starts and binds port 623, then sleeps forever, + so that the portmap service will not try to reuse port 623, which it + otherwise might try to do. Since the IPMI firmware snoops the NIC + channel and grabs any traffic destined for RMCP port 623, any applica- + tion in the OS which tried to use port 623 would fail. + + +OPTIONS + Command line options are described below. + + -b Background mode. Convert to a daemon and run in background. + Without specifying this option, ipmi_port will run in fore- + ground. + + -x Causes eXtra debug messages to be displayed. + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.19 IPICMG (ipmiutil picmg) + +IPICMG(8) IPICMG(8) + + + +NAME + ipmiutil_picmg - send specific PICMG extended IPMI commands + + +SYNOPSIS + ipmiutil picmg [-mixNUPREFJTVY] parameters + + +DESCRIPTION + This ipmiutil picmg subcommand sends specific PICMG/ATCA extended IPMI + commands to the firmware. + + This utility can use either the /dev/ipmi0 driver from OpenIPMI, the + /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, + direct user-space IOs, or the IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. + + -i 00 This option specifies a specific FRU ID to show. The input + value should be in hex (0b, 1a, etc.), as shown from the sensor + SDR output. The default FRU ID is zero (0). + + -m 002000 + Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). This + could be used for PICMG or ATCA blade systems. The trailing + character, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +PARAMETERS + picmg parameters + + + properties + Get PICMG properties may be used to obtain and print + Extension major version information, PICMG identifier, + FRU Device ID and Max FRU Device ID. + + + addrinfo + + Get address information. This command may return infor- + mation on the Hardware address, IPMB-0 Address, FRU ID, + Site/Entity ID, and Site/Entity Type. + + frucontrol fru id options + + Set various control options: + + 0x00 - Cold Reset + + 0x01 - Warm Reset + + 0x02 - Graceful Reboot + + 0x03 - Issue Diagnostic Interrupt + + 0x04 - Quiesce [AMC only] + + 0x05-0xFF - Cold Reset + + activate fru id + + Activate the specified FRU. + + deactivate fru id + + Deactivate the specified FRU. + + policy get fru id + + Get FRU activation policy. + + policy set fru id lockmask lock + + Set FRU activation policy. lockmask is 1 or 0 to indi- + cate action on the deactivation or activation locked bit + respectively. lock is 1 or 0 to set/clear locked bit. + + portstate set|getall|getgranted|getdenied parameters + + Get or set various port states. See usage for parameter + details. + + + + +EXAMPLES + ipmiutil picmg properties + Gets PICMG properties from the default target address (slave address + 0x20). + + ipmiutil picmg -N 192.168.1.1 -U root -P pswd addrinfo + Gets PICMG Address Information from the specified IP address. + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.20 IFIREWALL (ipmiutil firewall) + +IFIREWALL(8) IFIREWALL(8) + + + +NAME + ipmiutil_firewall - configure the IPMI firmware firewall functions + + +SYNOPSIS + ipmiutil firewall [-mxNUPREFJTVY] parameters + + +DESCRIPTION + This ipmiutil firewall command supports the IPMI Firmware Firewall + capability. It may be used to add or remove security-based restric- + tions on certain commands/command sub-functions or to list the current + firmware firewall restrictions set on any commands. For each firmware + firewall command listed below, parameters may be included to cause the + command to be executed with increasing granularity on a specific LUN, + for a specific NetFn, for a specific IPMI Command, and finally for a + specific command’s sub-function. See Appendix H in the IPMI 2.0 Speci- + fication for a listing of any sub-function numbers that may be associ- + ated with a particular command. + + This utility can use either the /dev/ipmi0 driver from OpenIPMI, the + /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, + direct user-space IOs, or the IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. + + -m 002000 + Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). This + could be used for PICMG or ATCA blade systems. The trailing + character, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +PARAMETERS + Parameter syntax and dependencies are as follows: + + firewall [channel H] [lun L [ netfn N [command C [subfn S]]]] + + Note that if "netfn N" is specified, then "lun L" must also be speci- + fied; if "command C" is specified, then "netfn N" (and therefore "lun + L") must also be specified, and so forth. + + "channel H" is an optional and standalone parameter. If not specified, + the requested operation will be performed on the current channel. Note + that command support may vary from channel to channel. + + Firmware firewall commands: + + info [(Parms as described above)] + + List firmware firewall information for the specified LUN, + NetFn, and Command (if supplied) on the current or speci- + fied channel. Listed information includes the support, + configurable, and enabled bits for the specified command + or commands. + + Some usage examples: + + info [channel H] [lun L] + + This command will list firmware firewall informa- + tion for all NetFns for the specified LUN on + either the current or the specified channel. + + info [channel H] [lun L [ netfn N ] + + This command will print out all command informa- + tion for a single LUN/NetFn pair. + + info [channel H] [lun L [ netfn N [command C] ]] + + This prints out detailed, human-readable informa- + tion showing the support, configurable, and + enabled bits for the specified command on the + specified LUN/NetFn pair. Information will be + printed about each of the command subfunctions. + + info [channel H] [lun L [ netfn N [command C [subfn S]]]] + + Print out information for a specific sub-func- + tion. + + enable [(Parms as described above)] + + This command is used to enable commands for a given + NetFn/LUN combination on the specified channel. + + disable [(Parms as described above)] [force] + + This command is used to disable commands for a given + NetFn/LUN combination on the specified channel. Great + care should be taken if using the "force" option so as + not to disable the "Set Command Enables" command. + + reset [(Parms as described above)] + + This command may be used to reset the firmware firewall + back to a state where all commands and command sub-func- + tions are enabled. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.21 IFWUM (ipmiutil fwum) + +IFWUM(8) IFWUM(8) + + + +NAME + ipmiutil_fwum - Update IPMC using Kontron OEM Firmware Update Manager + + +SYNOPSIS + ipmiutil fwum [-mixNUPREFJTVY] parameters + + +DESCRIPTION + This ipmiutil fwum subcommand updates IPMC firmware using Kontron OEM + Firmware Update Manager. + + This utility can use either the /dev/ipmi0 driver from OpenIPMI, the + /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, + direct user-space IOs, or the IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. + + -i 00 This option specifies a specific FRU ID to show. The input + value should be in hex (0b, 1a, etc.), as shown from the sensor + SDR output. The default FRU ID is zero (0). + + -m 002000 + Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). This + could be used for PICMG or ATCA blade systems. The trailing + character, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +PARAMETERS + fwum parameters + + + info + Show information about current firmware. + + + status + Show status of each firmware bank present in the hard- + ware. + + + download filename + Download the specified firmware image. + + + upgrade [filename] + Install firmware upgrade. If the filename is specified, + the file is downloaded first, otherwise the last firmware + downloaded is used. + + + rollback + Ask IPMC to rollback to previous version. + + + tracelog + Show the firmware upgrade log. + + + +EXAMPLES + ipmiutil fwum info + Gets Firmware information + + ipmiutil fwum -N 192.168.1.1 -U root -P pswd download firmware.img + Downloads the firmware version contained in firmware.img over IPMI LAN. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.22 IHPM (ipmiutil hpm) + +IHPM(8) IHPM(8) + + + +NAME + ipmiutil_hpm - PICMG HPM.1 Upgrade Agent + + +SYNOPSIS + ipmiutil hpm [-mxNUPREFJTVY] parameters + + +DESCRIPTION + This ipmiutil hpm subcommand updates HPM components using PICMG HPM.1 + file + + This utility can use either the /dev/ipmi0 driver from OpenIPMI, the + /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, + direct user-space IOs, or the IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. + + -m 002000 + Target a specific MC (e.g. bus 00, sa 20, lun 00). This could + be used for PICMG or ATCA blade systems. The trailing charac- + ter, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +PARAMETERS + hpm parameters + + + check + Check the target information. + + + check filename + Display both the existing target version and image ver- + sion on the screen. + + + download filename + Download specified firmware. + + + upgrade filename [all] [component x] [activate] + Upgrade the firmware using a valid HPM.1 image file. If + no option is specified, the firmware versions are checked + first and the firmware is upgraded only if they are dif- + ferent. + + + all + Upgrade all components even if the firmware ver- + sions are the same (use this only after using + "check" command). + + + component x + Upgrade only given component from the given file. + component 0 - BOOT + component 1 - RTK + + + activate + Activate new firmware right away. + + + + activate + Activate the newly uploaded firmware. + + + targetcap + Get the target upgrade capabilities. + + + compprop id opt + Get the specified component properties. Valid component + id: 0-7. Opt can be one of following: + 0 - General properties + 1 - Current firmware version + 2 - Description string + 3 - Rollback firmware version + 4 - Deferred firmware version + + + abort + Abort the on-going firmware upgrade. + + + upgstatus + Show status of the last long duration command. + + + rollback + Perform manual rollback on the IPM Controller firmware. + + + rollbackstatus + Show the rollback status. + + + selftestresult + Query the self test results. + + + +EXAMPLES + ipmiutil hpm targetcap + Gets HPM target capabilities + + ipmiutil hpm -N 192.168.1.1 -U root -P pswd download firmware.img + Downloads the HPM firmware version contained in firmware.img over IPMI + LAN. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.23 ISUNOEM (ipmiutil sunoem) + +ISUNOEM(8) ISUNOEM(8) + + + +NAME + ipmiutil_sunoem - OEM commands for Sun servers + +SYNOPSIS + ipmiutil sunoem [-mx -NPRUEFJTVY] commands + + +DESCRIPTION + ipmiutil sunoem commands is a program that uses Sun OEM IPMI commands + to perform platform-specific functions. + + +OPTIONS + -m 002000 + Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). This + could be used for PICMG or ATCA blade systems. The trailing + character, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +COMMANDS + led + + These commands provide a way to get and set the status of LEDs + on a Sun Microsystems server. Use ’sdr list generic’ to get a + list of devices that are controllable LEDs. The ledtype parame- + ter is optional and not necessary to provide on the command line + unless it is required by hardware. + + get sensorid [ledtype] + + Get status of a particular LED described by a Generic + Device Locator record in the SDR. A sensorid of all will + get the status of all available LEDS. + + set sensorid ledmode [ledtype] + + Set status of a particular LED described by a Generic + Device Locator record in the SDR. A sensorid of all will + set the status of all available LEDS to the specified + ledmode and ledtype. + + LED Mode is required for set operations: + OFF Off + ON Steady On + STANDBY 100ms on 2900ms off blink rate + SLOW 1HZ blink rate + FAST 4HZ blink rate + + LED Type is optional: + OK2RM Ok to Remove + SERVICE Service Required + ACT Activity + LOCATE Locate + + + fan speed 0-100 + + Set system fan speed (PWM duty cycle). + + sshkey + + set userid keyfile + + This command will allow you to specify an SSH key + to use for a particular user on the Service Pro- + cessor. This key will be used for CLI logins to + the SP and not for IPMI sessions. View available + users and their userids with the ’user list’ com- + mand. + + del userid + + This command will delete the SSH key for a speci- + fied userid. + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) + iserial(8) isol(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.24 IEKANALYZER (ipmiutil ekanalyzer) + +IEKANALYZER(8) IEKANALYZER(8) + + + +NAME + ipmiutil_ekanalyzer - run FRU-Ekeying analyzer with FRU files + +SYNOPSIS + ipmiutil ekanalyzer [-mx -NPRUEFJTVY] commands (deprecated, see ifru + instead) + + +DESCRIPTION + ipmiutil ekanalyzer is a program that analyzes FRU Ekeying information + from files saved from PICMG IPMI systems. + + ekanalyzer command xx=filename1 xx=filename2 [rc=filename3] + NOTE: This command can support a maximum of 8 files per command line + + + filename1 + binary file that stores FRU data of a Carrier or an AMC module + + + filename2 + binary file that stores FRU data of an AMC module. These binary + files can be generated from this command: + ipmiutil fru -i id -d filename + + + filename3 + configuration file used for configuring On-Carrier Device ID or + OEM GUID. This file is optional. + + + xx indicates the type of the file. It can take the following value: + oc : On-Carrier device + a1 : AMC slot A1 + a2 : AMC slot A2 + a3 : AMC slot A3 + a4 : AMC slot A4 + b1 : AMC slot B1 + b2 : AMC slot B2 + b3 : AMC slot B3 + b4 : AMC slot B4 + sm : Shelf Manager + + + +OPTIONS + -m 002000 + Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). This + could be used for PICMG or ATCA blade systems. The trailing + character, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +COMMANDS +The available commands for ekanalyzer are: + + +print [carrier | power | all] + + carrier (default) oc=filename1 oc=filename2 ... + + Display point to point physical connectivity between carriers + and AMC modules. + Example: + # ipmiutil ekanalyzer print carrier oc=fru oc=carrierfru + From Carrier file: fru + Number of AMC bays supported by Carrier: 2 + AMC slot B1 topology: + Port 0 =====> On Carrier Device ID 0, Port 16 + Port 1 =====> On Carrier Device ID 0, Port 12 + Port 2 =====> AMC slot B2, Port 2 + AMC slot B2 topology: + Port 0 =====> On Carrier Device ID 0, Port 3 + Port 2 =====> AMC slot B1, Port 2 + *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + From Carrier file: carrierfru + On Carrier Device ID 0 topology: + Port 0 =====> AMC slot B1, Port 4 + Port 1 =====> AMC slot B1, Port 5 + Port 2 =====> AMC slot B2, Port 6 + Port 3 =====> AMC slot B2, Port 7 + AMC slot B1 topology: + Port 0 =====> AMC slot B2, Port 0 + AMC slot B1 topology: + Port 1 =====> AMC slot B2, Port 1 + Number of AMC bays supported by Carrier: 2 + + + power xx=filename1 xx=filename2 ... + + Display power supply information between carrier and AMC + modules. + + all xx=filename xx=filename ... + + Display both physical connectivity and power supply of each car- + rier and AMC modules. + + +frushow xx=filename + Convert a binary FRU file into human readable text format. Use -v + option to get more display information. + + +summary [match | unmatch | all] + + match (default) xx=filename xx=filename ... + Display only matched results of Ekeying match between an On-Car- + rier device and an AMC module or between 2 AMC modules. Example: + # ipmiutil ekanalyzer summary match oc=fru b1=amcB1 a2=amcA2 + On-Carrier Device vs AMC slot B1 + AMC slot B1 port 0 ==> On-Carrier Device 0 port 16 + Matching Result + - From On-Carrier Device ID 0 + -Channel ID 11 || Lane 0: enable + -Link Type: AMC.2 Ethernet + -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet + link + -Link Group ID: 0 || Link Asym. Match: exact match + - To AMC slot B1 + -Channel ID 0 || Lane 0: enable + -Link Type: AMC.2 Ethernet + -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet + link + -Link Group ID: 0 || Link Asym. Match: exact match + *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + AMC slot B1 port 1 ==> On-Carrier Device 0 port 12 + Matching Result + - From On-Carrier Device ID 0 + -Channel ID 6 || Lane 0: enable + -Link Type: AMC.2 Ethernet + -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet + link + -Link Group ID: 0 || Link Asym. Match: exact match + - To AMC slot B1 + -Channel ID 1 || Lane 0: enable + -Link Type: AMC.2 Ethernet + -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet + link + -Link Group ID: 0 || Link Asym. Match: exact match + *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + On-Carrier Device vs AMC slot A2 + AMC slot A2 port 0 ==> On-Carrier Device 0 port 3 + Matching Result + - From On-Carrier Device ID 0 + -Channel ID 9 || Lane 0: enable + -Link Type: AMC.2 Ethernet + -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet + link + -Link Group ID: 0 || Link Asym. Match: exact match + - To AMC slot A2 + -Channel ID 0 || Lane 0: enable + -Link Type: AMC.2 Ethernet + -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet + link + -Link Group ID: 0 || Link Asym. Match: exact match + *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + AMC slot B1 vs AMC slot A2 + AMC slot A2 port 2 ==> AMC slot B1 port 2 + Matching Result + - From AMC slot B1 + -Channel ID 2 || Lane 0: enable + -Link Type: AMC.3 Storage + -Link Type extension: Serial Attached SCSI (SAS/SATA) + -Link Group ID: 0 || Link Asym. Match: FC or SAS interface + {exact match} + - To AMC slot A2 + -Channel ID 2 || Lane 0: enable + -Link Type: AMC.3 Storage + -Link Type extension: Serial Attached SCSI (SAS/SATA) + -Link Group ID: 0 || Link Asym. Match: FC or SAS interface + {exact match} + *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + + unmatch xx=filename xx=filename ... + + Display the unmatched results of Ekeying match between an On- + Carrier device and an AMC module or between 2 AMC modules + + all xx=filename xx=filename ... + + Display both matched result and unmatched results of Ekeying + match between two cards or two modules. + + +SEE ALSO + ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifirewall(8) + ifru(8) ifruset(8) ifwum(8) igetevent(8) ihealth(8) ihpm(8) ilan(8) + ipicmg(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) isunoem(8) + iwdt(8) ipmiutil(8) ipmi_port(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.25 ITSOL (ipmiutil tsol) + +ITSOL(8) ITSOL(8) + + + +NAME + ipmiutil_tsol - Tyan IPMIv1.5 Serial-Over-LAN Console application + + +SYNOPSIS + ipmiutil tsol [recvip] [port=NUM] [ro|rw] [rows=NUM] [cols=NUM] [alt- + term] + + +DESCRIPTION + This command allows Serial-over-LAN sessions to be established with + Tyan IPMIv1.5 SMDC such as the M3289 or M3290. The default command run + with no arguments will establish default SOL session back to local IP + address. Optional arguments may be supplied in any order. + + +OPTIONS + + Send receiver IP address to SMDC which it will use to send + serial traffic to. By default this detects the local IP + address and establishes two-way session. Format of ipaddr is + XX.XX.XX.XX + + + port Configure UDP port to receive serial traffic on. By default + this is 6230. + + + ro|rw Confiure SOL session as read-only or read-write. Sessions + are read-write by default. + + + rows Set terminal rows [default: rows=24] + + + cols Set terminal columns [default: cols=80] + + + altterm + Alternate terminal setup [default is off] + + + +EXAMPLES + ipmiutil tsol 192.168.1.1 + Starts a Tyan SOL console session to the IP address. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) + iserial(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.26 IDELLOEM (ipmiutil delloem) + +IDELLOEM(8) IDELLOEM(8) + + + +NAME + ipmiutil_delloem - OEM commands for Dell servers + +SYNOPSIS + ipmiutil delloem [-mx -NPRUEFJTVY] commands + + +DESCRIPTION + ipmiutil delloem commands is a program that uses Dell OEM IPMI commands + to perform platform-specific functions. + + +OPTIONS + -m 002000 + Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). This + could be used for PICMG or ATCA blade systems. The trailing + character, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +COMMANDS + mac list + Lists the MAC address of LOMs + + + mac get + Shows the MAC address of specified LOM. 0-7 System LOM, 8- + DRAC/iDRAC. + + + lan set + Sets the NIC Selection Mode (dedicated, shared, + shared with failover lom2, shared with Failover all + loms). + + + lan get + Returns the current NIC Selection Mode (dedicated, shared, + shared with failover lom2, shared with Failover all loms). + + + lan get active + Returns the current active NIC (dedicated, LOM1, LOM2, LOM3, + LOM4). + + + powermonitor + Shows power tracking statistics + + + powermonitor clear cumulativepower + Reset cumulative power reading + + + powermonitor clear peakpower + Reset peak power reading + + + powermonitor powerconsumption + Displays power consumption in + + + powermonitor powerconsumptionhistory + Displays power consumption history + + + powermonitor getpowerbudget + Displays power cap in + + + powermonitor setpowerbudget + Allows user to set the power cap in + + + powermonitor enablepowercap + To enable set power cap + + + powermonitor disablepowercap + To disable set power cap + + + windbg start + Starts the windbg session (Cold Reset & SOL Activation) + + + windbg end + Ends the windbg session (SOL Deactivation) + + + vFlash info Card + Shows Extended SD Card information + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) + iserial(8) isol(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.27 IDCMI (ipmiutil dcmi) + +IDCMI(8) IDCMI(8) + + + +NAME + ipmiutil_dcmi - handle DCMI functions + + +SYNOPSIS + ipmiutil dcmi [-admsx -NUPREFTVY] + + +DESCRIPTION + This ipmiutil dcmi subcommand handles DCMI command functions according + to the DCMI specification. + + This utility can use either the /dev/ipmi0 driver from OpenIPMI, the + /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, + direct user-space IOs, or the IPMI LAN interface if -N. + + +OPTIONS + Command line options are described below. + + -a string + Set the DCMI Asset Tag to this string. + + -d string + Set the DCMI MC ID to this string. + + -m 002000 + Target a specific MC (e.g. bus 00, sa 20, lun 00). This could + be used for PICMG or ATCA blade systems. The trailing charac- + ter, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -s When getting info, also get the DCMI sensor information. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +FUNCTIONS + info Get DCMI Capabilities, MC ID, and Asset Tag. This is the default + function if no function was specified. + + + power Get DCMI Power reading and DCMI Power limit, if supported in the + DCMI capabilties. + + power set_limit + Set Power limit + + power set_action + Set Power limit exception action (where action = no_action | + power_off | log_sel) + + power set_correction + Set Power limit correction time (in ms) + + power set_sample + Set Power limit sampling period (in sec) + + power activate + Activate Power limit + + power deactivate + Deactivate Power limit + + + + thermal + Get/Set DCMI Thermal parameters. This requires DCMI 1.5 sup- + port. + + + config Get/Set DCMI Configuration parameters. This requires DCMI 1.5 + support. + + + help Show the help (usage) message + + +EXAMPLES + ipmiutil dcmi info -s + Gets DCMI information, plus DCMI sensor information + + ipmiutil dcmi -N 192.168.1.1 -U root -P pswd + Gets DCMI information over IPMI LAN. + + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) + igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) + isol(8) iwdt(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.28 ISMCOEM (ipmiutil smcoem) + +ISMCOEM(8) ISMCOEM(8) + + + +NAME + ipmiutil_smcoem - OEM commands for SuperMicro servers + +SYNOPSIS + ipmiutil smcoem [-mx -NPRUEFJTVY] commands + + +DESCRIPTION + ipmiutil smcoem is a function that uses SuperMicro OEM IPMI commands to + perform platform-specific functions. + + +OPTIONS + -m 002000 + Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). This + could be used for PICMG or ATCA blade systems. The trailing + character, if present, indicates SMI addressing if ’s’, or IPMB + addressing if ’i’ or not present. + + -x Causes extra debug messages to be displayed. + + -N nodename + Nodename or IP address of the remote target system. If a node- + name is specified, IPMI LAN interface is used. Otherwise the + local system management interface is used. + + -P/-R rmt_pswd + Remote password for the nodename given. The default is a null + password. + + -U rmt_user + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 17): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. Default is 3. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + +COMMANDS + intrusion + + This command resets any chassis intrusion condition that may + have occurred. + + + bmcstatus [enable|disable] + This command gets or sets the BMC service status. Alone, with- + out arguments, it gets the BMC status as either enabled or dis- + abled. With an argument of either enable or disable, it will + also set the BMC status as specified. + + + firmware + + This command gets the extra firmware version information, if + available. + + + + lanport [dedicated|lan1|failover] + This command gets or sets the IPMI LAN interface port. If set + to dedicated, only the dedicated IPMI NIC can be configured for + IPMI LAN. If set to lan1, only the first onboard NIC (LAN1) can + be configured for IPMI LAN. If set to failover, both the dedi- + cated and onboard LAN1 port would be configured for IPMI LAN, + with the same IP address. + + +SEE ALSO + ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) + ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) + iserial(8) isol(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + +-------------------------------------- +3.29 ISELTIME (iseltime) + +ISELTIME(8) ISELTIME(8) + + + +NAME + iseltime - synchronize BMC SEL time with OS system time + +SYNOPSIS + seltime [-sx -NUPRETVF] + + +DESCRIPTION + seltime is a program that uses IPMI commands to set the BMC SEL time + from the OS system time. The OS system time should be in sync with the + BIOS Real-Time-Clock. The OS system time may also be kept from drift- + ing via an NTP server. Normally the BIOS will set the BMC time from + the RTC during boot, but running this command may be necessary periodi- + cally if the system does not reboot for many weeks, for instance. Note + that this command should not be run too frequently to avoid BMC timing + issues. Once per day should be sufficient. + + Run with no options, this command reads the BMC SEL time without set- + ting anything. + + This utility can use either the /dev/ipmi0 openipmi driver, the + /dev/imb Intel driver, the /dev/ipmikcs valinux driver, a driverless + interface, or IPMI LAN. + + +OPTIONS + -s Sets the SEL time (no more than once a day). + + -x Causes eXtra debug messages to be displayed. + + + -N nodename + Nodename of the remote target system. If a nodename is speci- + fied, IPMI LAN interface is used. Otherwise the local system + management interface is used. + + -P/-R password + Remote password for the nodename given. The default is a null + password. + + -U username + Remote username for the nodename given. The default is a null + username. + + -E Use the remote password from Environment variable IPMI_PASSWORD. + + -F drv_t + Force the driver type to one of the followng: imb, va, open, + gnu, landesk, lan, lan2, lan2i, kcs, smb. Note that lan2i means + lan2 with intelplus. The default is to detect any available + driver type and use it. + + -J Use the specified LanPlus cipher suite (0 thru 14): + 0=none/none/none, 1=sha1/none/none, 2=sha1/sha1/none, + 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, 5=sha1/sha1/xrc4_40, + 6=md5/none/none, ... 14=md5/md5/xrc4_40. + + -T Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, + 2=MD5, 4=Straight Password, 5=OEM. + + -V Use a specified IPMI LAN privilege level. 1=Callback level, + 2=User level, 3=Operator level, 4=Administrator level (default), + 5=OEM level. + + -Y Yes, do prompt the user for the IPMI LAN remote password. + Alternatives for the password are -E or -P. + + + +SEE ALSO + ipmiutil(8) isel(8) ievents(8) icmd(8) + + +WARNINGS + See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil + and any bug fix list. + + + +-------------------------- +4.0 USE CASES +-------------------------- + +---------------------------------------------------------------- +4.1 Usage of IPMI utilities for sensor thresholds +---------------------------------------------------------------- + +Get and set the Baseboard Temperature sensor threshold with +the 'sensor' utility like this: +# ipmiutil sensor -t +[...] +000e SDR Full 01 39 20 sensnum 30 Baseboard Temp = 1d OK 29.00 degrees C + hi-crit 65.00 hi-noncr 60.00 lo-noncr 10.00 lo-crit 5.00 +[...] +Using sensor number 30, index 000e, and the hex raw reading (1d) as a +baseline from above, we can set the lower threshold above the current +reading, i.e. 0x1e or 30 C. + +# ipmiutil sensor -i 0e -t -n 0x30 -l 30 +sensor: version 1.39 +idx = 0e +-- BMC version 0.48, IPMI version 1.5 +_ID_ SDR_Type_xx Sz Own Typ S_Num Sens_Description Hex & Interp Reading +000e SDR Full 01 39 20 sensnum 30 Baseboard Temp = 1d OK 29.00 degrees C + hi-crit 65.00 hi-noncr 60.00 lo-noncr 10.00 lo-crit 5.00 + Setting SDR 000e sensor 30 to lo=1e hi=ff +GetThreshold[30]: 30 1b 0a 05 00 3c 41 00 +SetThreshold[30]: 30 03 20 1f 1e 00 00 00 +SetSensorThreshold[30] to lo=1e(30.000) hi=ff(0.000), ret = 0 +# +This sets the lower non-crit to 1e (30 C), and lower crit to 1f (31 C), and +would cause a sensor threshold event. Note that this utility takes the +raw threshold value and increments it sequentially for each of the severities. +Now we should set the lower threshold back to a more normal value of 5 C. +# ipmiutil sensor -i 0e -t -n 0x30 -l 5 +sensor: version 1.39 +idx = 0e +-- BMC version 0.48, IPMI version 1.5 +_ID_ SDR_Type_xx Sz Own Typ S_Num Sens_Description Hex & Interp Reading +000e SDR Full 01 39 20 a 01 snum 30 Baseboard Temp = 1b Crit-lo 27.00 degrees +C + hi-crit 66.00 hi-noncr 60.00 lo-noncr 10.00 lo-crit 5.00 + Setting SDR 000e sensor 30 to lo=05 hi=ff +GetThreshold[30]: 30 1b 20 1f 00 3c 42 00 +SetThreshold[30]: 30 03 07 06 05 00 00 00 +SetSensorThreshold[30] to lo=05(5.000) hi=ff(0.000), ret = 0 +# +The threshold events can be displayed via ipmiutil sel. +# ipmiutil sel -l4 +4b18 07/17/06 14:33:14 BMC 01 Temperature 30 LoC thresh OK now act=1b thr=06 +4b04 07/17/06 14:33:14 BMC 01 Temperature 30 LoN thresh OK now act=1b thr=07 +4af0 07/17/06 14:26:38 BMC 01 Temperature 30 Lo Crit thresh act=1b thr=1f +4adc 07/17/06 14:26:38 BMC 01 Temperature 30 Lo Noncrit thresh act=1b thr=20 +# + + +---------------------------------------------------------------- +4.2 How to configure a system for IPMI LAN +---------------------------------------------------------------- + +Below is a sample IPMI LAN configuration with IPMI LAN enabled, +PEF Alerts enabled, and 2 users configured for IPMI LAN. + +The key unique LAN parameters that must be configured for basic +IPMI LAN functionality are: 3,4,5,6,12,13, plus the +Channel Access Mode and User Access. +Additional parameters for PEF and SOL are shown below also. + +Defaults for required parameters are detected by ipmiutil lan, except +for the username, password, and the BMC LAN IP if it is not shared. +The detection uses the OS LAN configuration to find the gateway IP, +MAC addresses, mask, etc. + +# ipmiutil lan -e -u user2 -p password2 [-I 192.168.1.1 ] [-L 3] +Running "ipmiutil lan -e -u user2 -p password2" would set up all required +IPMI LAN parameters if the OS and BMC share an IP address. If not, +the -I parameter should be included to specify the BMC IP. +You may want to add -G [-H] to specify the gateway IP address [gateway MAC] +if the OS does not have a NIC on the same subnet. +To configure an RMM NIC for IPMI LAN, the '-L 3' parameter specifies the +RMM NIC as IPMI LAN channel 3. Otherwise ipmiutil detects the first +available IPMI LAN channel and configures it (usually channel 1). +Note that this also sets up the PEF table for events, but the channel is +not enabled for PEF events unless an Alert destination is specified, +either in snmpd.conf or via -A. + +Note that the IPMI LAN protocol works only from remote systems. +The IPMI LAN cannot recognize LAN commands from the local system +because those requests never really go onto the physical network. +Use the non-LAN form of a given ipmiutil command (without -N) to run locally. + +Below is sample output from a system after being configured for IPMI LAN. + +# ipmiutil lan +ipmiutil ver 2.71 +ilan ver 2.71 +-- BMC version 0.66, IPMI version 2.0 +ilan, GetPefEntry ... +PEFilter(01): 01 Temperature Sensor event - enabled for alert +PEFilter(02): 02 Voltage Sensor event - enabled for alert +PEFilter(03): 04 Fan Failure event - enabled for alert +PEFilter(04): 05 Chassis Intrusion event - enabled for alert +PEFilter(05): 08 Power Supply Fault event - enabled for alert +PEFilter(06): 0c Memory ECC Error event - enabled for alert +PEFilter(07): 0f BIOS POST Error event - enabled for alert +PEFilter(08): 07 FRB Failure event - enabled for alert +PEFilter(09): 13 Fatal NMI event - enabled for alert +PEFilter(10): 23 Watchdog Timer Reset event - enabled for alert +PEFilter(11): 12 System Restart event - enabled for alert +PEFilter(12): 20 OS Critical Stop event - enabled for alert +PEFilter(13): 09 Power Redundancy Lost event - enabled for alert +PEFilter(14): 09 Power Unit OK event - enabled for alert +PEFilter(15): 01 Temperature OK event - enabled for alert +PEFilter(16): 02 Voltage OK event - enabled for alert +PEF Control: 01 : PEFenable +PEF Actions: 2f : Alert PwrDn Reset PwrCyc DiagInt +PEF Startup Delay: 3c : 60 sec +PEF Alert Startup Delay: 3c: 60 sec +PEF Alert Policy[1]: 01 18 11 00 : Chan[1] Dest[1] Enabled +PEF Alert Policy[2]: 02 00 00 00 : Disabled +PEF Alert Policy[3]: 03 00 00 00 : Disabled +PEF Alert Policy[4]: 04 00 00 00 : Disabled + +ilan, GetLanEntry for channel 1 ... +Lan Param(0) Set in progress: 00 +Lan Param(1) Auth type support: 15 : None MD5 Pswd +Lan Param(2) Auth type enables: 14 14 14 14 00 : MD5 Pswd +Lan Param(3) IP address: 192 168 1 192 +Lan Param(4) IP addr src: 01 : Static +Lan Param(5) MAC addr: 00 15 17 8b b4 aa +Lan Param(6) Subnet mask: 255 255 255 0 +Lan Param(7) IPv4 header: 1e 00 00 +Lan Param(10) BMC grat ARP: 01 : Grat-ARP enabled +Lan Param(11) grat ARP interval: 04 : 2 sec +Lan Param(12) Def gateway IP: 192 168 1 200 +Lan Param(13) Def gateway MAC: 00 15 17 8b b4 71 +Lan Param(14) Sec gateway IP: 0 0 0 0 +Lan Param(15) Sec gateway MAC: 00 00 00 00 00 00 +Lan Param(16) Community string: public +Lan Param(17) Num dest: 04 +Lan Param(18) Dest type: 01 00 01 00 00 +Lan Param(18) Dest type: 02 00 00 00 00 +Lan Param(18) Dest type: 03 00 00 00 00 +Lan Param(18) Dest type: 04 00 00 00 00 +Lan Param(19) Dest address: 01 00 00 [192 168 1 161] 00 07 e9 06 15 31 +Lan Param(19) Dest address: 02 00 00 [0 0 0 0] 00 00 00 00 00 00 +Lan Param(19) Dest address: 03 00 00 [0 0 0 0] 00 00 00 00 00 00 +Lan Param(19) Dest address: 04 00 00 [0 0 0 0] 00 00 00 00 00 00 +Lan Param(192) DHCP Server IP: 0 0 0 0 +Lan Param(193) DHCP MAC Address: 00 00 00 00 00 00 +Lan Param(194) DHCP Enable: 00 +Channel(1=lan) Access Mode: 02 04 : Always Avail, PEF Alerts Enabled +ilan, GetSOL for channel 1 ... +SOL Enable: 01 : enabled +SOL Auth: 82 : User +SOL Accum Interval: 04 32 : 20 msec +SOL Retry Interval: 06 14 : 200 msec +SOL nvol Baud Rate: 0a : 115.2k +SOL vol Baud Rate: 00 : nobaud +SOL Payload Support(1): 03 00 15 00 00 00 00 00 +SOL Payload Access(1,1): 02 00 00 00 : enabled +SOL Payload Access(1,2): 02 00 00 00 : enabled +SOL Payload Access(1,3): 00 00 00 00 : disabled +SOL Payload Access(1,4): 00 00 00 00 : disabled +Users: showing 4 of max 15 users (2 enabled) +User Access(chan1,user1): 0f 02 01 14 : IPMI, Admin () +User Access(chan1,user2): 0f 02 01 14 : IPMI, Admin (root) +User Access(chan1,user3): 0f 02 01 0f : No access (admin) +User Access(chan1,user4): 0f 02 01 0f : No access () +ipmiutil lan, completed successfully + + +---------------------------------------------------------------- +4.3 Usage of IPMI utilities for Automatic IPMI LAN configuration +---------------------------------------------------------------- + +Suppose there are a number of IPMI servers that need to have their +BMC LAN interface configured. Shell access to the servers +(via ssh or similar) is assumed. + +BMC LAN, Simple case, password is not changed: +[ssh connection] +# ipmiutil lan -e +[ssh exit] + +BMC LAN, Complex case, assuming that a password needs to be set and +that the session text (or script) must encrypt the password. +So, using the gnupg.org utilities with public/private keys +would look something like this: +[ Set up list (or db) of encrypted passwords & key by nodename. + Note that the list and keyfile could reside locally, building + the ssh script syntax, so that only the encrypted password is + exposed remotely. ] +[ssh connection] +# gpg --import mykey.file +# mynode=`uname -n` +# my_enc_psw=`grep $mynode mylist.file |cut -f2` +# ipmiutil lan -e -p `gpg --decrypt $my_enc_psw` +[ssh exit] + +---------------------------------------------------------------- +4.4 Usage of IPMI Utilities to Set Watchdog timer +---------------------------------------------------------------- + +Watchdog timer coverage over the phases of boot and OS operation: + Power-on to end-of-POST = BIOS FRB2 + end-of-POST to OS Running = BIOS OS Boot Timeout + OS User-space operation = SMS Timeout via "ipmiutil wdt" +Each of these phases uses the same watchdog timer mechanism but initializes +the timer with different values. + +For user-space watchdog control, use "ipmiutil wdt" to read, set, and reset the +IPMI watchdog timer. There is an init script provided with ipmiutil to +automate this task. +# chkconfig --add ipmiutil_wdt (skip this if no chkconfig) +# /etc/rc.d/init.d/ipmiutil_wdt start +This sets the watchdog timer to reset the system if the wdt is not +restarted within 90 seconds. It creates an /etc/cron.d/wdt file to +restart wdt every 60 seconds. +This user-space approach is desirable if you wish the watchdog to expire for +such conditions as out-of-memory or out-of-processes, since the cron job will +start a short process for each invocation. Note that this also does not require additional services or modules to be running all the time. + +Note that the device-independent way to start/stop watchdog timers in +Linux is to use the /dev/watchdog interface via the OpenIPMI driver. + +For kernel-space watchdog management, you could build a custom kernel with +embedded watchdog support by changing the CONFIG_IPMI_* driver parameters +to =y in the Linux .config (including CONFIG_IPMI_WATCHDOG) and building the +kernel. Then edit grub.conf to start the watchdog with the kernel parameter +"ipmi_watchdog_start_now=1". + + +---------------------------------------------------------------- +4.5 Usage of kernel panic handler code (now CONFIG_IPMI_PANIC_EVENT): +---------------------------------------------------------------- + +If a Linux panic occurs, the bmc_panic module will automatically save +the date/time of the panic, and minimal information about the panic. +This information will also be sent via SNMP to the remote management console, +and (if bmcpanic.patch) the Alarms panel LED will be turned on. +If lkcd is also configured, a full crash-dump of the panic will be saved +for later analysis. +After this, the system will automatically reboot. +This provides instant notification to the administrator, and significantly +improved post-mortem diagnosis. + +Without these features, the administrator may never have any indication that +the system had crashed, and no way to know how to diagnose and fix the problem. + +To enable this, set CONFIG_IPMI_PANIC_EVENT=y and CONFIG_IPMI_PANIC_STRING=y +in the kernel .config file. + +You can also run ipmiutil lan to enable sending an SNMP trap for a kernel +panic as an "OS Critical Stop" event. + +Make sure that the panic timeout is not zero (infinite), by using +echo "5" > /proc/sys/kernel/panic +or by adding 'append="panic=5"' to the lilo or grub configuration. + +After a panic occurs, you can then use ipmiutil sel to view the firmware +SEL for that event. It should look something like this: +# ipmiutil sel +[...] +2d04 07/21/04 07:54:22 SMI 20 OS Critical Stop 46 (Fat) 6f [a1 61 74] +2d18 OEM Event 20 00 Fatal excep +2d2c OEM Event 20 01 tion +[...] + + + +---------------------------------------------------------------- +4.6 Interpreting BMC LAN SNMP Traps from Platform Events. +---------------------------------------------------------------- + +There are MIB files provided for BMC LAN SNMP traps with this project. +They are installed into /usr/share/ipmiutil/bmclan*.mib, and sym-linked +into /usr/share/snmp/mibs/. +The Platform Event Traps (enterprises.3183) are defined in bmclanpet.mib. +The Alert-on-LAN traps (enterprises.3183) are defined in bmclanaol.mib. + +Note that Plaform Event Traps also have a 46-byte binary variable bindings +field included with the trap. +See Section 12.5 and 12.6 from the Intel ISM 5.x TPS for background. + +Actual PET Trap Data from a System Restart Event trap: + +snmputil: trap generic=6 specific=1208065 + from -> 10.243.42.197 +Variable = .iso.org.dod.internet.private.enterprises.3183.1.1.1 +Value = String <0xa4><0x12><0x00><0x5f><0x62><0xa1><0xd5><0x11><0x00><0x80><0x60><0xff><0x94><0x47><0x03><0x00><0x21><0x19><0x0c><0x7f><0x3b><0x12><0xff><0xff><0x20><0x20><0x00><0x01><0x83><0x00><0x00><0x01><0xff><0xff><0x00><0x00><0x00><0x00><0x00><0x19><0x00><0x00><0x01><0x57><0x00><0x0c><0xc1> + +Byte Mapping +Bytes of the trap variable binding data are mapped. +An extra byte of data is at the end (47). + +Byte Data Meaning +1 0xa4 System GUID (16 bytes) +2 0x12 +3 0x00 +4 0x5f +5 0x62 +6 0xa1 +7 0xd5 +8 0x11 +9 0x00 +10 0x80 +11 0x60 +12 0xff +13 0x94 +14 0x47 +15 0x03 +16 0x00 +17 0x21 Sequence Number/Cookie (2 bytes) +18 0x19 +19 0x0c Local Timestamp (4 bytes) +20 0x7f +21 0x3b +22 0x12 +23 0xff UTC Offset (2 bytes) +24 0xff +25 0x20 Trap Source Type +26 0x20 Event Source Type +27 0x00 Event Severity +28 0x01 Sensor Device +29 0x83 Sensor Number +30 0x00 Entity +31 0x00 Entity Instance +32 0x01 Event Data (8 bytes max, 3 bytes used) +33 0xff +34 0xff +35 0x00 +36 0x00 +37 0x00 +38 0x00 +39 0x00 +40 0x19 filler byte +41 0x00 Manufacturer ID (4 bytes, 000157=Intel) +42 0x00 +43 0x01 +44 0x57 +45 0x00 Product ID (2 bytes) +46 0x0c +47 0xc1 extra byte + +Also, there is an optional "Extended Platform Event Trap" format defined +for IPMI which breaks up the 46-byte binary varbind into separate +varbinds for easier parsing. + +See section 4.10 for how to use ipmiutil to perform the configuration and interpretation of IPMI PET traps. For example, the above trap would be interpreted as follows: + # events -p 00 80 60 ff 94 47 03 00 21 19 0c 7f 3b 12 ff ff 20 20 00 01 83 00 00 01 ff ff 00 00 00 00 00 19 00 00 01 57 00 0c c1 +events version 2.34 +0019 08/23/04 11:13:06 BMC 12 System Event #83 OEM System Boot 6f [01 ff ff] + + + +---------------------------------------------------------------- +4.7 Interpreting newer PECI sensors for CPU Thermal Margin +---------------------------------------------------------------- + +The newer CPUs do more monitoring internally rather that using absolute +temperature thresholds from the BMC. The CPU knows best what its +thresholds should be, and the thresholds may be different for different +CPUs. So, there are several IPMI sensors that expose the state of the +CPU temperature via the newer PECI interface. + +1) Thermal Margin - A negative value indicating margin to throttling point. + Once margin reaches 0, throttling begins +2) Therm Control % - Reports the percentage of time within a 5.8 second + sliding window during which the processor was throttling +3) VRD Hot - Discrete sensor indicating one of the phases of the processor + VRD circuit on the baseboard has exceeded it's limit. This is not + indicative of CPU - just the VR circuit on the baseboard. + +Therm Margin is the one to watch if you want max performance without +throttling. If it reaches 0, you will start losing performance to throttling. +However, the Therm Margin throttling is well in advance of the temperatures +that would cause a CPU ThermTrip condition and shut off the system. + + +---------------------------------------------------------------- +4.8 How to configure a system for IPMI Serial-Over-LAN Console +---------------------------------------------------------------- + +The Serial-Over-LAN (SOL) console configuration requires +configuring BIOS, BMC/IPMI, and OS parameters. +Intel S5000 motherboards and prior use Serial Port B (ttyS1) for SOL, +but Intel S5500 and most other vendors use Serial Port A (ttyS0). + +Enter BIOS Setup for Serial Console Redirection parameters: +(these vary by platform) + Console Redirection = Serial Port A + ACPI Redirection = Disabled + Baud Rate = 19.2K (or 115.2k) + Flow Control = CTS/RTS + Terminal Type = VT100 + Legacy Redirection = Enabled or Disabled (optional, for DOS) +Note that the Baud Rate can vary, but it must match in all +locations where it is used (BIOS, IPMI, and Linux). +Some vendors may have OS utilities to change BIOS parameters, for instance, +Intel BIOS would use 'syscfg /bcs COM1 19200 CTS VT100' to do this. + +Run this sample command for IPMI LAN & SOL configuration: + ipmiutil lan -e -u user2 -p password2 [-B 115.2k] [-I 192.168.1.1] +Use the -I portion if your BMC does not share a MAC address +with the OS. If not specified, the baud rate defaults to either +19.2k or the baud previously set with "ipmiutil serial", if set. +If there is more than one IPMI LAN channel, the alternate channel +can be configured by adding "-L 3" for channel 3. + +---- FOR LINUX SERIAL CONSOLE ----- +Edit /boot/grub/grub.conf to: + add "console=ttyS0,19200n8" on the end of the kernel line, + then comment out the "splashimage=" line + and optionally add these lines for grub menu display + serial --unit=0 --speed=19200 --word=8 --parity=no --stop=1 + (use --unit=1 if ttyS1) + terminal --timeout=10 serial console + (Adding these two lines sometimes does not timeout and continue + without user interaction using some grub-0.9x versions.) + +If using /etc/inittab, edit it to add: + co:2345:respawn:/sbin/agetty -h -L 19200 ttyS0 vt100 +If using Ubuntu, RHEL6, or Fedora 11, the /etc/inittab has been replaced by +Upstart, with a different procedure. + +If using Upstart (Ubuntu, RHEL6), adding the console=ttyS0,19200n8 in grub +will auto-start everything. Editing the serial init for getty is not +required. However, if you want to use hardware flow control, change the +/etc/init/serial.conf last line to: + exec /sbin/agetty -h -L $SPEED /dev/$DEV vt100-nav + +Edit /etc/securetty to add: + ttyS0 + +Edit $HOME/.bashrc or /etc/bashrc to add: + stty crtscts +Adding "stty crtscts" in your bashrc turns on RTS/CTS flow control +once you are logged in. Otherwise operations with lots of output may +miss some chunks of data. Some Linux distributions do not turn this +on by default. + +---- FOR WINDOWS SERIAL CONSOLE ----- +To configure Windows for Serial (System Admin Console), +these BOOTCFG.EXE commands manipulate the BOOT.INI for SAC: +BOOTCFG /EMS ON /PORT BIOSSET /ID 1 (Enables SAC) +BOOTCFG /EMS OFF /ID 1 (Disables SAC) + + +---- FOR FREEBSD SERIAL CONSOLE ----- +Open the file /etc/ttys with an editor and set up a line like this: + ttyu0 "/usr/libexec/getty std.19200" vt100 on secure +For more details, see +http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html + + +---------------------------------------------------------------- +4.9 Using ipmiutil Library APIs for custom programs +---------------------------------------------------------------- + +The various driver modules and LAN interfaces are included in +libipmiutil.a which is built by "cd util; make libipmiutil.a". +The library is named ipmiutil.lib in Windows. + +The library is built by default along with the ipmi_sample application +to show how to use this library. Note that ipmi_sample is linked +with libcrypto.so (option -lcrypto) in order to support the lanplus +interface. Only the SOL console function requires lanplus, all other +functions can use the lan interface, since the IPMI 2.0 firmware is +required to support both lan and lanplus. If the custom program does +not require the lanplus interface, it can be reconfigured without +lanplus by first running './configure --enable-standalone'. + +This library provides a common interface to use IPMI commands. +See section 9.0 for more information about the common library APIs. +See util/ipmi_sample.c for an example of how these APIs can be used. + + +---------------------------------------------------------------- +4.10 How to configure a system for SNMP Traps via IPMI PEF rules +---------------------------------------------------------------- + +The IPMI Platform Event Filter (PEF) actions support sending +SNMP v1 traps from the IPMI firmware when IPMI events occur, +regardless of the state of the OS. + +1) Configure the server to send IPMI PET traps. +These can be configured using ipmiutil on the target server +with ipmiutil. This command will enable the PEF rules +for SNMP traps. + # ipmiutil lan -e -I -A [-k] [-a num] +The -k option enables PEF rules for the "OK" or clearing traps +for certain IPMI events. +Note that several SNMP alert destinations can be specified +by using the -a num option, where num=1,2,3,4 (1 is the default). + +This enables the following PEF rules: + PEFilter(01): 01 Temperature Sensor event - enabled for alert + PEFilter(02): 02 Voltage Sensor event - enabled for alert + PEFilter(03): 04 Fan Failure event - enabled for alert + PEFilter(04): 05 Chassis Intrusion event - enabled for alert + PEFilter(05): 08 Power Supply Fault event - enabled for alert + PEFilter(06): 0c Memory ECC Error event - enabled for alert + PEFilter(07): 0f BIOS POST Error event - enabled for alert + PEFilter(08): 07 FRB Failure event - enabled for alert + PEFilter(09): 13 Fatal NMI event - enabled for alert + PEFilter(10): 23 Watchdog Timer Reset event - enabled for alert + PEFilter(11): 12 System Restart event - enabled for alert + PEFilter(12): 20 OS Critical Stop event - enabled for alert + PEFilter(13): 09 Power Redundancy Lost event - enabled for alert + PEFilter(14): 09 Power Unit OK event - enabled for alert + PEFilter(15): 01 Temperature OK event - enabled for alert + PEFilter(16): 02 Voltage OK event - enabled for alert +Note that Fan failure events do not have a clearing trap because +a fan failure would usually require removing system power to +physically replace the fan. + +The IPMI Platform Event Traps (PET) can then be tested with these steps: + +2) On the trap receiver, start the SNMP services. + For Linux, this would be: + Optionally edit /etc/snmp/snmpd.conf for a broader view, e.g.: + view systemview included .1 + /etc/init.d/snmpd start + /etc/init.d/snmptrapd start + +3) On the server under test, cause an event by: + a) removing and reinserting a power supply, or + b) setting the temperature thresholds out of range: + ipmiutil sensor -n 20 -t -h 15 + (sets the Baseboard Temp high threshold to 15 degrees C) + then setting the temperature thresholds back to normal: + ipmiutil sensor -n 20 -t -h 61 + (sets the Baseboard Temp high threshold to 61 degrees C) + c) you can see the IPMI events generated by doing: + ipmiutil sel + +The IPMI PET traps (enterprises.3183) are defined in +/usr/share/ipmiutil/bmclanpet.mib, and the alert destination system +(trap receiver) can interpret them with the ipmiutil events utility +as follows: + +4) Get the sensor output from a server of the same type. +Copy /usr/share/ipmiutil/sensor_out.txt to the system where the +traps are received. This would not be required if the trap receiver +and server are both the same type. + +5) Get the hex data bytes from the IPMI PET trap. +This sample was taken from /var/log/messages on a Linux system with snmptrapd: +Sep 26 11:22:17 chapin1 snmptrapd[19859]: 2008-09-26 11:22:17 ac1-tigw1u-bmc [10.243.42.235] (via 10.243.42.235) TRAP, SNMP v1, community public SNMPv2-SMI::enterprises.3183.1.1 Enterprise Specific Trap (65792) Uptime: 141 days, 11:37:06.13 SNMPv2-SMI::enterprises.3183.1.1.1 = Hex-STRING: B1 D8 4F 76 1D E2 11 DC B3 E8 00 0E 0C C7 1B A0 11 08 14 31 D3 D4 FF FF 20 20 10 20 30 53 44 50 2B 30 00 00 00 00 00 19 00 00 01 57 08 11 C1 + +6) Skip the first 8 hex bytes from the hex data above and pass the data to +the ipmiutil events application. + # sfil=/usr/share/ipmiutil/sensor_out.txt + # ipmiutil events -p -s $sfil B3 E8 00 0E 0C C7 1B A0 11 08 14 31 D3 D4 FF FF 20 20 10 20 30 53 44 50 2B 30 00 00 00 00 00 19 00 00 01 57 08 11 C1 +events version 2.34 +000b SDR Full 01 01 20 a 01 snum 30 Baseboard Temp +0008 09/26/08 04:50:12 BMC 01 Temperature #30 Lo Noncrit thresh act=2b thr=30 + +This output should match the output from 'ipmiutil sel' on the server. + +See also section 4.6 for the format of the IPMI PET data. + + + +---------------------------------- +5.0 IPMI UTILITIES ON WINDOWS +---------------------------------- + +Sample file contents of the ipmiutil win32/64 zip archive: + README.txt - Information about the archive, with install instructions + LICENSE.txt - the BSD license + UserGuide.txt - the ipmiutil User Guide + ChangeLog.txt - change history + install.cmd - INSTALL ipmiutil + uninstall.cmd - UNINSTALL ipmiutil + ipmiutil.exe - meta-command for all of the functions + ipmiutil_wdt.cmd - automatically resets the watchdog timer + checksel.cmd - automatically checks the SEL for nearly full + ialarms.cmd - shortcut for ipmiutil alarms + icmd.cmd - shortcut for ipmiutil cmd + iconfig.cmd - shortcut for ipmiutil config + idiscover.cmd - shortcut for ipmiutil discover + ievents.exe - shortcut for ipmiutil events + ifru.cmd - shortcut for ipmiutil fru + igetevent.cmd - shortcut for ipmiutil getevent + ihealth.cmd - shortcut for ipmiutil health + ilan.cmd - shortcut for ipmiutil lan + isensor.cmd - shortcut for ipmiutil sensor + iserial.cmd - shortcut for ipmiutil serial + isel.cmd - shortcut for ipmiutil sel + isol.cmd - shortcut for ipmiutil sol + ireset.cmd - shortcut for ipmiutil reset + iwdt.cmd - shortcut for ipmiutil wdt + showsel.reg - to add showsel DLL to registry + showselun.reg - to remove showsel DLL from registry + showselmsg.dll - DLL for System Log IPMI messages + libeay32.dll - from openssl crypto + ssleay32.dll - from openssl crypto + buildsamp.cmd - to build the sample programs + ipmiutil.dll - use this with the static library + ipmiutil.lib - static library with ipmiutil functions + ipmiutillib.dll - Use this for dynamic DLL + ipmiutillib.lib - link this into samples to use dynamic DLL + ipmiutillib.exp - exported list of ipmiutil functions + ipmi_sample.exe - sample application + ipmi_sample_evt.exe - sample application with eventing + +The install and build instructions are below, all other information +in the UserGuide.txt is the same for Windows and Linux. + + +---------------------------------- +5.1 WINDOWS INSTALL INSTRUCTIONS +---------------------------------- + +If installing from an MSI file, just double-click to run the install wizard. + +If installing from the ZIP file, just run install.cmd. + +Otherwise, these are the manual steps to perform. + +The showselmsg.dll needs to be copied into the %SystemRoot%\System32 +directory and then run showsel.reg, so that the Windows EventLog service +can find information about the showsel events. + +Note that the openssl crypto libraries (libeay32.dll and ssleay32.dll) +should be copied to %SystemRoot%\System32 also to provide crypto functions +for the lanplus logic, if they are not already present. + +Note that for Windows Vista/7 workstation and later, make sure to +'Run as administrator' when installing. Windows Server should not +require this step. + +The utilities can be run separately, or an ipmiutil directory can be +added into the %PATH%. + +A sample install batch file: +> set MYBIN=c:\bin +> copy libeay32.dll %SystemRoot%\system32 +> copy ssleay32.dll %SystemRoot%\system32 +> copy showselmsg.dll %SystemRoot%\system32 +> start showsel.reg +> mkdir %MYBIN% +> copy *.exe %MYBIN% + +The usage of ipmiutil in Windows is the same as in Linux OS, with the +exception of drivers: + * The Intel IPMI driver supported is the Intel IMB driver (imbdrv.sys), + which can be obtained from the Intel Resource CD for your system, + from the ISM CD, or from http://www.intel.com by searching downloads + for IMB driver. + http://downloadfinder.intel.com/scripts-df-external/Product_Search.aspx?Prod_nm=imb+driver + or cached at http://ipmiutil.sf.net/kern/imbdrv130.zip + * The Microsoft IPMI driver (ipmidrv.sys), which comes with Windows 2003 R2 + and later, is also supported. + +It should be noted that the two IPMI drivers should not be installed at the +same time, since they will interfere with each other. +So, for some systems or applications, you may need to uninstall the Microsoft +IPMI driver, like this: + * start Control Panel/System app + * go to Hardware tab, start Device Manager + * select View/Show Hidden Devices + * go to "System Devices", + * right-click "Microsoft Generic IPMI Compliant Device" + * select Properties + * on driver tab, click "Uninstall" + * then reboot. + +How to install Intel IPMI driver from the cached copy at http://ipmiutil.sf.net/kern/imbdrv130.zip + Extract imbdrv130.zip to c:\temp or similar +> cd c:\temp +> cd x86_64 (or 'cd ia32' if 32-bit Windows) +> install.bat (DeviceSetup.exe install imbdrv.inf *IMBDRV) +> driverquery (shows the drivers currently installed/running) + +How to install the Windows Intel IPMI driver (imbdrv.sys from the Intel CD): +> cd c:\temp +> copy d:\ism\software\win32\pi\common\imb*.* +> copy d:\ism\software\win32\pi\common\win2k*.exe +> ren imbdrv2k.sys imbdrv.sys +> copy imbapi.dll %SystemRoot%\system32 +> win2kinstall c:\temp\imbdrv.inf *IMBDRV +> driverquery (shows the drivers currently installed/running) + +Note that when using 32-bit binaries on 64-bit Windows Server installations, +make sure that the Microsoft VC++ Redistributable package is installed +(vcredist_x86.exe). +See http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en +to download this if needed. + + + +---------------------------------- +5.2 WINDOWS BUILD INSTRUCTIONS +---------------------------------- + +The ipmiutil Windows binaries for each release are pre-built and posted +at http://ipmiutil.sourceforge.net, but here is how to build the ipmiutil +EXEs for Windows from source. +Note that the WIN32 compile flag is used. +The ipmiutil buildwin.cmd shows how to compile and link the lib and exe +files, although many people prefer instead to do builds with the +Microsoft VisualStudio project GUI. + +5.2.1 Install Visual Studio +The build environment assumes that VisualStudio 6.0 VC98 or +later is installed. + +5.2.2 Download contrib files +Before running buildwin.cmd, first download the contributed +files for Windows (includes getopt.c and openssl). +A copy of these files is available from + http://ipmiutil.sf.net/FILES/ipmiutil-contrib.zip +The above zip contains all of the contributed source used. +Refer to getopt.c from one of these + BSD getopt.c: + http://www.openmash.org/lxr/source/src/getopt.c?c=gsm + public domain getopt.c: + http://www.koders.com/c/fid034963469B932D9D87F91C86680EB08DB4DE9AA3.aspx + GNU LGPL getopt.c: + http://svn.xiph.org/trunk/ogg-tools/oggsplit/ +Refer to openssl from this link (Apache-style license, not gpl) + http://www.openssl.org/source/openssl-0.9.7l.tar.gz. + +5.2.3 Copy initial contrib files into ipmiutil +Below are sample directories where ipmiutil*.tar.gz was unpacked, +and where the openssl*.tar.gz was unpacked. +> set ipmiutil_dir=c:\dev\ipmiutil +> set openssl_dir=c:\dev\openssl + +First, copy the getopt.c & getopt.h into the util directory. +From the directory where ipmiutil-contrib.zip was unpacked, +> copy getopt.* %ipmiutil_dir%\util +The iphlpapi.lib comes from Visual Studio (2003 .Net), Win2003 DDK, or WinSDK. +> copy iphlpapi.lib %ipmiutil_dir%\lib +> copy iphlpapi.h %ipmiutil_dir%\util + +5.2.4 Build the openssl libraries +To build from original source you would then want to build a copy of openssl +for Windows, and copy the built openssl files to lib & inc. +Follow the openssl build instructions from INSTALL.W32 for VC++ to build +these binaries. + +5.2.5 Copy the resulting LIB and DLL binaries to ipmiutil +> copy %openssl_dir%\out32dll\libeay32.lib %ipmiutil_dir%\lib +> copy %openssl_dir%\out32dll\ssleay32.lib %ipmiutil_dir%\lib +> copy %openssl_dir%\out32dll\libeay32.dll %ipmiutil_dir%\util +> copy %openssl_dir%\out32dll\ssleay32.dll %ipmiutil_dir%\util +> mkdir %ipmiutil_dir%\lib\lanplus\openssl +> copy %openssl_dir%\include\openssl\*.h %ipmiutil_dir%\lib\lanplus\openssl + +5.2.6 Set the Visual Studio variables with vcvars*.bat +For your installation of Microsoft Visual Studio, it has batch files to +set the Visual C variables. Run the appropriate architecture version of +these batch files to set the VC variables. + +Example: +C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat +or +C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat +or +C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat + + +5.2.7 Run buildwin.cmd +buildwin.cmd will build all of the Windows EXE and DLL files. + +If you are using ipmiutil for a bootable WinPE environment, and do not need +Serial-Over-LAN functionality, the buildwin2.cmd will build the Windows EXE +files without using the openssl libraries, to simplify the process. The +openssl libraries are required for the IPMI LAN 2.0 crypto functions that +Serial-Over-LAN requires. + +---------------------------------- +5.3 WINDOWS COMMAND USAGE +---------------------------------- + +Because of the differences in Linux getopt and the getopt used in +the Windows build, the order of parameters is more important in Windows. + +For example in Linux, the following command usages work, but not in Windows: + # ipmiutil cmd 00 20 18 01 -N 192.168.1.154 + # ipmiutil cmd 00 20 -N 192.168.1.154 18 01 + +The Windows equivalent would have to put the -N option immediately after +the subfunction, as shown below: + > ipmiutil cmd -N 192.168.1.154 00 20 18 01 + + +-------------------------- +6.0 SAMPLE OUTPUT +-------------------------- +Below is sample ipmiutil output from an Intel TIGW1U server. + +# ipmiutil alarms +ipmiutil ver 2.13 +alarms ver 2.13 +-- BMC version 0.19, IPMI version 2.0 +Alarm LEDs: critical = off major = off minor = off power = off +Alarm Relays: major = off minor = off +disk slot 0 LED: off +disk slot 1 LED: off +disk slot 2 LED: off +disk slot 3 LED: off +disk slot 4 LED: off +disk slot 5 LED: off +alarms, completed successfully + +# ipmiutil cmd 00 20 18 01 +ipmiutil ver 2.21 +icmd ver 2.21 +This is a test tool to compose IPMI commands. +Do not use without knowledge of the IPMI specification. +-- BMC version 0.19, IPMI version 2.0 +respData[len=15]: 20 01 00 19 02 9f 57 01 00 11 08 00 48 00 16 +send_icmd ret = 0 +icmd, completed successfully + +# ipmiutil config -s /tmp/bmcconfig.out +ipmiutil ver 2.21 +bmcconfig ver 1.1 +-- BMC version 0.19, IPMI version 2.0 +### bmcconfig, GetPefEntry ... +### bmcconfig, GetLanEntry for channel 1 ... +### bmcconfig, GetSOL for channel 1 ... +### bmcconfig, GetSerEntry for channel 4 ... +bmcconfig, completed successfully + +# cat /tmp/bmcconfig.out +PEFParam 6,01: 01 c0 01 01 10 ff ff 01 ff 01 95 0a 00 00 00 00 00 00 00 00 00 +PEFParam 6,02: 02 c0 01 01 10 ff ff 02 ff 01 95 0a 00 00 00 00 00 00 00 00 00 +PEFParam 6,03: 03 c0 01 01 08 ff ff 04 ff 01 95 0a 00 00 00 00 00 00 00 00 00 +PEFParam 6,04: 04 c0 01 01 08 ff ff 05 05 6f 01 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,05: 05 c0 01 01 08 ff ff 08 ff 6f 06 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,06: 06 c0 01 01 10 ff ff 0c 08 6f 02 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,07: 07 c0 01 01 08 ff ff 0f 06 6f 01 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,08: 08 c0 01 01 10 ff ff 07 ff 6f 1c 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,09: 09 c0 01 01 02 ff ff 13 ff 6f 3e 03 00 00 00 00 00 00 00 00 00 +PEFParam 6,10: 0a c0 01 01 01 ff ff 23 03 6f 0e 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,11: 0b c0 01 01 01 ff ff 12 ff 6f 02 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,12: 0c 80 01 01 10 ff ff 20 ff 6f ff 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,13: 0d 80 01 01 08 ff ff 09 ff 0b 02 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,14: 0e 80 01 01 04 ff ff 09 ff 0b 01 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,15: 0f 80 01 01 04 ff ff 01 ff 81 95 0a 00 00 00 00 00 00 00 00 00 +PEFParam 6,16: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,17: 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,18: 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,19: 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +PEFParam 6,20: 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +PEFParam 1: 01 +PEFParam 2: 2f +PEFParam 3: 3c +PEFParam 4: 3c +PEFParam 9,1: 01 18 11 00 +PEFParam 9,2: 02 00 00 00 +PEFParam 9,3: 03 00 00 00 +PEFParam 9,4: 04 00 00 00 +LanParam 0,0: 00 +LanParam 1,0: 15 +LanParam 2,0: 14 14 14 14 00 +LanParam 3,0: 0a f3 2a eb +LanParam 4,0: 01 +LanParam 5,0: 00 0e 0c c7 1b a2 +LanParam 6,0: ff ff ff 00 +LanParam 7,0: 40 40 10 +LanParam 10,0: 01 +LanParam 11,0: 04 +LanParam 12,0: 0a f3 2a fb +LanParam 13,0: 00 d0 06 21 eb fc +LanParam 14,0: 00 00 00 00 +LanParam 15,0: 00 00 00 00 00 00 +LanParam 16,0: 70 75 62 6c 69 63 00 00 00 00 00 00 00 00 00 00 00 00 +LanParam 17,0: 04 +LanParam 18,1: 01 00 01 00 00 +LanParam 18,2: 02 00 00 00 00 +LanParam 18,3: 03 00 00 00 00 +LanParam 18,4: 04 00 00 00 00 +LanParam 19,1: 01 00 00 0a f3 2a d8 00 07 e9 06 15 30 +LanParam 19,2: 02 00 00 00 00 00 00 00 00 00 00 00 00 +LanParam 19,3: 03 00 00 00 00 00 00 00 00 00 00 00 00 +LanParam 19,4: 04 00 00 00 00 00 00 00 00 00 00 00 00 +LanParam 192,0: 00 00 00 00 +LanParam 193,0: 00 00 00 00 00 00 +LanParam 194,0: 00 +ChannelAccess 1: 02 04 +SOLParam 1,0: 01 +SOLParam 2,0: 82 +SOLParam 3,0: 04 32 +SOLParam 4,0: 06 14 +SOLParam 5,0: 0a +SOLParam 6,0: 00 +SOLPayloadSupport 1: 00 15 00 00 00 00 00 +SOLPayloadAccess 1,1: 02 00 00 00 +SOLPayloadAccess 1,2: 02 00 00 00 +SOLPayloadAccess 1,3: 00 00 00 00 +UserAccess 1,1: 0f 02 01 14 +UserName 1: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +# UserPassword 1: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +UserAccess 1,2: 0f 02 01 14 +UserName 2: 75 73 72 32 00 00 00 00 00 00 00 00 00 00 00 00 +# UserPassword 2: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +UserAccess 1,3: 0f 02 01 0f +UserName 3: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +# UserPassword 3: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +UserAccess 1,4: 0f 02 01 0f +UserName 4: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +# UserPassword 4: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +SerialParam 0,0: 00 +SerialParam 1,0: 15 +SerialParam 2,0: 14 14 14 14 00 +SerialParam 3,0: 87 +SerialParam 4,0: 00 +SerialParam 5,0: 00 00 ff ff ff +SerialParam 6,0: 03 +SerialParam 7,0: 20 0a +SerialParam 8,0: 16 08 +SerialParam 9,0: 3f 00 +SerialParam 10,0: 01 41 54 45 31 51 30 56 31 58 34 26 44 32 26 43 31 +SerialParam 11,0: 2b 2b 2b 00 00 +SerialParam 12,0: 41 54 48 00 00 00 00 00 +SerialParam 13,0: 41 54 44 00 00 00 00 00 +SerialParam 14,0: 00 +SerialParam 15,0: 70 75 62 6c 69 63 00 00 00 00 00 00 00 00 00 00 00 00 +SerialParam 16,0: 08 +SerialParam 17,1: 01 00 05 03 00 +SerialParam 17,2: 02 00 05 03 00 +SerialParam 17,3: 03 00 05 03 00 +SerialParam 17,4: 04 00 05 03 00 +SerialParam 18,0: 3c +SerialParam 19,1: 01 00 07 +SerialParam 19,2: 02 00 07 +SerialParam 19,3: 03 00 07 +SerialParam 19,4: 04 00 07 +SerialParam 29,0: 66 11 +ChannelAccess 4: 2b 04 +UserAccess 4,1: 0f 02 01 14 +UserName 1: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +# UserPassword 1: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +UserAccess 4,2: 0f 02 01 14 +UserName 2: 75 73 72 32 00 00 00 00 00 00 00 00 00 00 00 00 +# UserPassword 2: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +UserAccess 4,3: 0f 02 01 0f +UserName 3: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +# UserPassword 3: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +UserAccess 4,4: 0f 02 01 0f +UserName 4: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +# UserPassword 4: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +# ipmiutil discover -a -b 10.243.42.255 +ipmiutil ver 2.21 +idiscover ver 1.3 +Discovering IPMI Devices: +1: response from 10.243.42.141 +2: response from 10.243.42.7 +3: response from 10.243.42.14 +4: response from 10.243.42.145 +5: response from 10.243.42.172 +6: response from 10.243.42.182 +7: response from 10.243.42.185 +8: response from 10.243.42.183 +9: response from 10.243.42.184 +10: response from 10.243.42.138 +11: response from 10.243.42.181 +12: response from 10.243.42.179 +13: response from 10.243.42.139 +14: response from 10.243.42.216 +15: response from 10.243.42.210 +16: response from 10.243.42.229 +17: response from 10.243.42.150 +18: response from 10.243.42.120 +19: response from 10.243.42.246 +20: response from 10.243.42.158 +21: response from 10.243.42.168 +22: response from 10.243.42.248 +23: response from 10.243.42.242 +24: response from 10.243.42.243 +25: response from 10.243.42.223 +26: response from 10.243.42.171 +27: response from 10.243.42.174 +28: response from 10.243.42.222 +29: response from 10.243.42.226 +30: response from 10.243.42.228 +31: response from 10.243.42.110 +32: response from 10.243.42.120 +33: response from 10.243.42.128 +34: response from 10.243.42.169 +idiscover: 1 pings sent, 34 responses + +# ipmiutil events 18 00 02 02 00 00 00 20 00 04 09 01 6f 44 0f ff +ipmiutil ver 2.40 +ievents version 2.40 +RecId Date/Time_______ Source_ Evt_Type SensNum Evt_detail - Trig [Evt_data] +0018 12/31/69 19:00:02 BMC 09 Power Unit #01 AC Lost 6f [44 0f ff] +ievents, completed successfully + +# ipmiutil events -p -s sensor-TIGW1U.out B3 E8 00 0E 0C C7 1B A0 11 08 12 7F 10 90 FF FF 20 20 00 20 02 15 01 41 0F FF +ipmiutil ver 2.40 +ievents version 2.40 +0023 SDR Comp 02 2b 20 a 09 snum 02 Power Redundancy +0008 11/01/07 10:13:20 BMC 09 Power Unit #02 Redundancy Lost 0b [41 0f ff] +ievents, completed successfully + + +# ipmiutil fru +ipmiutil ver 2.21 +fruconfig: version 2.21 +-- BMC version 0.19, IPMI version 2.0 +SDR[004c] FRU 20 00 0c 01 Baseboard FRU +SDR[004d] FRU 20 02 15 01 Power Dist FRU +Component FRU Size : 256 +Product Manufacturer: DELTA +Product Name : AC-061 B +Product Part Number : D76441-003 +Product Version : 00 +Product Serial Num : DLD0719000969 +Product Asset Tag : +Product FRU File ID : +SDR[004e] FRU 20 03 0a 01 Pwr Supply 1 FRU +Component FRU Size : 256 +Product Manufacturer: DELTA +Product Name : DPS-450KBA +Product Part Number : D40117-007 +Product Version : S6 +Product Serial Num : DLD0721003047 +Product Asset Tag : +Product FRU File ID : +SDR[004f] FRU 20 04 0a 02 Pwr Supply 2 FRU +Component FRU Size : 256 +Product Manufacturer: DELTA +Product Name : DPS-450KBA +Product Part Number : D40117-003 +Product Version : S2 +Product Serial Num : DLC0630000244 +Product Asset Tag : +Product FRU File ID : +SDR[0050] IPMB 20 00 07 01 Basbrd Mgmt Ctlr + +Mainboard FRU Size : 256 +Chassis Type : Rack-Mount Chassis +Chassis Part Number : TIGW1U +Chassis Serial Num : +Chassis OEM Field : TIGW1U +Board Mfg DateTime : Sun Jun 17 16:11:00 2007 +Board Manufacturer : Intel +Board Product Name : S5000PHB +Board Serial Number : CFTW72400602 +Board Part Number : D40552-601 +Board FRU File ID : FRU Ver 0.05 +Board OEM Field : +Product Manufacturer: Intel +Product Name : S5000PHB +Product Part Number : TMWA0201W +Product Version : +Product Serial Num : sernum4wd +Product Asset Tag : asset4wd +Product FRU File ID : +Product OEM Field : +System GUID : b1d84f76-1de2-11dc-b3e8-000e0cc71ba0 +BIOS Version : S5000.86B.10.00.D414.081520081354 +fruconfig, completed successfully + +# ipmiutil getevt +ipmiutil ver 2.21 +getevent ver 2.21 +-- BMC version 0.19, IPMI version 2.0 +event receiver sa = 20 lun = 00 +bmc enables = 0f +Waiting 120 seconds for an event ... +got event, sensor_type = 01 +event data: 3c 22 02 7b e6 bf 48 20 00 04 01 30 01 50 2e 33 +223c 09/04/08 09:45:31 BMC 01 Temperature #30 Lo Noncrit thresh act=2e thr=33 +Waiting 120 seconds for an event ... +got event, sensor_type = 01 +event data: 64 22 02 7d e6 bf 48 20 00 04 01 30 81 50 2e 07 +2264 09/04/08 09:45:33 BMC 01 Temperature #30 LoN thresh OK now act=2e thr=07 +Waiting 120 seconds for an event ... +get_event timeout +getevent, completed successfully + +# ipmiutil health +ipmiutil ver 2.21 +bmchealth ver 2.21 +BMC version 0.19, IPMI version 2.0 +BMC manufacturer = 000157 (Intel), product = 0811 (TIGW1U) +BIOS Version = S5000.86B.10.00.D414.081520081354 +Chassis Status = 01 (on, restore_policy=stay_off) +Power State = 00 (S0: working) +Selftest status = 0055 (OK) +Channel 15 Auth Types: + Status = 00, OEM ID 000000 OEM Aux 00 +bmchealth, completed successfully + +# ipmiutil lan +ipmiutil ver 2.21 +pefconfig ver 2.21 +-- BMC version 0.19, IPMI version 2.0 +pefconfig, GetPefEntry ... +PEFilter(01): 01 Temperature Sensor event - enabled for alert +PEFilter(02): 02 Voltage Sensor event - enabled for alert +PEFilter(03): 04 Fan Failure event - enabled for alert +PEFilter(04): 05 Chassis Intrusion event - enabled for alert +PEFilter(05): 08 Power Supply Fault event - enabled for alert +PEFilter(06): 0c Memory ECC Error event - enabled for alert +PEFilter(07): 0f FRB Failure event - enabled for alert +PEFilter(08): 07 BIOS POST Error event - enabled for alert +PEFilter(09): 13 Fatal NMI event - enabled for alert +PEFilter(10): 23 Watchdog Timer Reset event - enabled for alert +PEFilter(11): 12 System Restart event - enabled for alert +PEFilter(12): 20 OS Critical Stop event - enabled for alert +PEFilter(13): 09 Power Redundancy Lost event - enabled for alert +PEFilter(14): 09 Power Unit OK event - enabled for alert +PEFilter(15): 01 Temperature OK event - enabled for alert +PEF Control: 01 : PEFenable +PEF Actions: 2f : Alert PwrDn Reset PwrCyc DiagInt +PEF Startup Delay: 3c : 60 sec +PEF Alert Startup Delay: 3c: 60 sec +PEF Alert Policy[1]: 01 18 11 00 : Chan[1] Dest[1] Enabled +PEF Alert Policy[2]: 02 00 00 00 : Disabled +PEF Alert Policy[3]: 03 00 00 00 : Disabled +PEF Alert Policy[4]: 04 00 00 00 : Disabled + +pefconfig, GetLanEntry for channel 1 ... +Lan Param(0) Set in progress: 00 +Lan Param(1) Auth type support: 15 : None MD5 Pswd +Lan Param(2) Auth type enables: 14 14 14 14 00 +Lan Param(3) IP address: 10 243 42 235 +Lan Param(4) IP addr src: 01 : Static +Lan Param(5) MAC addr: 00 0e 0c c7 1b a2 +Lan Param(6) Subnet mask: 255 255 255 0 +Lan Param(7) IPv4 header: 40 40 10 +Lan Param(10) BMC grat ARP: 01 : Grat-ARP enabled +Lan Param(11) grat ARP interval: 04 : 2 sec +Lan Param(12) Def gateway IP: 10 243 42 251 +Lan Param(13) Def gateway MAC: 00 d0 06 21 eb fc +Lan Param(14) Sec gateway IP: 0 0 0 0 +Lan Param(15) Sec gateway MAC: 00 00 00 00 00 00 +Lan Param(16) Community string: public +Lan Param(17) Num dest: 04 +Lan Param(18) Dest type: 01 00 01 00 00 +Lan Param(18) Dest type: 02 00 00 00 00 +Lan Param(18) Dest type: 03 00 00 00 00 +Lan Param(18) Dest type: 04 00 00 00 00 +Lan Param(19) Dest address: 01 00 00 [10 243 42 216] 00 07 e9 06 15 30 +Lan Param(19) Dest address: 02 00 00 [0 0 0 0] 00 00 00 00 00 00 +Lan Param(19) Dest address: 03 00 00 [0 0 0 0] 00 00 00 00 00 00 +Lan Param(19) Dest address: 04 00 00 [0 0 0 0] 00 00 00 00 00 00 +Lan Param(192) DHCP Server IP: 0 0 0 0 +Lan Param(193) DHCP MAC Address: 00 00 00 00 00 00 +Lan Param(194) DHCP Enable: 00 +Channel Access Mode(1=lan): 02 04 : Access = Always Avail, PEF Alerts Enabled +pefconfig, GetSOL for channel 1 ... +SOL Enable: 01 : enabled +SOL Auth: 82 : User +SOL Accum Interval: 04 32 : 20 msec +SOL Retry Interval: 06 14 : 200 msec +SOL nvol Baud Rate: 0a : 115.2k +SOL vol Baud Rate: 00 : nobaud +SOL Payload Support(1): 03 00 15 00 00 00 00 00 +SOL Payload Access(1,1): 02 00 00 00 : enabled +SOL Payload Access(1,2): 02 00 00 00 : enabled +SOL Payload Access(1,3): 00 00 00 00 : disabled +SOL Payload Access(1,4): 00 00 00 00 : disabled +Get User Access(1): 0f 02 01 14 : IPMI, Admin () +Get User Access(2): 0f 02 01 14 : IPMI, Admin (usr2) +Get User Access(3): 0f 02 01 0f : No access () +Get User Access(4): 0f 02 01 0f : No access () +pefconfig, completed successfully + +# ipmiutil reset -n +ipmiutil ver 2.21 +hwreset ver 2.21 +-- BMC version 0.19, IPMI version 2.0 +Power State = 00 (S0: working) +hwreset: sending NMI ... +chassis_reset ok +hwreset: IPMI_Reset ok +hwreset, completed successfully + +# ipmiutil sel +ipmiutil ver 2.21 +showsel: version 2.21 +-- BMC version 0.19, IPMI version 2.0 +SEL Ver 51 Support f, Size = 3987 records, Free space = 3553 records +RecId Date/Time_______ Source_ Evt_Type SensNum Evt_detail - Trig [Evt_data] +0004 07/16/08 15:17:58 BMC 10 SEL Disabled #09 Log Cleared 6f [42 0f ff] +0018 07/16/08 15:23:08 BIOS 12 System Event #83 Boot: ClockSync_1 6f [05 00 ff] +002c 07/16/08 10:23:08 BIOS 12 System Event #83 Boot: ClockSync_2 6f [05 80 ff] +0040 07/16/08 10:24:37 0033 12 System Event #01 OEM System Booted 6f [01 ff 00] +0054 07/16/08 10:24:49 BMC 22 ACPI Power State #82 S0/G0 Working 6f [40 0f ff] +0068 07/16/08 11:12:55 BMC 08 Power Supply #70 Removed ef [40 0f ff] +007c 07/16/08 11:12:55 BMC 09 Power Unit #02 Redundancy Lost 0b [41 0f ff] +0090 07/16/08 11:12:55 BMC 09 Power Unit #02 Not Redundant 0b [43 0f ff] +00a4 07/16/08 11:13:23 BMC 08 Power Supply #70 Inserted 6f [40 0f ff] +00b8 07/16/08 11:13:23 BMC 09 Power Unit #02 Redundancy OK 0b [40 0f ff] +00cc 07/16/08 11:31:30 BMC 08 Power Supply #70 Removed ef [40 0f ff] +00e0 07/16/08 11:31:31 BMC 09 Power Unit #02 Redundancy Lost 0b [41 0f ff] +00f4 07/16/08 11:31:31 BMC 09 Power Unit #02 Not Redundant 0b [43 0f ff] +0108 07/16/08 11:31:40 BMC 08 Power Supply #70 Inserted 6f [40 0f ff] +011c 07/16/08 11:31:41 BMC 09 Power Unit #02 Redundancy OK 0b [40 0f ff] +0130 07/16/08 11:46:34 BMC 01 Temperature #30 Lo Noncrit thresh act=2f thr=34 +0144 07/16/08 11:46:34 BMC 01 Temperature #30 Lo Crit thresh act=2f thr=33 +0158 07/16/08 11:46:36 BMC 01 Temperature #30 LoN thresh OK now act=2f thr=07 +016c 07/16/08 11:46:36 BMC 01 Temperature #30 LoC thresh OK now act=2f thr=06 +0180 07/16/08 12:00:59 BMC 08 Power Supply #70 Removed ef [40 0f ff] +0194 07/16/08 12:01:00 BMC 09 Power Unit #02 Redundancy Lost 0b [41 0f ff] +01a8 07/16/08 12:01:00 BMC 09 Power Unit #02 Not Redundant 0b [43 0f ff] +01bc 07/16/08 12:01:32 BMC 08 Power Supply #70 Inserted 6f [40 0f ff] +[...] +1a08 08/12/08 01:57:20 SMI 20 OS Critical Stop #64 panic(dop) 6f [a1 6f 70] +1a1c 08/12/08 01:58:08 BMC 2a Session Audit #0a Deactivated User 1 6f [a1 01 11] +1a30 08/12/08 01:58:18 BMC 2a Session Audit #0a Activated User 1 6f [a0 01 01] +[...] +219c 08/27/08 06:29:24 BIOS 12 System Event #83 Boot: ClockSync_1 6f [05 00 ff] +21b0 08/27/08 06:29:25 BIOS 12 System Event #83 Boot: ClockSync_2 6f [05 80 ff] +21c4 08/27/08 06:30:18 0033 12 System Event #01 OEM System Booted 6f [01 ff 00] +21d8 08/27/08 06:30:29 BMC 22 ACPI Power State #82 S0/G0 Working 6f [40 0f ff] +showsel, completed successfully + +# ipmiutil sensor +ipmiutil ver 2.21 +sensor: version 2.21 +-- BMC version 0.20, IPMI version 2.0 +_ID_ SDR_Type_xx ET Own Typ S_Num Sens_Description Hex & Interp Reading +0001 SDR Full 01 01 20 a 02 snum 10 BB +1.2V Vtt = be OK 1.20 Volts +0002 SDR Full 01 01 20 a 02 snum 12 BB +1.5V AUX = bd OK 1.47 Volts +0003 SDR Full 01 01 20 a 02 snum 13 BB +1.5V = 75 OK 1.52 Volts +0004 SDR Full 01 01 20 a 02 snum 14 BB +1.8V = af OK 1.78 Volts +0005 SDR Full 01 01 20 a 02 snum 15 BB +3.3V = c1 OK 3.32 Volts +0006 SDR Full 01 01 20 a 02 snum 16 BB +3.3V STB = bf OK 3.29 Volts +0007 SDR Full 01 01 20 a 02 snum 17 BB +1.5V ESB = be OK 1.48 Volts +0008 SDR Full 01 01 20 a 02 snum 18 BB +5V = c3 OK 5.07 Volts +0009 SDR Full 01 01 20 a 02 snum 1a BB +12V AUX = c1 OK 11.97 Volts +000a SDR Full 01 01 20 a 02 snum 1b BB +0.9V = ba OK 0.89 Volts +000b SDR Full 01 01 20 a 01 snum 30 Baseboard Temp = 2d OK 45.00 degrees C +000c SDR Full 01 01 20 a 01 snum 32 Front Panel Temp = 1a OK 26.00 degrees C +000d SDR Full 01 01 20 a 01 snum 48 Mem Therm Margin = 00 Init 0.00 degrees C +000e SDR Full 01 01 20 m 04 snum 50 Fan 1A = 6f OK 7659.00 RPM +000f SDR Full 01 01 20 m 04 snum 51 Fan 1B = 6b OK 5457.00 RPM +0010 SDR Full 01 01 20 m 04 snum 52 Fan 2A = 69 OK 7245.00 RPM +0011 SDR Full 01 01 20 m 04 snum 53 Fan 2B = 6b OK 5457.00 RPM +0012 SDR Full 01 01 20 m 04 snum 54 Fan 3A = 6c OK 7452.00 RPM +0013 SDR Full 01 01 20 m 04 snum 55 Fan 3B = 6b OK 5457.00 RPM +0014 SDR Full 01 01 20 m 04 snum 56 Fan 4A = 6f OK 7659.00 RPM +0015 SDR Full 01 01 20 m 04 snum 57 Fan 4B = 69 OK 5355.00 RPM +0016 SDR Full 01 01 20 m 04 snum 58 Fan 5 = 63 OK 6534.00 RPM +0017 SDR Full 01 01 20 a 03 snum 78 PS1 AC Current = 05 OK 0.31 Amps +0018 SDR Full 01 01 20 a 03 snum 79 PS2 AC Current = 16 OK 1.39 Amps +0019 SDR Full 01 01 20 a 03 snum 7a PS1 +12V Current = 01 OK 0.50 Amps +001a SDR Full 01 01 20 a 03 snum 7b PS2 +12V Current = 12 OK 9.00 Amps +001b SDR Full 01 01 20 a 0b snum 7c PS1 +12V Power = 01 OK 4.00 Watts +001c SDR Full 01 01 20 a 0b snum 7d PS2 +12V Power = 1b OK 108.00 Watts +001d SDR Full 01 01 20 a 01 snum 99 P1 Therm Margin = c7 OK -57.00 degrees C +001e SDR Full 01 01 20 m 01 snum c0 P1 Therm Ctrl % = 00 OK 0.00 unspecified +001f SDR Full 01 01 20 a 02 snum d0 Proc 1 Vccp = b0 OK 1.09 Volts +0020 SDR Comp 02 6f 20 a 09 snum 01 Power Unit = 00 c0 00 00 Enabled +0021 SDR Comp 02 0b 20 a 09 snum 02 Power Redundancy = 00 c0 01 00 Redundant +0022 SDR Comp 02 6f 20 a 23 snum 03 BMC Watchdog = 00 c0 00 00 OK +0023 SDR Comp 02 6f 20 a 06 snum 04 Scrty Violation = 00 c0 00 00 OK +0024 SDR Comp 02 6f 20 a 13 snum 07 FP Interrupt = 00 c0 00 00 OK +0025 SDR Comp 02 6f 20 a 10 snum 09 Event Log Clear = 00 c0 00 00 OK +0026 SDR Comp 02 6f 20 a 2a snum 0a Session Audit = 00 c0 00 00 Activated +0027 SDR Comp 02 6f 20 a 12 snum 0b System Event = 00 c0 00 00 OK +0028 SDR Comp 02 6f 20 a 29 snum 1e BB Vbat = 00 c0 00 00 OK +0029 SDR Comp 02 6f 20 a 08 snum 70 PS1 Status = 00 c0 01 00 Present +002a SDR Comp 02 6f 20 a 08 snum 71 PS2 Status = 00 c0 01 00 Present +002b SDR Comp 02 6f 20 a 22 snum 82 ACPI State = 00 c0 01 00 Working +002c SDR Comp 02 6f 20 a 14 snum 84 Button = 00 c0 00 00 OK +002d SDR Comp 02 03 20 a f3 snum 85 SMI Timeout = 00 c0 01 00 Enabled +002e SDR Comp 02 03 20 a c0 snum 87 NMI State = 00 c0 01 00 Enabled +002f SDR Comp 02 03 20 a c0 snum 88 SMI State = 00 80 01 00 Enabled +0030 SDR Comp 02 6f 20 m 07 snum 90 Processor 1 Stat = 00 c0 80 00 ProcPresent +0031 SDR Comp 02 6f 20 a 13 snum a0 PCIe Link0 = 00 c0 00 00 OK +0032 SDR Comp 02 6f 20 a 13 snum a1 PCIe Link1 = 00 c0 00 00 OK +0033 SDR Comp 02 6f 20 a 13 snum a2 PCIe Link2 = 00 c0 00 00 OK +0034 SDR Comp 02 6f 20 a 13 snum a3 PCIe Link3 = 00 c0 00 00 OK +0035 SDR Comp 02 6f 20 a 13 snum a4 PCIe Link4 = 00 c0 00 00 OK +0036 SDR Comp 02 6f 20 a 13 snum a5 PCIe Link5 = 00 c0 00 00 OK +0037 SDR Comp 02 6f 20 a 13 snum a6 PCIe Link6 = 00 c0 00 00 OK +0038 SDR Comp 02 6f 20 a 13 snum a7 PCIe Link7 = 00 c0 00 00 OK +0039 SDR Comp 02 6f 20 a 13 snum a8 PCIe Link8 = 00 c0 00 00 OK +003a SDR Comp 02 6f 20 a 13 snum a9 PCIe Link9 = 00 c0 00 00 OK +003b SDR Comp 02 6f 20 a 13 snum aa PCIe Link10 = 00 c0 00 00 OK +003c SDR Comp 02 6f 20 a 13 snum ab PCIe Link11 = 00 c0 00 00 OK +003d SDR Comp 02 6f 20 a 13 snum ac PCIe Link12 = 00 c0 00 00 OK +003e SDR Comp 02 6f 20 a 13 snum ad PCIe Link13 = 00 c0 00 00 OK +003f SDR Comp 02 05 20 m 01 snum c8 CPU1 VRD Temp = 00 c0 00 00 OK* +0040 SDR Comp 02 05 20 a 02 snum d2 CPU1 Vcc OOR = 00 c0 00 00 OK +0041 SDR Comp 02 03 20 a 07 snum d8 CPU Popul Error = 00 c0 00 00 OK +0042 SDR Comp 02 6f 20 a 21 snum e0 DIMM 1A = 00 c0 04 00 Present +0043 SDR Comp 02 6f 20 a 21 snum e1 DIMM 2A = 00 e0 40 00 NotAvailable +0044 SDR Comp 02 6f 20 a 21 snum e2 DIMM 3A = 00 e0 40 00 NotAvailable +0045 SDR Comp 02 6f 20 a 21 snum e3 DIMM 1B = 00 c0 04 00 Present +0046 SDR Comp 02 6f 20 a 21 snum e4 DIMM 2B = 00 e0 40 00 NotAvailable +0047 SDR Comp 02 6f 20 a 21 snum e5 DIMM 3B = 00 e0 40 00 NotAvailable +0048 SDR Comp 02 6f 20 a 0c snum ec Mem A Error = 00 c0 00 00 OK +0049 SDR Comp 02 6f 20 a 0c snum ed Mem B Error = 00 c0 00 00 OK +004a SDR Comp 02 6f 20 a 25 snum f0 DIMM Spare Enb = 00 e0 40 00 NotAvailable +004b SDR Comp 02 0b 20 a 0c snum f1 DIMM Spare Redu = 00 e0 40 00 NotAvailable +004c SDR FRU 11 18 dev: 20 00 80 00 0c 01 Baseboard FRU +004d SDR FRU 11 19 dev: 20 02 80 00 15 01 Power Dist FRU +004e SDR FRU 11 1b dev: 20 03 80 00 0a 01 Pwr Supply 1 FRU +004f SDR FRU 11 1b dev: 20 04 80 00 0a 02 Pwr Supply 2 FRU +0050 SDR IPMB 12 1b dev: 20 00 bf 07 01 Basbrd Mgmt Ctlr +0051 SDR OEM c0 09 Intel: 02 02 00 01 70 71 +0052 SDR OEM c0 05 Intel: 06 01 +0053 SDR OEM c0 19 Intel: 0b 01 01 32 14 f0 0a a4 01 96 00 61 00 08 0a 64 00 05 00 00 00 00 +0054 SDR OEM c0 19 Intel: 0b 02 01 32 14 f0 0a a4 01 ff ff ff ff 10 14 ff ff 06 00 00 00 00 +0055 SDR OEM c0 19 Intel: 0b 01 02 32 14 f0 0a a4 01 96 00 61 00 08 0a 64 00 05 00 00 00 00 +0056 SDR OEM c0 19 Intel: 0b 02 02 32 14 f0 0a a4 01 ff ff ff ff 10 14 ff ff 06 00 00 00 00 +0057 SDR OEM c0 2c Intel: 0c 01 30 64 64 01 02 03 30 20 32 64 01 90 0d 00 2b 20 30 21 35 22 3a 23 3f 24 43 25 47 26 4c 27 51 28 56 29 5b 2a 60 2b 64 +0058 SDR OEM c0 2c Intel: 0c 02 30 64 64 01 02 03 30 20 32 64 01 90 0d 00 2b 20 30 21 35 22 3a 23 3f 24 43 25 47 26 4c 27 51 28 56 29 5b 2a 60 2b 64 +0059 SDR OEM c0 2c Intel: 0c 03 30 64 64 01 02 03 30 20 32 64 01 90 0d 00 2b 20 30 21 35 22 3a 23 3f 24 43 25 47 26 4c 27 51 28 56 29 5b 2a 60 2b 64 +005a SDR OEM c0 15 Intel: 0c 01 30 64 64 01 02 03 00 20 99 64 02 90 01 06 00 11 +005b SDR OEM c0 15 Intel: 0c 01 30 64 64 01 02 03 00 20 48 00 02 b8 01 02 00 00 +005c SDR OEM c0 15 Intel: 0c 02 30 64 64 01 02 03 00 20 99 64 02 90 01 06 00 11 +005d SDR OEM c0 15 Intel: 0c 03 30 64 64 01 02 03 00 20 30 64 02 90 01 02 3c 00 +005e SDR OEM c0 0e Intel: 08 00 00 45 88 45 88 45 88 45 88 +005f SDR OEM c0 16 Intel: 09 00 00 90 33 90 33 90 33 90 33 90 33 90 33 68 42 68 42 +0060 SDR OEM c0 08 Intel: BMC_TAM0 60 01 03 01 20 nrec=4 cfg=01 +0061 SDR OEM c0 31 Intel: BMC_TAM1 60 01 13 00 20 41 01 01 01 23 71 93 41 02 01 02 24 72 94 41 03 01 02 24 72 94 21 04 01 01 23 11 02 05 14 31 29 6f 01 13 23 21 09 0b 14 34 +0062 SDR OEM c0 31 Intel: BMC_TAM2 60 01 23 00 20 71 07 6f 03 13 23 33 43 55 83 11 08 6f 14 21 09 6f 54 64 20 7c 01 72 94 20 7d 01 72 94 11 21 6f 03 53 23 6f 05 15 25 35 85 +0063 SDR OEM c0 17 Intel: BMC_TAM3 60 01 33 00 c0 22 02 00 03 51 22 03 00 03 51 22 04 00 03 51 +0064 SDR OEM c0 0e Intel: SDR File 18 +0065 SDR OEM c0 11 Intel: SDR Package 18 + SDR IPMI sensor: Power On Hours = 6923 hours +sensor, completed successfully + +# ipmiutil serial +ipmiutil ver 2.21 +tmconfig ver 2.21 +-- BMC version 0.19, IPMI version 2.0 +Code 0 SEL Ver 81 Support 15 +tmconfig: GetSerEntry for channel 4 ... +Serial Param(0) Set in progress: 00 +Serial Param(1) Auth type support: 15 : None MD5 Pswd +Serial Param(2) Auth type enables: 14 14 14 14 00 +Serial Param(3) Connection Mode: 87 +Serial Param(4) Sess Inactiv Timeout: 00 : infinite +Serial Param(5) Channel Callback: 00 00 ff ff ff +Serial Param(6) Session Termination: 03 +Serial Param(7) IPMI Msg Comm: 20 0a : no_flow, DTR, 115.2k +Serial Param(8) Mux Switch: 16 08 +Serial Param(9) Modem Ring Time: 3f 00 +Serial Param(10) Modem Init String: 01 ATE1Q0V1X4&D2&C1 +Serial Param(11) Modem Escape Seq: +++ +Serial Param(12) Modem Hangup Seq: ATH +Serial Param(13) Modem Dial Command: ATD +Serial Param(14) Page Blackout Interval: 00 +Serial Param(15) Community String: public +Serial Param(16) Num of Alert Dest: 08 +Serial Param(17) Destination Info: 01 00 05 03 00 +Serial Param(17) Destination Info: 02 00 05 03 00 +Serial Param(17) Destination Info: 03 00 05 03 00 +Serial Param(17) Destination Info: 04 00 05 03 00 +Serial Param(17) Destination Info: 05 00 05 03 00 +Serial Param(17) Destination Info: 06 00 05 03 00 +Serial Param(17) Destination Info: 07 00 05 03 00 +Serial Param(17) Destination Info: 08 00 05 03 00 +Serial Param(18) Call Retry Interval: 3c +Serial Param(19) Destination Comm Settings: 01 00 07 : no_flow, 8N1, 19.2k +Serial Param(19) Destination Comm Settings: 02 00 07 : no_flow, 8N1, 19.2k +Serial Param(19) Destination Comm Settings: 03 00 07 : no_flow, 8N1, 19.2k +Serial Param(19) Destination Comm Settings: 04 00 07 : no_flow, 8N1, 19.2k +Serial Param(19) Destination Comm Settings: 05 00 07 : no_flow, 8N1, 19.2k +Serial Param(19) Destination Comm Settings: 06 00 07 : no_flow, 8N1, 19.2k +Serial Param(19) Destination Comm Settings: 07 00 07 : no_flow, 8N1, 19.2k +Serial Param(19) Destination Comm Settings: 08 00 07 : no_flow, 8N1, 19.2k +Serial Param(20) Number Dial Strings: 06 +Serial Param(21) Dest Dial String: 01 01 +Serial Param(21) Dest Dial String: 02 01 +Serial Param(21) Dest Dial String: 03 01 +Serial Param(21) Dest Dial String: 04 01 +Serial Param(21) Dest Dial String: 05 01 +Serial Param(21) Dest Dial String: 06 01 +Serial Param(22) Number Dest IP Addrs: 04 +Serial Param(23) Dest IP Address: 01 0 0 0 0 +Serial Param(23) Dest IP Address: 02 0 0 0 0 +Serial Param(23) Dest IP Address: 03 0 0 0 0 +Serial Param(23) Dest IP Address: 04 0 0 0 0 +Serial Param(29) Terminal Mode Config: 66 11 +Channel Access Mode(4=Ser): 2b 04 : Access = Shared, PEF Alerts Disabled +Get User Access (1): 0f 02 01 14 : IPMI, Admin () +Get User Access (2): 0f 02 01 14 : IPMI, Admin (usr2) +Get User Access (3): 0f 02 01 0f : No access () +Get User Access (4): 0f 02 01 0f : No access () +Get Serial MUX Status: 04 +Get Boot Options(3): 01 03 00 +tmconfig, completed successfully + +# ipmiutil sol -a -N 10.243.42.136 +ipmiutil ver 2.21 +isolconsole ver 2.21 +Opening connection to node 10.243.42.136 ... +Connected to node 10.243.42.136 10.243.42.136 +-- BMC version 0.17, IPMI version 2.0 +Opening connection to node 10.243.42.136 ... +[SOL session is running, use '~' to end session.] + +isolconsole exit via user input +isolconsole, completed successfully + +# ipmiutil wdt +ipmiutil ver 2.21 +wdt ver 2.21 +-- BMC version 0.19, IPMI version 2.0 +wdt data: 01 01 00 00 00 00 00 00 +Watchdog timer is stopped for use with BIOS FRB2. Logging + pretimeout is 0 seconds, pre-action is None + timeout is 0 seconds, counter is 0 seconds + action is Hard Reset + +wdt, completed successfully + +# ipmi_port +ipmi_port ver 1.1 +open_rmcp_port(623) succeeded, sleeping + + +-------------------------- +7.0 PROBLEMS +-------------------------- +Note that each utility function has an option for extra debug output (-x), +which can be used to find out the specific function which returned an +error. + +For best-effort support, email the ipmiutil-developer mailing list: + http://lists.sourceforge.net/lists/listinfo/ipmiutil-developers +or enter a bug report at: + http://sourceforge.net/tracker/?group_id=116222&func=browse + +7.1 ERROR RETURN CODES + +Return code = 0 means success, negative numbers indicate failure, and a +positive return code represents an IPMI completion code. +RetCode Description +------ ----------------------------------------- + 0 "completed successfully" + -1 "error -1", a generic error, usually returned by an OS routine + -2 "send to BMC failed" over IPMI LAN + -3 "receive from BMC failed" over IPMI LAN + -4 "cannot connect to BMC" over IPMI LAN + -5 "abort signal caught", the user pressed Ctl-C + -6 "timeout occurred", the timeout for a response expired + -7 "length greater than max", length supplied was too big + -8 "invalid lan parameter", invalid parameter for IPMI LAN function + -9 "request not supported", a requested function is not supported + -10 "receive too short", did not receive the minimum number of bytes + -11 "error resolving hostname" neither DNS or hosts could resolve to an IP + -12 "error during ping" could not perform the RMCP ping function + -13 "BMC only supports lan v1". LAN 2.0 (lanplus) was attempted, but this + BMC firmware only supports IPMI LAN 1.x + -14 "BMC only supports lan v2". LAN 1.x was attempted, but this BMC + supports LAN 2.0 but not LAN 1.x, which violates the IPMI 2.0 spec. + -15 "other error", an unknown error occurred + -16 "cannot open IPMI driver". No IPMI driver could be opened. Since + the driverless mode is also attempted, this usually means that the + user does not have root privilege. + -17 "invalid parameter" a parameter was out of bounds + -18 "access not allowed" user does not have access to this file or function + -19 "session dropped by BMC" the BMC firmware aborted the IPMI session + -20 "cannot open file" cannot open the specified file + -21 "item not found" requested item was not found + -22 "usage or help requested", the user requested usage/help + -23 "bad format", the data format is invalid, cannot proceed +-504 "error getting msg from BMC" during driverless I/Os, a command did + not get a response. + +7.2 IPMI COMPLETION CODES + +IPMI Completion Codes are defined in IPMI 1.5, Table 5-2, and are also +included below in both hex and decimal format. Note that the meaning of +completion codes 0x80-0x9f may vary depending on the command. + +Code Dec Description +---- --- ----------------------------------------- +0x00, 0, "Command completed successfully", +0x80, 128, "Invalid Session Handle or Empty Buffer", +0x81, 129, "Lost Arbitration", +0x82, 130, "Bus Error", +0x83, 131, "NAK on Write - busy", +0x84, 132, "Truncated Read", +0xC0, 192, "Node Busy", +0xC1, 193, "Invalid Command", +0xC2, 194, "Command invalid for given LUN", +0xC3, 195, "Timeout while processing command", +0xC4, 196, "Out of space", +0xC5, 197, "Invalid Reservation ID, or cancelled", +0xC6, 198, "Request data truncated", +0xC7, 199, "Request data length invalid", +0xC8, 200, "Request data field length limit exceeded", +0xC9, 201, "Parameter out of range", +0xCA, 202, "Cannot return requested number of data bytes", +0xCB, 203, "Requested sensor, data, or record not present", +0xCC, 204, "Invalid data field in request", +0xCD, 205, "Command illegal for this sensor/record type", +0xCE, 206, "Command response could not be provided", +0xCF, 207, "Cannot execute duplicated request", +0xD0, 208, "SDR Repository in update mode, no response", +0xD1, 209, "Device in firmware update mode, no response", +0xD2, 210, "BMC initialization in progress, no response", +0xD3, 211, "Destination unavailable", +0xD4, 212, "Cannot execute command. Insufficient privilege level", +0xD5, 213, "Cannot execute command. Request parameters not supported", +0xFF, 255, "Unspecified error" + + +------------------------------- +8.0 BUILDING IPMI UTILITIES +------------------------------- + +The ipmiutil source package provides IPMI-based utilities and kernel +patches for managing various servers in Linux or Windows. + +The same source files can be built in both Linux and Windows as shown +below. + +To get the ipmiutil source: + +Download the latest released ipmiutil-*.tar.gz from +http://sourceforge.net/projects/ipmiutil/files/ + +Or download a tar.gz of the current subversion trunk with the latest source +http://ipmiutil.svn.sourceforge.net/viewvc/ipmiutil/trunk/?view=tar + +Or, if you have subversion installed, you can check out the latest source +by doing: +# svn co https://ipmiutil.svn.sourceforge.net/svnroot/ipmiutil ipmiutil + +See also section 4.9 for information about building custom applications +using ipmiutil library APIs. The ipmi_sample.c shows a sample application +using the ipmiutil library. + + +8.1 Build instructions for Linux + +To build with some GPL code: +If you are building ipmiutil for open-source, then the MD2 hash +for IPMI LAN and the valinux driver interface (/dev/ipmikcs) can +be supported. If so, you should specify the following during +configure: + "./configure --enable-gpl" +The default is to build with only BSD-licensed code and not to +include the MD2 and valinux features. The md2.h and ipmi_ioctl.h +files with GPL code can be removed if this option is not enabled. + +To build a standalone binary without IPMI LAN 2.0 (lanplus plugin), +which may be desirable for use on bootable media (USB/CDROM), to +decrease the size or to avoid using libcrypto, you can specify the +following during configure: + "./configure --enable-standalone" +builds it without lanplus libs and without GPL code. +Only the SOL console function requires lanplus, all other functions can +use the lan interface, since the IPMI 2.0 firmware is required to support +both lan and lanplus. However, lanplus does have more secure encryption, +as provided by libcrypto. + +To add LanDesk IPMI support: +Support for the LanDesk IPMI driver requires a library supplied by +LanDesk (libipmiapi.a). After obtaining this library, place it in +lib/libipmiapi.a. Then you can link ipmiutil to support it by +specifying the following during configure: + "./configure --enable-landesk=yes" + +Steps to build for Linux: +# ./beforeconf.sh + Which automates these functions: + * copying libtool files + * aclocal (may be needed if automake versions are different) + * autoconf (may be needed if automake versions are different) + * automake +# ./configure + --enable-landesk adds landesk library support [default=no] + --disable-lanplus disable lanplus library support + --enable-standalone build standalone, with no GPL or LanPlus libs. + --enable-gpl build with some GPL code [default=no] +# make + +To add the ifruset utility, which allows setting any FRU Product fields: +# cd util; make ifruset +# ifruset -? + +To build and install an rpm package, use one of the following: +# make install +# make rpm +The make rpm produces a binary rpm, and a source rpm, which can be +installed with "rpm -i *.rpm". + +To build and install a Debian package, do this: +# dpkg-buildpackage +then install it with "dpkg -i *.deb". + + +8.2 Build instructions for Windows + +The ipmiutil Windows binaries for each release are pre-built and posted +at http://ipmiutil.sourceforge.net, but here is how to build the ipmiutil +EXEs for Windows from source. +Note that the WIN32 compile flag is used. +The ipmiutil buildwin.cmd shows how to compile and link the lib and exe +files, although many people prefer instead to do builds with the +Microsoft VisualStudio project GUI. +See also ipmiutil UserGuide section 5.2 for more details. + + 1) Install Visual Studio (e.g. VS 6.0 or VC98) + + 2) Download contrib files from + http://ipmiutil.sf.net/FILES/ipmiutil-contrib.zip + and see section 5.2 for getopt.c and openssl. + + 3) Copy initial contrib files into ipmiutil + See section 5.2.3 for details + + 4) Build the openssl libraries according to its INSTALL.W32 + + 5) Copy the resulting openssl LIB and DLL binaries to ipmiutil + + 6) Set the Visual C variables + Example: "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" + + 7) Run buildwin.cmd + buildwin.cmd will build all of the Windows EXE and DLL files. + + +8.3 Build instructions for Solaris + +# iver=2.7.9 +# uname -a +SunOS unknown 5.10 Generic_127128-11 i86pc i386 i86pc +# gunzip ipmiutil-${iver}.tar.gz +# tar xvf ipmiutil-${iver}.tar +# cd ipmiutil-${iver} +# PATH=/usr/sbin:/usr/bin:/usr/ucb:/usr/openwin:/usr/ccs/bin:/usr/sfw/bin +# ./configure +# make +# make tarsol +This produces /tmp/ipmiutil-${iver}-solaris.tar with the binaries. +# gzip /tmp/ipmiutil-${iver}-solaris.tar + +Solaris Release Notes: +- Built with support for bmc, lan, and lanplus interfaces. + Supports the Solaris 10 /dev/bmc driver via putmsg method. +- Requests to slave addresses other than BMC are not supported by + the Solaris bmc driver (e.g. to HSC at 0xc0), and are sent to + the BMC sa instead. +- Memory mapping logic returns an error (e.g. BIOS version). +- idiscover -a broadcast ioctl works now in ipmiutil-2.3.1 + +To Install on Solaris: + gunzip /tmp/ipmiutil-${iver}-solaris.tar.gz + tar xvf /tmp/ipmiutil-${iver}-solaris.tar + ./install.sh + + +8.4 Build instructions for FreeBSD + +# iver=2.7.9 +# gunzip ipmiutil-${iver}.tar.gz +# tar xvf ipmiutil-${iver}.tar +# cd ipmiutil-${iver} +# ./configure +# make +# make tarbsd +This produces /tmp/ipmiutil-${iver}-bsd.tar with the binaries. +# gzip /tmp/ipmiutil-${iver}-bsd.tar + +FreeBSD Release Notes: + - ipmiutil-2.3.5 supports FreeBSD with direct driverless KCS + - ipmiutil-2.5.2 adds support for FreeBSD 7.x ipmi driver port + +To Install on FreeBSD: + gunzip /tmp/ipmiutil-${iver}-bsd.tar.gz + tar xvf /tmp/ipmiutil-${iver}-bsd.tar + ./install.sh + + +8.5 Build instructions for ARM (Android) + +# tar -xzvf ipmiutil-${iver}.tar.gz +# cd ipmiutil-${iver} +# ./configure --enable-standalone --host=arm +# make + + +----------------------------- +10.0 IPMIUTIL LIBRARY APIS +----------------------------- + +Below are some common routines available in the ipmiutil library. +Also refer to util/ipmi_sample.c for an example of how these APIs are used. + +/* + * ipmi_cmd + * ushort cmd (input): (netfn << 8) + command + * uchar *pdata (input): pointer to ipmi data + * int sdata (input): size of ipmi data + * uchar *presp (output): pointer to response data buffer + * int *sresp (input/output): on input, size of response buffer, + * on output, length of response data + * uchar *cc (output): completion code + * char fdebugcmd(input): flag =1 if debug output desired + * returns 0 if successful, <0 if error + */ +int ipmi_cmd(ushort cmd, uchar *pdata, int sdata, uchar *presp, + int *sresp, uchar *pcc, char fdebugcmd); +/* + * ipmi_cmdraw + * uchar cmd (input): IPMI Command + * uchar netfn (input): IPMI NetFunction + * uchar sa (input): IPMI Slave Address of the MC + * uchar bus (input): BUS of the MC + * uchar lun (input): IPMI LUN + * uchar *pdata (input): pointer to ipmi data + * int sdata (input): size of ipmi data + * uchar *presp (output): pointer to response data buffer + * int *sresp (input/output): on input, size of response buffer, + * on output, length of response data + * uchar *cc (output): completion code + * char fdebugcmd(input): flag =1 if debug output desired + * returns 0 if successful, <0 if error + */ +int ipmi_cmdraw(uchar cmd, uchar netfn, uchar sa, uchar bus, uchar lun, + uchar *pdata, int sdata, uchar *presp, + int *sresp, uchar *pcc, char fdebugcmd); +/* + * ipmi_close_ + * Called to close an IPMI session. + * returns 0 if successful, <0 if error + */ +int ipmi_close_(void); +int ipmi_close(void); /*ditto*/ +/*-----------------------------------------------------------------* + * These externals are conditionally compiled in ipmicmd.c + ipmi_cmdraw_ia() Intel IMB driver, /dev/imb + ipmi_cmdraw_mv() MontaVista OpenIPMI driver + ipmi_cmdraw_va() VALinux driver + ipmi_cmdraw_ld() LANDesk driver + ipmi_cmdraw_direct() Direct/Driverless KCS or SSIF + ipmi_cmdraw_lan() IPMI LAN + ipmi_cmdraw_lan2() IPMI LANplus (RMCP+ in IPMI 2.0) + *-----------------------------------------------------------------*/ + +/* + * parse_lan_options + * Parse the IPMI LAN options from the command-line getopt. + * int c (input): command-line option from getopt, one of: + case 'F': force driver type + case 'T': auth type + case 'V': priv level + case 'J': cipher suite + case 'N': nodename + case 'U': username + case 'R': remote password + case 'P': remote password + case 'E': get password from IPMI_PASSWORD environment var + case 'Y': prompt for remote password + case 'Z': set local MC address + * char *optarg (input): command-line argument from getopt + * char fdebug (input): show debug messages if =1, default=0 + */ +void parse_lan_options(int c, char *optarg, char fdebug); +/* + * set_lan_options + * Use this routine to set the lan options 'gnode','guser','gpswd', etc. + * This would only be required before opening a new session. + * char *node (input): IP address or nodename of remote node's IPMI LAN + * char *user (input): IPMI LAN username + * char *pswd (input): IPMI LAN password + * int auth (input): IPMI LAN authentication type (1 - 5) + * IPMI_SESSION_AUTHTYPE_NONE 0x00 + * IPMI_SESSION_AUTHTYPE_MD2 0x01 + * IPMI_SESSION_AUTHTYPE_MD5 0x02 + * IPMI_SESSION_AUTHTYPE_PASSWORD 0x04 + * IPMI_SESSION_AUTHTYPE_OEM 0x05 + * int priv (input): IPMI LAN privilege level (1 - 5) + * IPMI_PRIV_LEVEL_CALLBACK 0x01 + * IPMI_PRIV_LEVEL_USER 0x02 + * IPMI_PRIV_LEVEL_OPERATOR 0x03 + * IPMI_PRIV_LEVEL_ADMIN 0x04 + * IPMI_PRIV_LEVEL_OEM 0x05 + * int cipher (input): IPMI LAN cipher suite (0 thru 17, default is 3) + * See table 22-19 in the IPMIv2 spec. + * void *addr (input): Socket Address to use (SOCKADDR_T *) if not NULL + * This is only used in itsol.c because it has an + * existing socket open. Default is NULL for this. + * int addr_len (input): length of Address buffer (128 if ipv6, 16 if ipv4) + * returns 0 if successful, <0 if error + */ +int set_lan_options(char *node, char *user, char *pswd, int auth, int priv, + int cipher, void *addr, int addr_len); +int get_lan_options(char *node, char *user, char *pswd, int *auth, int *priv, + int *cipher, void *addr, int *addr_len); +void print_lan_opt_usage(void); +int ipmi_getdeviceid(uchar *presp, int sresp, char fdebugcmd); +/* int ipmi_open(void); * embedded in ipmi_cmd() */ +int ipmi_getpicmg(uchar *presp, int sresp, char fdebug); +char *show_driver_type(int idx); +int set_driver_type(char *tag); +int get_driver_type(void); +int nodeislocal(char *nodename); + +/* These *_mc routines are used to manage changing the mc. + * The local mc (mymc) may be changed via -Z, and + * the remote mc (mc) may be changed with -m. */ +void ipmi_set_mc(uchar bus, uchar sa, uchar lun, uchar type); +void ipmi_get_mc(uchar *bus, uchar *sa, uchar *lun, uchar *type); +void ipmi_restore_mc(void); +void ipmi_set_mymc(uchar bus, uchar sa, uchar lun, uchar type); +void ipmi_get_mymc(uchar *bus, uchar *sa, uchar *lun, uchar *type); +/* ipmi_cmdraw_mc and ipmi_cmd_mc are used in cases where the mc may + * have been changed via ipmi_set_mc. */ +int ipmi_cmdraw_mc(uchar cmd, uchar netfn, + uchar *pdata, int sdata, uchar *presp, + int *sresp, uchar *pcc, char fdebugcmd); +int ipmi_cmd_mc(ushort icmd, uchar *pdata, int sdata, uchar *presp, + int *sresp, uchar *pcc, char fdebugcmd); + +/* ipmi_sendrecv is a wrapper for ipmi_cmdraw which maps to ipmitool syntax */ +int ipmi_sendrecv(struct ipmi_rq * req, uchar *rsp, int *rsp_len); + +/* other common subroutines */ +char * decode_rv(int rv); /*ipmicmd.c*/ +char * decode_cc(ushort icmd, int cc); +void dump_buf(char *tag,uchar *pbuf,int sz, char fshowascii); +int get_lan_channel(uchar chstart, uchar *chan); +void show_fru_picmg(uchar *pdata, int dlen); /* ifru_picmg.c*/ + +/* show_outcome outputs the meaning of the return code. */ +void show_outcome(char *prog, int ret); + +/* these log routines are primarily for the isol debug log */ +FILE *open_log(char *mname); +void close_log(void); +void flush_log(void); +void print_log( char *pattn, ... ); +void dump_log(FILE *fp,char *tag,uchar *pbuf,int sz, char fshowascii); +void logmsg( char *pname, char *pattn, ... ); + +#ifdef WIN32 +/* Implement the Linux strncasecmp for Windows. */ +int strncasecmp(const char *s1, const char *s2, int n); +#endif +const char *val2str(ushort val, const struct valstr *vs); /*ipmilanplus.c*/ +const char * oemval2str(ushort oem, uchar val, const struct oemvalstr *vs); +void set_debug(void); /*used only by oem_sun.c*/ +void set_iana(int iana); /*ipmicmd.c*/ +void set_mfgid(uchar *devid, int len); +void get_mfgid(int *pvend, int *pprod); +void get_devid_ver(uchar *bmaj, uchar *bmin, uchar *iver); + +char *get_nodename(void); +char is_remote(void); +void show_devid(uchar b1, uchar b2, uchar i1, uchar i2); +int set_max_kcs_loops(int ms); /* ipmicmd.c, calls ipmidir.c if ok */ + +/* These common subroutines are in subs.c */ +int str_icmp(char *s1, char *s2); /*used internally in ipmicmd.c*/ +char * strdup_(const char *instr); /*wrapper for strdup, supports WIN32*/ +int strlen_(const char *s); /*wrapper for strlen, avoids compile warnings*/ +uchar htoi(char *inhex); +void os_usleep(int s, int u); +char *get_iana_str(int mfg); /*subs.c*/ +int get_errno(void); /*subs.c*/ +const char * buf2str(uchar * buf, int len); /*subs.c*/ +int str2uchar(char *str_in, uchar *uchr_out); +uchar atob(char *str_in); /* calls str2uchar*/ +void atoip(uchar *array,char *instr); +int get_system_info(uchar parm, char *pbuf, int *szbuf); /*subs.c*/ +int set_system_info(uchar parm, uchar *pbuf, int szbuf); /*subs.c*/ +int ipmi_reserved_user(int vend, int userid); /*subs.c*/ + +/* from mem_if.c */ +int get_BiosVersion(char *str); + +/* See util/isensor.h for SDR cache routines. */ +/* See util/ievents.h for sensor_type_desc, sel_opts, decode_sel routines. */ + + +-------------------------- +10.0 RELATED INFORMATION +-------------------------- + +10.1 History + +History of ipmiutil: +This project started in October 2001 as part of the Carrier Grade Linux effort. +It was then known as 'panicsel' and included a kernel patch to write a Linux +panic event to the IPMI firmware log, as well as utilities. +This code was first included in MontaVista CGE Linux 2.1 in July 2002. +The panicsel functionality was included in OSDL CGL 1.0 and 2.0 requirements. +The kernel panic functionality was included in the OpenIPMI driver for 2.6 +Linux kernels. Compile flags for Windows 2000 & 2003 support were added in +Jan 2004. +In August 2004, the project was moved from panicsel.sf.net to ipmiutil.sf.net. +The new name more clearly reflects the purpose of the project in its current +state. In November 2004, support for the FreeIPMI library was added. +A Linux rpm and a Windows setup package for ipmiutil is included on the +Resource CD with Intel carrier-grade servers. +The ipmiutil (or panicsel) rpm is known to be included in the following +distributions: MontaVista CGE 2.1/3.0/3.1/4.0, SuSE SLES9, Red Flag 5.0 + + +10.2 Links + +Links with information related to the IPMI Management Utilities project. + +ipmiutil project, sourceforge http://ipmiutil.sourceforge.net (current) +panicsel project, sourceforge http://panicsel.sourceforge.net (old) +IPMI Specification http://www.intel.com/design/servers/ipmi/index.htm +OSDL Carrier Grade Linux http://www.osdl.org/lab_activities/carrier_grade_linux/ +Intel imb driver source http://downloadfinder.intel.com/scripts-df-external/Product_Search.asp?Prod_nm=ipmi*driver*source +Intel imb driver for Windows http://downloadfinder.intel.com/scripts-df-external/Product_Search.aspx?Prod_nm=imb+driver +OpenIPMI project http://sourceforge.net/projects/openipmi/ + by Corey Minyard of MontaVista (home= http://openipmi.sourceforge.net) +ipmitools project by San Mehat http://sourceforge.net/projects/ipmitools/ + valinux IPMI driver http://cvs.sf.net/cgi-bin/viewcvs.cgi/ipmitools/ipmitools/kernel/kcs/patches/2.4.x/ +GNU FreeIPMI library project http://www.gnu.org/software/freeipmi/ +LANDesk IPMI driver/daemon http://www.landesk.com/Support/ (or see + Intel System Resource CD for Intel servers) +lm-sensors project http://secure.netroedge.com/~lm78/ +dmidecode project http://www.nongnu.org/dmidecode/ +IPMI vendor/mfg IDs http://www.iana.org/assignments/enterprise-numbers + diff --git a/doc/bmclanaol.mib b/doc/bmclanaol.mib new file mode 100644 index 0000000..bdac611 --- /dev/null +++ b/doc/bmclanaol.mib @@ -0,0 +1,210 @@ +--************************************************************************\ +--* * +--* Copyright (c) 1998-2004 Intel Corporation. All Rights Reserved. * +--* * +--* Redistribution and use in source and binary forms, with or without * +--* modification, are permitted provided that the following conditions * +--* are met: * +--* * +--* a.. Redistributions of source code must retain the above copyright * +--* notice, this list of conditions and the following disclaimer. * +--* b.. Redistributions in binary form must reproduce the above * +--* copyright notice, this list of conditions and the following * +--* disclaimer in the documentation and/or other materials provided * +--* with the distribution. * +--* c.. Neither the name of Intel Corporation nor the names of its * +--* contributors may be used to endorse or promote products derived * +--* from this software without specific prior written permission. * +--* * +--* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * +--* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * +--* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * +--* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * +--* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * +--* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * +--* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * +--* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * +--* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * +--* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * +--* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +--* DAMAGE. * +--* * +--\***********************************************************************/ + +--/************************************************************************** +--* +--* NAME: +--* aolnprxy.mib +--* +--* DESCRIPTION: +--* Alert on LAN MIB +--* +--* +--* $WorkFile: $ +--* $Revision: 6 $ +--* $ModTime: $ +--* $Author: Psaranga $ +--* +--*************************************************************************** + +PET-MIB + +DEFINITIONS ::= BEGIN + +-- Title : Alert on LAN pET MIB version 1.0. + +IMPORTS + MODULE-IDENTITY, + OBJECT-TYPE, + Integer32, IpAddress + FROM SNMPv2-SMI + enterprises + FROM RFC1155-SMI + DisplayString + FROM RFC1213-MIB + TRAP-TYPE + FROM RFC-1215 + ; + + +wired_for_management OBJECT IDENTIFIER ::= { enterprises 3183 } +pET OBJECT IDENTIFIER ::= { wired_for_management 1 } +pET_version_1 OBJECT IDENTIFIER ::= { pET 1 } + + +-- MODULE IDENTIFICATION +-- +-- Alert_on_LAN MODULE-IDENTITY +-- LAST-UPDATED "9807210000Z" +-- ORGANIZATION "Intel Corporation" +-- CONTACT-INFO +-- " Alert On LAN* Software +-- Intel Corporation, JF3-4 +-- Hillsboro, OR. " +-- DESCRIPTION +-- " This is the pET MIB. Version 1.0 " +-- We should be able to plug this branch into any tree from this point forward + + +-- **************************************** +-- SYSTEM INFORMATION BRANCH STARTS HERE. +-- **************************************** + + +pETTrap OBJECT-TYPE + SYNTAX OCTET STRING ( SIZE(110) ) + ACCESS read-only + STATUS current + DESCRIPTION + "Trap information" +::= { pET_version_1 1 } + +pET_PresenceHeartbeat TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Presence Heartbeat Expired" + ::= 2584320 + +pET_CoverTamper TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Cover Tamper" + ::= 356096 + +pET_Voltage_Fan_Temperature TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Voltage/Fan/Temperature Out of Specification" + ::= 552706 + +pET_LANLeash TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "LAN Leash Tamper" + ::= 356100 + +pET_Temperature TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Temperature Out of Specification" + ::= 93952 + +pET_ProcessorMissing TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Processor Missing" + ::= 356099 + +pET_ProcessorTemperature TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Processor Over Temperature" + ::= 487169 + +pET_Watchdog TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Watchdog Event" + ::= 1142534 + +pET_P_O_S_T TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "P.O.S.T." + ::= 1011456 + +pET_Voltage TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Voltage Out of Specification" + ::= 159488 + +pET_Fan TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Fan Out of Specification" + ::= 290560 + +pET_Fan_Temperature TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Fan/Temperature Out of Specification" + ::= 683778 + +pET_Undock TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Surprised Undock event" + ::= 356101 + +pET_EventClear TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Event clear" + ::= 1076994 + +pET_AlertOnLAN_2 TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Alert on LAN 2 Event has occurred" + ::= 2277391 + +pET_AlertOnLAN_Boot TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "System Boot Event occurred" + ::= 1208065 + +pET_AlertOnLAN_Fan TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Fan Event occurred" + ::= 262400 + +pET_AlertOnLAN_Fan2 TRAP-TYPE + ENTERPRISE pET_version_1 + DESCRIPTION + "Fan Event occurred" + ::= 262402 + +END diff --git a/doc/bmclanpet.mib b/doc/bmclanpet.mib new file mode 100644 index 0000000..5f7641e --- /dev/null +++ b/doc/bmclanpet.mib @@ -0,0 +1,1083 @@ +--/************************************************************************ +--* * +--* Copyright (c) 1998-2004 Intel Corporation. All Rights Reserved. * +--* * +--* Redistribution and use in source and binary forms, with or without * +--* modification, are permitted provided that the following conditions * +--* are met: * +--* * +--* a.. Redistributions of source code must retain the above copyright * +--* notice, this list of conditions and the following disclaimer. * +--* b.. Redistributions in binary form must reproduce the above * +--* copyright notice, this list of conditions and the following * +--* disclaimer in the documentation and/or other materials provided * +--* with the distribution. * +--* c.. Neither the name of Intel Corporation nor the names of its * +--* contributors may be used to endorse or promote products derived * +--* from this software without specific prior written permission. * +--* * +--* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * +--* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * +--* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * +--* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * +--* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * +--* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * +--* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * +--* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * +--* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * +--* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * +--* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +--* DAMAGE. * +--* * +--************************************************************************* +--* Name : PetEvents.mib +--* Description : MIB file for PET events +--* Created : Wesdnesday, December 17, 2003 +--* Author : Intel Corporation +--* +--* $History:$ +--* +--* Date : March 7th,2002 +--* Changed by : +--* Change Description : Updated MIB file +--* +--* Date : December 17th,2003 +--* Changed by : +--* Change Description : Started with ASF MIB file +--* +--*************************************************************************/ + + + +PET-EVENTS DEFINITIONS ::= BEGIN + + IMPORTS + enterprises + FROM RFC1155-SMI + OBJECT-TYPE + FROM RFC-1212 + + TRAP-TYPE + FROM RFC-1215 + + + DisplayString + FROM RFC1213-MIB; + + wiredformgmt OBJECT IDENTIFIER ::= { enterprises 3183 } + pet OBJECT IDENTIFIER ::= { wiredformgmt 1 } + +-- MODULE IDENTIFICATION +-- +-- PET Events Alerting MODULE-IDENTITY +-- LAST-UPDATED "February 4, 2004" +-- ORGANIZATION "Intel Corporation" +-- CONTACT-INFO +-- " PET Events, +-- Intel Corporation, DP3-407 +-- DuPont, WA 98352" +-- DESCRIPTION +-- "This is the MIB file for SNMPv1.0 based PET traps" + + +-- **************************************** +-- SYSTEM INFORMATION BRANCH STARTS HERE. +-- **************************************** + + petevts OBJECT IDENTIFIER ::= { pet 1 } + + +-- ********************************************** +-- * Temperature * +-- ********************************************** + +-- Lower Non Critical threshold crossed + trapUnderTemperatureWarning TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Under-Temperature Warning (Lower non-critical, going low)" + + --#TYPE "Temperature Event" + --#SUMMARY "Under-Temperature Warning (Lower non-critical, going low)" + --#ARGUMENTS {} + --#SEVERITY WARNING + + ::= 65792 + +-- Lower Critical threshold crossed + trapUnderTemperatureCritical TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Under-Temperature Problem (Lower Critical - going low)" + + --#TYPE "Temperature Event" + --#SUMMARY "Critical Under-Temperature Problem (Lower Critical - going low)" + --#ARGUMENTS {} + --#SEVERITY CRITICAL + + ::= 65794 + +-- Upper Non Critical threshold crossed + trapOverTemperatureWarning TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Over-Temperature Warning (Upper non-critical, going high)" + + --#TYPE "Temperature Event" + --#SUMMARY "Over-Temperature Warning (Upper non-critical, going high)" + --#ARGUMENTS {} + --#SEVERITY WARNING + + ::= 65799 + +-- Upper Critical threshold crossed + trapOverTemperatureCritical TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Over-Temperature Problem (Upper Critical - going high)" + + --#TYPE "Temperature Event" + --#SUMMARY "Critical Over-Temperature Problem (Upper Critical - going high)" + --#ARGUMENTS {} + --#SEVERITY CRITICAL + + ::= 65801 + +-- Back to Normal from Lower Non Critical + trapUnderTemperatureWarningCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Under-Temperature Warning Cleared" + + --#TYPE "Temperature Event" + --#SUMMARY "Under-Temperature Warning Cleared" + --#ARGUMENTS {} + --#SEVERITY INFORMATIONAL + + ::= 65920 + +-- Back to Normal from Lower Critical + trapUnderTemperatureCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Under-Temperature Problem Cleared" + + --#TYPE "Temperature Event" + --#SUMMARY "Under-Temperature Problem Cleared" + --#ARGUMENTS {} + --#SEVERITY INFORMATIONAL + + ::= 65922 + +-- Back to Normal from Upper Non Critical + trapOverTemperatureWarningCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Over-Temperature warning Cleared" + + --#TYPE "Temperature Event" + --#SUMMARY "Over-Temperature Warning Cleared" + --#ARGUMENTS {} + --#SEVERITY INFORMATIONAL + + ::= 65927 + +-- Back to Normal from Upper Critical + trapOverTemperatureCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Over-Temperature Problem Cleared" + + --#TYPE "Temperature Event" + --#SUMMARY "Over-Temperature Problem Cleared" + --#ARGUMENTS {} + --#SEVERITY INFORMATIONAL + + ::= 65929 + +-- Generic critical temperature problem + trapGenericCriticalTemperature TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Generic Critical Temperature Problem (Transition to Critical from less severe)" + + --#TYPE "Temperature Event" + --#SUMMARY "Generic Critical Temperature Problem (Transition to Critical from less severe)" + --#ARGUMENTS {} + --#SEVERITY CRITICAL + + ::= 67330 + +-- Generic temperature warning + trapGenericTemperatureWarning TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Generic Temperature Warning (Transition to Warning from less severe)" + +--#TYPE "Temperature Event" +--#SUMMARY "Generic Temperature Warning (Transition to Warning from less severe)" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 67331 + + +-- ********************************************** +-- * Voltage * +-- ********************************************** + +-- (Analog voltage) Lower Non Critical threshold crossed + trapUnderAnalogVoltageWarning TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Under-Voltage Warning (Lower Non Critical - going low)" +--#TYPE "Voltage Event" +--#SUMMARY "Under-Voltage Warning (Lower Non Critical - going low)" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 131328 + +-- (Analog voltage) Lower Critical threshold crossed + trapUnderAnalogVoltageCritical TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Under-Voltage Problem (Lower Critical - going low)" + +--#TYPE "Voltage Event" +--#SUMMARY "Critical Under-Voltage Problem (Lower Critical - going low)" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 131330 + +-- (Analog voltage) Upper Non Critical threshold crossed + trapOverAnalogVoltageWarning TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Over-Voltage Warning (Upper Non Critical - going high)" + +--#TYPE "Voltage Event" +--#SUMMARY "Over-Voltage Warning (Upper Non Critical - going high)" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 131335 + +-- (Analog voltage) Upper Critical threshold crossed + trapOverAnalogVoltageCritical TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Over-Voltage Problem (Upper Critical - going high)" + +--#TYPE "Voltage Event" +--#SUMMARY "Critical Over-Voltage Problem (Upper Critical - going high)" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 131337 + +-- (Analog voltage) Voltage back to OK from Lower Non Critical + trapUnderAnalogVoltageWarningCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Under-Voltage Warning Cleared" + +--#TYPE "Voltage Event" +--#SUMMARY "Under-Voltage Warning Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 131456 + +-- (Analog voltage) Voltage back to OK from Lower Non Critical + trapUnderAnalogVoltageCriticalCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Under-Voltage Problem Cleared" + +--#TYPE "Voltage Event" +--#SUMMARY "Under-Voltage Problem Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 131458 + +-- (Analog voltage) Voltage back to OK from Upper Non Critical Warning + trapOverAnalogVoltageWarningCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Over-Voltage Warning Cleared" + +--#TYPE "Voltage Event" +--#SUMMARY "Over-Voltage Warning Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 131463 + +-- (Analog voltage) Voltage back to OK from Upper Critical + trapOverAnalogVoltageCriticalCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Over-Voltage Problem Cleared" + +--#TYPE "Voltage Event" +--#SUMMARY "Over-Voltage Problem Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 131465 + +-- (Discrete voltage) Critical voltage problem + trapGenericCriticalDiscreteVoltageCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Generic Critical Voltage Problem Cleared" + +--#TYPE "Voltage Event" +--#SUMMARY "Generic Critical Voltage Problem Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 131840 + +-- (Discrete voltage) Critical voltage problem + trapGenericCriticalDiscreteVoltage TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Generic Critical Voltage Problem (Transition to Critical from less severe)" + +--#TYPE "Voltage Event" +--#SUMMARY "Generic Critical Voltage Problem (Transition to Critical from less severe)" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 131841 + +-- (Discrete voltage) Critical voltage problem + trapGenericCriticalDiscreteVoltage2 TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Generic Critical Voltage Problem (Transition to Critical from less severe)" + +--#TYPE "Voltage Event" +--#SUMMARY "Generic Critical Voltage Problem (Transition to Critical from less severe)" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 132866 + +-- (Discrete voltage) Non-Critical voltage problem + trapGenericDiscreteVoltageWarning TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Generic Voltage Warning (Transition to Non-Critical from less severe)" + +--#TYPE "Voltage Event" +--#SUMMARY "Generic Voltage Warning (Transition to Non-Critical from less severe)" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 132867 + + +-- ********************************************** +-- * Fan * +-- ********************************************** + +-- Lower Non Critical threshold crossed + trapFanUnderSpeedWarning TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Fan speed warning (Fan speed below expected speed)" + +--#TYPE "Fan Event" +--#SUMMARY "Fan speed Warning (Fan speed below expected speed)" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 262400 + +-- Fan Lower Critical threshold crossed + trapFanCriticalUnderSpeed TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Generic Critical Fan Failure (Transition to Critical from less severe)" + +--#TYPE "Fan Event" +--#SUMMARY "Critical Fan Failure (Transition to Critical from less severe)" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 262402 + +-- Fan back to OK from warning level + trapFanUnderSpeedWarningCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Fan speed Warning Cleared" + +--#TYPE "Fan Event" +--#SUMMARY "Fan speed Warning Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 262528 + +-- Fan back to OK from critical level + trapFanCriticalUnderSpeedCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Fan Failure Cleared" + +--#TYPE "Fan Event" +--#SUMMARY "Critical Fan Failure Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 262530 + +-- Fan Full Redundancy + trapFanFullRedundancy TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Fan redundancy has returned to Normal" + +--#TYPE "Fan Event" +--#SUMMARY "Fan redundancy has returned to Normal" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 264960 + +-- Fan Redundancy lost + trapFanRedundancyLost TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Fan Redundancy has been Lost" + +--#TYPE "Fan Event" +--#SUMMARY "Fan Redundancy has been Lost" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 264961 + +-- Fan Redundancy degraded + trapFanRedundancyDegraded TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Fan Redundancy is in a degraded state" + +--#TYPE "Fan Event" +--#SUMMARY "Fan Redundancy is in a degraded state" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 264962 + + +-- ********************************************** +-- * Power Supply * +-- ********************************************** + +-- Power Supply Full Redundancy + trapPowerSupplyFullRedundancy TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Supply Redundancy Has Returned to Normal" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply Redundancy Has Returned to Normal" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 527104 + +-- Power Supply Redundancy lost + trapPowerSupplyRedundancyLost TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Supply Redundancy has been Lost" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply Redundancy has been Lost" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 527105 + +-- Power Supply Redundancy degraded + trapPowerSupplyRedundancyDegraded TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Supply Redundancy is in a degraded state" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply Redundancy is in a degraded state" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 527106 + +-- Power Supply presence detected + trapPowerSupplyPresenceDeteced TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Supply Inserted" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply Inserted" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 552704 + +trapPowerSupplyFailureDetected TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power supply Failure detected" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply failure detected" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 552705 + +trapPowerSupplyWarning TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power supply Warning" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply Warning" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 552706 + + -- AC Lost + trapPowerSupplyACLost TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Supply AC Lost" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply AC Lost" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 552707 + +-- Power Supply removed + trapPowerSupplyPresenceRemoved TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Supply Removed" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply Removed" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 552832 + +-- Back to normal from failure + trapPowerSupplyFailureCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Supply Failure Cleared" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply Failure Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 552833 + +-- Predictive Failure cleared + trapPowerSupplyWarningCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Supply Warning Cleared" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply Warning Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 552834 + + -- AC Back + trapPowerSupplyACBack TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Supply AC Restored" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Supply AC Restored" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 552835 + +-- Power Unit Redundancy OK + trapPowerUnitRedundancyOk TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Unit Redundancy has been restored" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Unit Redundancy has been restored" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 592640 + +-- Power Unit Redundancy lost + trapPowerUnitRedundancyLost TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Power Unit Redundancy has been Lost" + +--#TYPE "Power Supply Event" +--#SUMMARY "Power Unit Redundancy has been Lost" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 592641 + +-- ********************************************** +-- * Processor * +-- ********************************************** + +-- Processor internal error + trapProcessorInternalError TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Internal Error" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Internal Error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 487168 + +-- Processor Thermal Trip + trapProcessorThermalTrip TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Thermal Trip (Over Temperature Shutdown)" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Thermal Trip (Over Temperature Shutdown)" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 487169 + +-- Processor Fault Resilient Booting (FRB) 1 / Built-in self test (BIST) Error + trapProcessorBistError TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Fault Resilient Booting (FRB) 1 / BIST (Built In Self Test) Failure" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Fault Resilient Booting (FRB) 1 / Processor BIST (Built In Self Test) Failure" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 487170 + +-- Processor Fault Resilient Booting (FRB) 2 / Hang in Power On Self Test (POST) +trapProcessorFRB2Failure TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Fault Resilient Booting (FRB) 2 / Hang in Power On Self Test (POST) Failure" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Fault Resilient Booting (FRB) 2 / Hang in Power On Self Test (POST) Failure" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 487171 + +-- Processor Fault Resilient Booting (FRB) 3 / Processor Setup / Initialization Failure +trapProcessorFRB3Failure TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Fault Resilient Booting (FRB) 3 / Processor Setup / Initialization Failure" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Fault Resilient Booting (FRB) 3 / Processor Setup / Initialization Failure" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 487172 + +-- Processor config error + trapProcessorConfigError TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Configuration Error" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Configuration Error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 487173 + +-- Processor throttle. + trapProcessorThrottle TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Throttled (Processor Speed Reduced)" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Throttled (Processor Speed Reduced)" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 487178 + +-- Processor internal error cleared + trapProcessorInternalErrorCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Internal Error Cleared" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Internal Error Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 487296 + +-- Processor Back to normal from Thermal Trip + trapProcessorThermalTripCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Thermal Trip (Over Temperature Shutdown) Cleared" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Thermal Trip (Over Temperature Shutdown) Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 487297 + +-- Processor BIST Error cleared + trapProcessorBistErrorCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor BIST (Built In Self Test) Failure Cleared" + +--#TYPE "Processor Event" +--#SUMMARY "Processor BIST (Built In Self Test) Failure Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 487298 + +-- Processor config error cleared + trapProcessorConfigErrorCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Configuration Error Cleared" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Configuration Error Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 487301 + +-- Processor return to normal from throttled + trapProcessorThrottleCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Processor Throttle Cleared (Normal Processor Speed)" + +--#TYPE "Processor Event" +--#SUMMARY "Processor Throttle Cleared (Normal Processor Speed)" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 487306 + +-- ********************************************** +-- * Memory * +-- ********************************************** + +trapMemoryUncorrectableECC TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Uncorrectable ECC or other uncorrectable memory error" + +--#TYPE "Memory Event" +--#SUMMARY "Uncorrectable ECC or other uncorrectable memory error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 814849 + + +--********************** +--* Chassis Intrusion * +--********************** + +-- Chassis Intrusion + trapChassisIntrusion TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Chassis Intrusion - Physical Security Violation" + +--#TYPE "Chassis Intrusion Event" +--#SUMMARY "Chassis Intrusion - Physical Security Violation" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 356096 + +-- Chassis Intrusion cleared + trapChassisIntrusionCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Chassis Intrusion (Physical Security Violation) Event Cleared" + +--#TYPE "Chassis Intrusion Event" +--#SUMMARY "Chassis Intrusion( Physical Security Violation) Event Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 356224 + + +-- ********************************************** +-- * Critical Interrupts * +-- ********************************************** + +-- Critical Interrupt, Bus timeout error +trapCriticalInterruptBusTimeout TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Interrupt, Bus Timeout error" + +--#TYPE "Critical Interrupts Event" +--#SUMMARY "Critical Interrupt, Bus Timeout error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 1273601 + +-- Critical Interrupt, IO Channel Non-Maskable Interrupt +trapCriticalInterruptIOChannelNMI TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Interrupt, IO Channel check NMI error" + +--#TYPE "Critical Interrupts Event" +--#SUMMARY "Critical Interrupt, IO Channel check NMI error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 1273602 + +-- Critical Interrupt, Software Non-Maskable Interrupt error +trapCriticalInterruptSoftwareNMI TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Interrupt, software NMI error" + +--#TYPE "Critical Interrupts Event" +--#SUMMARY "Critical Interrupt, software NMI error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 1273603 + +-- Non special-cycle parity errors +trapCriticalInterruptPCIPERR TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Interrupt, PCI PERR parity error" + +--#TYPE "Critical Interrupts Event" +--#SUMMARY "Critical Interrupt, PCI PERR parity error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 1273604 + +-- Special-cycle parity errors +trapCriticalInterruptPCISERR TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Interrupt, PCI SERR parity error" + +--#TYPE "Critical Interrupts Event" +--#SUMMARY "Critical Interrupt, PCI SERR parity error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 1273605 + +-- Bus uncorrectable error +trapCriticalInterruptBusUncorrect TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Interrupt, Bus Uncorrectable error" + +--#TYPE "Critical Interrupts Event" +--#SUMMARY "Critical Interrupt, Bus Uncorrectable error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 1273608 + +-- Fatal non-maskable interrupt (NMI) +trapCriticalInterruptFatalNMI TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Critical Interrupt, Fatal NMI error" + +--#TYPE "Critical Interrupts Event" +--#SUMMARY "Critical Interrupt, Fatal NMI error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 1273609 + + +-- ********************************************** +-- * System Firmware Progress * +-- ********************************************** + +-- Power On Self Test (POST) code error +trapBIOSPOSTCodeError TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "System Firmware Progress: BIOS POST code error" + +--#TYPE "System Firmware Progress Event" +--#SUMMARY "System Firmware Progress: BIOS POST code error" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 1011456 + + +-- ********************************************** +-- * WatchDog * +-- ********************************************** + +-- Watchdog reset event +trapWatchdogReset TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Watchdog Reset" + +--#TYPE "Watchdog Event" +--#SUMMARY "Watchdog Reset" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 2322177 + +-- Watchdog power down event +trapWatchdogPowerDown TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Watchdog Power Down" + +--#TYPE "Watchdog Event" +--#SUMMARY "Watchdog Power Down" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 2322178 + +-- Watchdog power cycle event +trapWatchdogPowerCycle TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "Watchdog Power Cycle" + +--#TYPE "Watchdog Event" +--#SUMMARY "Watchdog Power cycle" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 2322179 + + +-- ********************************************** +-- * System Event Log * +-- ********************************************** + +-- System Event Log Cleared + trapSystemEventLogCleared TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "System Event Log (SEL) Cleared" + +--#TYPE "System Event Log" +--#SUMMARY "System Event Log (SEL) Cleared" +--#ARGUMENTS {} +--#SEVERITY INFORMATIONAL + + ::= 1076994 + +-- System Event Log Full + trapSystemEventLogFull TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "System Event Log (SEL) Full (Logging Disabled)" + +--#TYPE "System Event Log" +--#SUMMARY "System Event Log (SEL) Full (Logging Disabled)" +--#ARGUMENTS {} +--#SEVERITY CRITICAL + + ::= 1076995 + + +-- ********************************************** +-- * System * +-- ********************************************** + +-- System boot event +trapSystemBootEvent TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "System Boot Event" + +--#TYPE "System Event" +--#SUMMARY "System Boot Event" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 1208065 + +-- ********************************************** +-- * Linux Panic, Critical Stop * +-- ********************************************** + +-- Linux panic event +trapOSCriticalStop TRAP-TYPE + ENTERPRISE petevts + DESCRIPTION + "OS Critical Stop occurred" + +--#TYPE "System Event" +--#SUMMARY "System Boot Event" +--#ARGUMENTS {} +--#SEVERITY WARNING + + ::= 2125569 + +END diff --git a/doc/ialarms.8 b/doc/ialarms.8 new file mode 100644 index 0000000..34de55a --- /dev/null +++ b/doc/ialarms.8 @@ -0,0 +1,103 @@ +.TH IALARMS 8 "Version 1.3: 20 Apr 2007" +.SH NAME +ipmiutil_alarms \- display and set alarm indicators +.SH SYNOPSIS +.B "ipmiutil alarms [-abcdimnoprx -N node -U user -P/-R pswd -EFJTVY]" + +.SH DESCRIPTION +.I ipmiutil alarms +is a program that uses IPMI commands to +display and set alarm indicators, which are usually LEDs on the system +chassis front panel. +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. +Note that a LAN user must have Administrative privileges to read or write +the alarm LEDs. + +Note that this utility may not be the only logic setting alarm states. +The BMC firmware, system management software, or cluster fault manager +may also want to set alarm states. Intel provides a Telco Alarms Manager API +which presents a consolidated interface for all alarm management applications. + +.SH OPTIONS +Command line options are described below. +.IP "-r" +Read-only. Show the alarms status, but do not set any states. +This is also the default mode if no parameters are specified. +.IP "-iN" +Sets the Chassis Identify feature, which can be an LED or some other +alarm. If N=0, turn off the Chassis ID, otherwise turn the ID on +for N seconds. N=255 will turn on the ID indefinitely, if it is IPMI 2.0. +.IP "-aN" +Sets Disk A Fault LED. If N=0, turn it off. If N=1, turn it on. Used only for TIGPT1U platform. +.IP "-bN" +Sets Disk B Fault LED. If N=0, turn it off. If N=1, turn it on. Used only for TIGPT1U platform. +.IP "-dXN" +Sets Disk X Fault LED, where X=0-6. If N=0, turn it off. If N=1, turn it on. Used only for NSC2U platform. +.IP "-cN" +Sets the Critical Alarm. If N=0, turn it off. If N=1, turn it on. +.IP "-mN" +Sets the Major Alarm. If N=0, turn it off. If N=1, turn it on. +.IP "-nN" +Sets the Minor Alarm. If N=0, turn it off. If N=1, turn it on. +.IP "-pN" +Sets the Power Alarm. If N=0, turn it off. If N=1, turn it on. +Note that the Power LED is also wired to the System Fault LED +in the back of the system, so this state may be off for Power, +but the LED could be lit for a System Fault reason instead. +Refer to the system Technical Product Specification for System Faults. +.IP "-o" +Sets all alarms off, including the Chassis ID. +.IP "-x" +Causes extra debug messages to be displayed. + +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use this IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use this IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + + +.SH "SEE ALSO" +ipmiutil(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/icmd.8 b/doc/icmd.8 new file mode 100644 index 0000000..f786528 --- /dev/null +++ b/doc/icmd.8 @@ -0,0 +1,113 @@ +.TH ICMD 8 "Version 1.0: 10 Aug 2004" +.SH NAME +ipmiutil_cmd \- a tool to send specific IPMI commands via the command line. + +.SH SYNOPSIS +.B "ipmiutil cmd [-qsx -NUPREFJTVY] bus rsSa netFn/lun cmd [data bytes]" + +.SH DESCRIPTION +This +.I ipmiutil cmd +tool sends specific IPMI commands to the firmware. The commands +are composed as hex values on the command line. This tool was +written to allow in-band use to match the DOS CMDTOOL.EXE or +IPMITOOL.EXE program which is distributed with many Intel servers. +Certain scripts or pre-written commands may have been supplied for +the DOS tool that can now be used while the system is running +Linux or Windows. + +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +This tool should only be used if you are familiar with the IPMI 1.5 +specification, or you have specific pre-written commands to send. + + +.SH OPTIONS +Command line options are described below. +.IP "-q" +Quiet mode. Show only minimal header information. +.IP "-s" +Skips the GetDeviceID command +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH PARAMETERS +The following parameters are used by icmd. Each is represented as +a two-digit hex byte. The parameters have no default values. + +.IP "bus" +This byte contains the bus number for this command, usually 00. + +.IP "rsSa" +This is the resource slave address, usually 0x20 for the BMC. + +.IP "netFn/lun" +This byte combines the net Function and Lun. The 2 low-order bits +are the Lun and the 6 high-order bits are the net Function. +This representation is consistent with the DOS CMDTOOL/IPMITOOL. + +.IP "cmd" +This byte contains the IPMI command. + +.IP "[data bytes]" +This is a sequence of zero to 16 bytes that represent data bytes +specific to this command. + +.SH "EXAMPLES" +icmd 00 20 18 01 +.br +Sends the GetDevice ID command to the BMC. +.PP +icmd 00 20 28 43 00 00 ff ff 00 ff +.br +Sends a Get SEL entry command for the last entry in the firmware log. + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/iconfig.8 b/doc/iconfig.8 new file mode 100644 index 0000000..d95ed0b --- /dev/null +++ b/doc/iconfig.8 @@ -0,0 +1,96 @@ +.TH ICONFIG 8 "Version 1.4: 17 Feb 2010" +.SH NAME +ipmiutil_config \- list, save, and restore BMC configuration parameters +.SH SYNOPSIS +.B "ipmiutil config [-lpxLNUPREFJTVY] [-r file] [-s file]" + +.SH DESCRIPTION +.I ipmiutil config +is a program that uses an IPMI driver to send IPMI commands which list, +save and restore BMC configuration parameters for LAN, Serial, PEF, +SOL, User, Channel. This combines the functionality of ipmiutil lan (ilan) +and ipmiutil serial (iserial). +Note that some of the LAN parameters cannot be restored remotely over +the IPMI LAN, changing the configuration that is in use. +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. + +.IP "-l" +Lists BMC configuration parameters with a keyword, index, and its hex values. +This is the default behavior if no options are specified. +.IP "-r config_file" +Restores BMC configuration from config_file, which was produced with \-s below. +.IP "-s config_file" +Saves BMC configuration to config_file. This file could be edited, in certain +cases, such as to vary the BMC IP address (LanParam 3), or to use the +UserPassword records. Note that lines beginning with '#' are comments +and are ignored. +For editing UserPassword records, convert your text value to hex format; +for example "echo 'mypassword' |od \-t x1", and leave off the trailing 0a. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-p password_to_set" +This specifies the firmware password to set for BMC LAN access for all users +during the restore. +If not specified, the password configuration will not be changed, unless a +valid UserPassword record is present in the file to be restored. +Note that user passwords are write-only via standard IPMI commands. +.IP "-L lan_ch_num" +This specifies the IPMI LAN channel number used for BMC LAN. This varies +by platform, and can be found in the platform technical specifications. +By default, bmcconfig scans all IPMI channels to find a LAN channel for +BMC LAN. + +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/idcmi.8 b/doc/idcmi.8 new file mode 100644 index 0000000..c110afd --- /dev/null +++ b/doc/idcmi.8 @@ -0,0 +1,122 @@ +.TH IDCMI 8 "Version 1.0: 02 Feb 2012" +.SH NAME +ipmiutil_dcmi \- handle DCMI functions + +.SH SYNOPSIS +.B "ipmiutil dcmi [-admsx -NUPREFTVY] + +.SH DESCRIPTION +This +.I ipmiutil dcmi +subcommand handles DCMI command functions according to the DCMI +specification. + +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. +.IP "-a string" +Set the DCMI Asset Tag to this string. +.IP "-d string" +Set the DCMI MC ID to this string. +.IP "-m 002000" +Target a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-s" +When getting info, also get the DCMI sensor information. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH FUNCTIONS + +.IP "info" +Get DCMI Capabilities, MC ID, and Asset Tag. This is the default function +if no function was specified. + +.IP "power " +Get DCMI Power reading and DCMI Power limit, if supported in the DCMI capabilties. +.IP "power set_limit" +Set Power limit +.IP "power set_action " +Set Power limit exception action +(where action = no_action | power_off | log_sel) +.IP "power set_correction" +Set Power limit correction time (in ms) +.IP "power set_sample" +Set Power limit sampling period (in sec) +.IP "power activate" +Activate Power limit +.IP "power deactivate" +Deactivate Power limit + + +.IP "thermal" +Get/Set DCMI Thermal parameters. This requires DCMI 1.5 support. + +.IP "config" +Get/Set DCMI Configuration parameters. This requires DCMI 1.5 support. + +.IP "help" +Show the help (usage) message + +.SH "EXAMPLES" +ipmiutil dcmi info \-s +.br +Gets DCMI information, plus DCMI sensor information +.PP +ipmiutil dcmi \-N 192.168.1.1 \-U root \-P pswd +.br +Gets DCMI information over IPMI LAN. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2010 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/idelloem.8 b/doc/idelloem.8 new file mode 100644 index 0000000..997fe16 --- /dev/null +++ b/doc/idelloem.8 @@ -0,0 +1,177 @@ +.TH IDELLOEM 8 "Version 1.0: 17 Aug 2011" +.SH NAME +ipmiutil_delloem \- OEM commands for Dell servers +.SH SYNOPSIS +.B "ipmiutil delloem [-mx -NPRUEFJTVY] commands" + +.SH DESCRIPTION +.I ipmiutil delloem commands +is a program that uses Dell OEM IPMI commands to +perform platform-specific functions. + +.SH OPTIONS + +.IP "-m 002000" +Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH COMMANDS + +.RS +.RE +.TP +\fImac\fP \fIlist\fP +.RS + Lists the MAC address of LOMs + +.RE +.TP +\fImac\fP \fIget\fP <\fBNIC number\fR> +.RS + Shows the MAC address of specified LOM. 0-7 System LOM, 8- DRAC/iDRAC. + +.RE +.TP +\fIlan\fP \fIset\fP <\fBMode\fR> +.RS + Sets the NIC Selection Mode (dedicated, shared, + shared with failover lom2, shared with Failover all loms). + +.RE +.TP +\fIlan\fP \fIget\fP +.RS + Returns the current NIC Selection Mode (dedicated, shared, + shared with failover lom2, shared with Failover all loms). + +.RE +.TP +\fIlan\fP \fIget\fP \fIactive\fP +.RS + Returns the current active NIC (dedicated, LOM1, LOM2, LOM3, LOM4). + +.RE +.TP +\fIpowermonitor\fP +.RS + Shows power tracking statistics + +.RE +.TP +\fIpowermonitor\fP \fIclear\fP \fIcumulativepower\fP +.RS + Reset cumulative power reading + +.RE +.TP +\fIpowermonitor\fP \fIclear\fP \fIpeakpower\fP +.RS + Reset peak power reading + +.RE +.TP +\fIpowermonitor\fP \fIpowerconsumption\fP +.RS + Displays power consumption in + +.RE +.TP +\fIpowermonitor\fP \fIpowerconsumptionhistory\fP <\fBwatt|btuphr\fR> +.RS + Displays power consumption history + +.RE +.TP +\fIpowermonitor\fP \fIgetpowerbudget\fP +.RS + Displays power cap in + +.RE +.TP +\fIpowermonitor\fP \fIsetpowerbudget\fP <\fBval\fR> <\fBwatt|btuphr|percent\fR> +.RS + Allows user to set the power cap in + +.RE +.TP +\fIpowermonitor\fP \fIenablepowercap\fP +.RS + To enable set power cap + +.RE +.TP +\fIpowermonitor\fP \fIdisablepowercap\fP +.RS + To disable set power cap + +.RE +.TP +\fIwindbg\fP \fIstart\fP +.RS + Starts the windbg session (Cold Reset & SOL Activation) + +.RE +.TP +\fIwindbg\fP \fIend\fP +.RS + Ends the windbg session (SOL Deactivation) + +.RE +.TP +\fIvFlash\fP \fIinfo\fP \fICard\fP +.RS + Shows Extended SD Card information +.RE + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/idiscover.8 b/doc/idiscover.8 new file mode 100644 index 0000000..e7b05b0 --- /dev/null +++ b/doc/idiscover.8 @@ -0,0 +1,92 @@ +.TH IDISCOVER 8 "Version 1.0: 02 May 2007" +.SH NAME +ipmiutil_discover \- discover IPMI LAN-enabled nodes +.SH SYNOPSIS +.B "idiscover [-abegisx]" + +.SH DESCRIPTION +.I idiscover +is a program that uses IPMI LAN commands to discover any nodes +on the LAN that are available, by probing the RMCP port (623.) +on those nodes. +This utility uses IPMI LAN, so no IPMI drivers are needed. +There are three methods that can be used: +.br +\-a = broadcast RMCP ping method (default) +.br +\-g = GetChannelAuthCap command method +.br +else = specific RMCP ping method +.P +A beginning IP address can be specified with \-b for broadcast and specific +methods. An ending IP can be specified for non-broadcast methods. + +.SH OPTIONS +Command line options are described below. +.IP "-a" +All nodes, use the broadcast ping method. This is the default if no options +are specified. This will detect the first enabled ethernet interface, and +defaults to the broadcast address x.x.x.255 (where x.x.x.x is IP address) +unless \-b is used to specify otherwise. +.IP "-b " +Beginning IP address, required, unless using broadcast with defaults. +This could be a specific IP address, or a broadcast address, ending in 255, +if the broadcast method (\-a) is used. +.IP "-e " +Endign IP address of the range. Not used for broadcast method. +If this is not specified, a range of one IP address matching the beginning +IP is assumed. +.IP "-g" +Use the GetChannelAuthenticationCapabilities command method over IPMI LAN +instead of the RMCP ping. Not compatible with broadcast. +This may be useful if the vendor BMC does not support RMCP ping for some +reason. +.IP "-i eth0" +The interface name to use when sending the probes. The default is to +detect the first enabled ethernet interface (e.g. eth0). +.IP "-m" +shows MAC address. Uses the broadcast ping method, but uses a raw socket +so that the MAC address can be displayed. This detects the first enabled +ethernet interface, and defaults to the broadcast address 255.255.255.255 +like \-a. Using \-m with raw sockets requires root privilege. +.IP "-r N" +Repeat the ping N times to each node. Default is to send 1 ping per node. +.IP "-x" +Causes extra debug messages to be displayed. + + +.SH "EXAMPLES" + + idiscover \-a \-b 192.168.1.255 +.br +Sends a broadcast RMCP ping to discover IPMI LAN nodes on the specified subnet. +.PP + idiscover \-b 192.168.1.100 \-e 192.168.1.254 +.br +Sends RMCP pings to a range of IP addresses. +.PP + idiscover \-g \-b 192.168.1.100 \-e 192.168.1.254 +.br +Sends GetChannelAuthCap commands to a range of IP addresses. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/iekanalyzer.8 b/doc/iekanalyzer.8 new file mode 100644 index 0000000..c4ca1e2 --- /dev/null +++ b/doc/iekanalyzer.8 @@ -0,0 +1,251 @@ +.TH IEKANALYZER 8 "Version 1.0: 09 Sep 2010" +.SH NAME +ipmiutil_ekanalyzer \- run FRU-Ekeying analyzer with FRU files +.SH SYNOPSIS +.B "ipmiutil ekanalyzer [-mx -NPRUEFJTVY] commands" +.B (deprecated, see ifru instead) + +.SH DESCRIPTION +.I ipmiutil ekanalyzer +is a program that analyzes FRU Ekeying information from files +saved from PICMG IPMI systems. + +.br +\fIekanalyzer\fP \fBcommand\fR \fBxx=filename1\fR \fBxx=filename2\fR [\fBrc=filename3\fR] +.br +NOTE: This command can support a maximum of 8 files per command line + +.IP "\fIfilename1\fP" +binary file that stores FRU data of a Carrier or an AMC module + +.IP "\fIfilename2\fP" +binary file that stores FRU data of an AMC module. +These binary files can be generated from this command: + \fIipmiutil fru \-i id \-d filename\fP + +.IP "\fIfilename3\fP" +configuration file used for configuring On-Carrier Device ID or OEM GUID. This file is optional. + +.IP "\fIxx\fP" +indicates the type of the file. It can take the following value: +.br + \fIoc\fP : On-Carrier device +.br + \fIa1\fP : AMC slot A1 +.br + \fIa2\fP : AMC slot A2 +.br + \fIa3\fP : AMC slot A3 +.br + \fIa4\fP : AMC slot A4 +.br + \fIb1\fP : AMC slot B1 +.br + \fIb2\fP : AMC slot B2 +.br + \fIb3\fP : AMC slot B3 +.br + \fIb4\fP : AMC slot B4 +.br + \fIsm\fP : Shelf Manager + + +.SH OPTIONS + +.IP "-m 002000" +Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH "COMMANDS" +.RE +.TP +.br +The available commands for ekanalyzer are: + +.RE +.RS +.TP +\fIprint\fP [\fBcarrier\fR | \fBpower\fR | \fBall\fR] +.RS +.TP +\fIcarrier\fP (default) \fBoc=filename1\fR \fBoc=filename2\fR \fB...\fR +.br + +Display point to point physical connectivity between carriers and AMC modules. + Example: + # ipmiutil ekanalyzer print carrier oc=fru oc=carrierfru + From Carrier file: fru + Number of AMC bays supported by Carrier: 2 + AMC slot B1 topology: + Port 0 =====> On Carrier Device ID 0, Port 16 + Port 1 =====> On Carrier Device ID 0, Port 12 + Port 2 =====> AMC slot B2, Port 2 + AMC slot B2 topology: + Port 0 =====> On Carrier Device ID 0, Port 3 + Port 2 =====> AMC slot B1, Port 2 + *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + From Carrier file: carrierfru + On Carrier Device ID 0 topology: + Port 0 =====> AMC slot B1, Port 4 + Port 1 =====> AMC slot B1, Port 5 + Port 2 =====> AMC slot B2, Port 6 + Port 3 =====> AMC slot B2, Port 7 + AMC slot B1 topology: + Port 0 =====> AMC slot B2, Port 0 + AMC slot B1 topology: + Port 1 =====> AMC slot B2, Port 1 + Number of AMC bays supported by Carrier: 2 + +.TP +\fIpower\fP \fBxx=filename1\fR \fBxx=filename2\fR \fB...\fr +.br + +Display power supply information between carrier and AMC modules. +.TP +\fIall\fP \fBxx=filename\fR \fBxx=filename\fR \fB...\fr +.br + +Display both physical connectivity and power supply of each carrier and AMC +modules. + +.RE +.TP +\fIfrushow\fP \fBxx=filename\fR +.br +Convert a binary FRU file into human readable text format. Use \-v option to get +more display information. + +.RE +.RS +.TP +\fIsummary\fP [\fBmatch\fR | \fBunmatch\fR | \fBall\fR] +.RS +.TP +\fImatch\fP (default) \fBxx=filename\fR \fBxx=filename\fR \fB...\fR +.br +Display only matched results of Ekeying match between an On-Carrier device +and an AMC module or between 2 AMC modules. Example: + # ipmiutil ekanalyzer summary match oc=fru b1=amcB1 a2=amcA2 + On-Carrier Device vs AMC slot B1 + AMC slot B1 port 0 ==> On-Carrier Device 0 port 16 + Matching Result + From On-Carrier Device ID 0 + Channel ID 11 || Lane 0: enable + Link Type: AMC.2 Ethernet + Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link + Link Group ID: 0 || Link Asym. Match: exact match + To AMC slot B1 + Channel ID 0 || Lane 0: enable + Link Type: AMC.2 Ethernet + Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link + Link Group ID: 0 || Link Asym. Match: exact match + *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + AMC slot B1 port 1 ==> On-Carrier Device 0 port 12 + Matching Result + From On-Carrier Device ID 0 + Channel ID 6 || Lane 0: enable + Link Type: AMC.2 Ethernet + Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link + Link Group ID: 0 || Link Asym. Match: exact match + To AMC slot B1 + Channel ID 1 || Lane 0: enable + Link Type: AMC.2 Ethernet + Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link + Link Group ID: 0 || Link Asym. Match: exact match + *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + On-Carrier Device vs AMC slot A2 + AMC slot A2 port 0 ==> On-Carrier Device 0 port 3 + Matching Result + From On-Carrier Device ID 0 + Channel ID 9 || Lane 0: enable + Link Type: AMC.2 Ethernet + Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link + Link Group ID: 0 || Link Asym. Match: exact match + To AMC slot A2 + Channel ID 0 || Lane 0: enable + Link Type: AMC.2 Ethernet + Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link + Link Group ID: 0 || Link Asym. Match: exact match + *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + AMC slot B1 vs AMC slot A2 + AMC slot A2 port 2 ==> AMC slot B1 port 2 + Matching Result + From AMC slot B1 + Channel ID 2 || Lane 0: enable + Link Type: AMC.3 Storage + Link Type extension: Serial Attached SCSI (SAS/SATA) + Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match} + To AMC slot A2 + Channel ID 2 || Lane 0: enable + Link Type: AMC.3 Storage + Link Type extension: Serial Attached SCSI (SAS/SATA) + Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match} + *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* +.TP +\fIunmatch\fP \fBxx=filename\fR \fBxx=filename\fR \fB...\fr +.br + +Display the unmatched results of Ekeying match between an On-Carrier device +and an AMC module or between 2 AMC modules +.TP +\fIall\fP \fBxx=filename\fR \fBxx=filename\fR \fB...\fr +.br + +Display both matched result and unmatched results of Ekeying match between two +cards or two modules. +.RE + +.SH "SEE ALSO" +ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifirewall(8) +ifru(8) ifruset(8) ifwum(8) igetevent(8) ihealth(8) ihpm(8) +ilan(8) ipicmg(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) isunoem(8) +iwdt(8) ipmiutil(8) ipmi_port(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ievents.8 b/doc/ievents.8 new file mode 100644 index 0000000..4dc72a7 --- /dev/null +++ b/doc/ievents.8 @@ -0,0 +1,93 @@ +.TH IEVENTS 8 "Version 1.3: 23 June 2009" +.SH NAME +ievents \- decode IPMI and PET event data +.SH SYNOPSIS +.B "ievents [-bfhnprsx] 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10" + +.SH DESCRIPTION +.I ievents +is a standalone utility delivered with ipmiutil, used to interpret raw +hex data from IPMI events or from IPMI PET SNMP trap varbind data. +This utility uses the same interpretation logic as is used by +"ipmiutil sel" (showsel) and "ipmiutil getevt" (getevents). + +The data bytes in the input are always assumed to be in hex form. + +This could be useful if a utility other than "ipmiutil sel" were used to +obtain IPMI SEL records or events and interpretation is needed. + +This would also be needed at an enterprise management station to +interpret the PET SNMP trap hex data into human-readable form, +see option \-p. + +.SH OPTIONS + +.IP "-b bin_file" +Interpret a file containing raw binary/hex SEL data dumped in binary form, +such as that produced by "ipmitool sel writeraw bin_file". +Each set of 16 bytes in the file will be interpreted as an IPMI event. +(same as \-h) + +.IP "-f sel_file" +Interpret a file containing raw ascii text SEL data captured with +ipmiutil sel \-r, or some other similar utility. +Each line in the file should be in this +form, with no leading spaces: +.br +04 00 02 76 a9 4a 47 20 00 04 10 09 6f 42 0f ff +.br +If this option is not specified, the default is to use the 16 bytes +taken from the command-line arguments. +(same as \-r) + +.IP "-h bin_file" +Interpret a file containing raw binary/hex SEL data dumped in binary form, +such as that produced by "ipmitool sel writeraw bin_file". +Each set of 16 bytes in the file will be interpreted as an IPMI event. +(same as \-b) + +.IP "-n" +This option generates a New IPMI platform event, using 9 bytes of input. +The input bytes are the same as the last 9 bytes of an IPMI event. + +.IP "-p" +Decode as PET event bytes, where the input is 34 PET hex data bytes, +skipping the first 8 of the 47-byte PET data. +The default without \-p assumes that the input is a 16-byte IPMI event. + +.IP "-r sel_file" +Interpret a file containing raw ascii text SEL data captured with +ipmiutil sel \-r, or some other similar utility. +(same as \-f) + +.IP "-s sensor_file" +Sensor file with the output of "ipmiutil sensor", used +to get the PET sensor_type from the sensor_num. +The default is /usr/share/ipmiutil/sensor_out.txt as +generated during the ipmiutil package installation. +This is only needed with PET interpretation (\-p). + +.IP "-x" +show eXtra debug messages + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ifirewall.8 b/doc/ifirewall.8 new file mode 100644 index 0000000..a327a2b --- /dev/null +++ b/doc/ifirewall.8 @@ -0,0 +1,152 @@ +.TH IFIREWALL 8 "Version 1.0: 04 Jun 2010" +.SH NAME +ipmiutil_firewall \- configure the IPMI firmware firewall functions + +.SH SYNOPSIS +.B "ipmiutil firewall [-mxNUPREFJTVY] parameters" + +.SH DESCRIPTION +This +.I ipmiutil firewall +command supports the IPMI Firmware Firewall capability. It may be used to +add or remove security-based restrictions on certain commands/command +sub-functions or to list the current firmware firewall restrictions set on +any commands. For each firmware firewall command listed below, parameters +may be included to cause the command to be executed with increasing +granularity on a specific LUN, for a specific NetFn, for a specific IPMI +Command, and finally for a specific command's sub-function. +See Appendix H in the IPMI 2.0 Specification for a listing of any +sub-function numbers that may be associated with a particular command. + +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. +.IP "-m 002000" +Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH PARAMETERS +Parameter syntax and dependencies are as follows: + +firewall [\fIchannel\fP \fBH\fR] [\fIlun\fP \fBL\fR [ \fInetfn\fP \fBN\fR [\fIcommand\fP \fBC\fR [\fIsubfn\fP \fBS\fR]]]] + +Note that if "netfn \fBN\fR" is specified, then "lun \fBL\fR" must also be +specified; if "command \fBC\fR" is specified, then "netfn \fBN\fR" (and +therefore "lun \fBL\fR") must also be specified, and so forth. + +"channel \fBH\fR" is an optional and standalone parameter. If not specified, +the requested operation will be performed on the current channel. Note that +command support may vary from channel to channel. + +Firmware firewall commands: +.RS +.TP +\fIinfo\fP [\fB(Parms as described above)\fR] +.br + +List firmware firewall information for the specified LUN, NetFn, and +Command (if supplied) on the current or specified channel. Listed +information includes the support, configurable, and enabled bits for +the specified command or commands. + +Some usage examples: +.RS +.TP +\fIinfo\fP [\fBchannel H\fR] [\fBlun L\fR] +.br + +This command will list firmware firewall information for all NetFns for the +specified LUN on either the current or the specified channel. +.TP +\fIinfo\fP [\fBchannel H\fR] [\fBlun L\fR [ \fBnetfn N\fR ] +.br + +This command will print out all command information for a single LUN/NetFn pair. +.TP +\fIinfo\fP [\fBchannel H\fR] [\fBlun L\fR [ \fBnetfn N\fR [\fBcommand C\fR] ]] +.br + +This prints out detailed, human-readable information showing the support, configurable, +and enabled bits for the specified command on the specified LUN/NetFn pair. Information +will be printed about each of the command subfunctions. +.TP +\fIinfo\fP [\fBchannel H\fR] [\fBlun L\fR [ \fBnetfn N\fR [\fBcommand C\fR [\fBsubfn S\fR]]]] +.br + +Print out information for a specific sub-function. +.RE +.TP +\fIenable\fP [\fB(Parms as described above)\fR] +.br + +This command is used to enable commands for a given NetFn/LUN combination on +the specified channel. +.TP +\fIdisable\fP [\fB(Parms as described above)\fR] [\fBforce\fR] +.br + +This command is used to disable commands for a given NetFn/LUN combination on +the specified channel. Great care should be taken if using the "force" +option so as not to disable the "Set Command Enables" command. +.TP +\fIreset\fP [\fB(Parms as described above)\fR] +.br + +This command may be used to reset the firmware firewall back to a state +where all commands and command sub-functions are enabled. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2010 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ifru.8 b/doc/ifru.8 new file mode 100644 index 0000000..5162ed0 --- /dev/null +++ b/doc/ifru.8 @@ -0,0 +1,111 @@ +.TH IFRU 8 "Version 1.4: 09 Sep 2010" +.SH NAME +ipmiutil_fru \- show Field Replacable Unit configuration data +.SH SYNOPSIS +.B "ipmiutil fru [-abcdeikmsvx -N node -U user -P/-R pswd -EFJTVY]" + +.SH DESCRIPTION +.I ipmiutil fru +is a program that uses IPMI commands to +show FRU configuration data and optionally +write an asset tag string into the FRU data. +Setting the asset tag is a function that can be +used to uniquely identify the unit, even if the +storage devices are removed or changed. +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. +.IP "-a asset_string" +This option specifies an asset tag string to be written +to the baseboard FRU Product area. The asset tag length is +limited by the existing FRU Product data, but is usually +allowed up to 16 characters. The default is to not modify this FRU field. +.IP "-b" +Only show the Baseboard FRU data. The default behavior is to also scan +for any SDR FRU data or DIMM SPD data referenced by the SDRs. +.IP "-c" +Show FRU output in a canonical format, with a default delimiter of '|'. +.IP "-d file" +Dump binary FRU data to the specified file. +.IP "-e" +Show Every FRU output in a bladed chassis, including those under child MCs. +The default is to show FRUs referred to by just the target MC. +.IP "-i 00" +This option specifies a specific FRU ID to show. The input value should be +in hex (0b, 1a, etc.), as shown from the sensor SDR output. +By default, all FRU IDs that are specified in the FRU locator SDRs are shown. +.IP "-k " +These Kontron OEM functions set FRU data based on existing data stored +elsewhere. The setsn option sets the FRU Board and Product serial number, +and the setmfgdate option sets the FRU Board Mfg DateTime. The nextboot +option specifies the boot device for the next boot: +BIOS, FDD, HDD, CDROM, or network. +These options are only supported on Kontron ATCA boards which have this +functionality. +.IP "-m 002000" +Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-s serial_num" +This option specifies a serial number string to be written +to the baseboard FRU Product area. The serial number can be +any string up to 16 characters. The default is to not modify this FRU field. +.IP "-v prod_ver" +This option specifies a product version number string to be written +to the baseboard FRU Product area. The version number can be +any string up to 16 characters. The default is to not modify this FRU field. +.IP "-x" +Causes eXtra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ifruset.8 b/doc/ifruset.8 new file mode 100644 index 0000000..9f72eda --- /dev/null +++ b/doc/ifruset.8 @@ -0,0 +1,122 @@ +.TH IFRUSET 8 "Version 1.0: 14 Apr 2010" +.SH NAME +ifruset \- show/set Field Replacable Unit configuration data +.SH SYNOPSIS +.B "ifruset [-bcimx -unpvsafo -N node -U user -P/-R pswd -EFJTVY]" + +.SH DESCRIPTION +.I ifruset +is a program that uses IPMI commands to +show FRU configuration data and optionally +write any Product area fields into the FRU data. +Setting the FRU Product area fields is a function +that might be done by a manufacturer or system integrator. +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if -N. + +This program is not built or installed by default. +Integrators who wish to use it should build ipmiutil from source, +then do 'cd util; make ifruset'. + +.SH OPTIONS +Command line options are described below. +.IP "-u manuf" +This option specifies a product manufacturer string to be written +to the baseboard FRU Product area field 0. This field can be +any string up to 20 characters. The default is to not modify this FRU field. +.IP "-n name" +This option specifies a product name string to be written +to the baseboard FRU Product area field 1. This field can be +any string up to 20 characters. The default is to not modify this FRU field. +.IP "-p partnum" +This option specifies a product part number string to be written +to the baseboard FRU Product area field 2. This field can be +any string up to 20 characters. The default is to not modify this FRU field. +.IP "-v prod_ver" +This option specifies a product version number string to be written +to the baseboard FRU Product area field 3. The version number can be +any string up to 20 characters. The default is to not modify this FRU field. +.IP "-s serial_num" +This option specifies a serial number string to be written +to the baseboard FRU Product area field 4. The serial number can be +any string up to 20 characters. The default is to not modify this FRU field. +.IP "-a asset_string" +This option specifies an asset tag string to be written +to the baseboard FRU Product area field 5. The asset tag length is +limited by the existing FRU Product data, but is usually +allowed up to 20 characters. The default is to not modify this FRU field. +.IP "-f fruid" +This option specifies a product FRU file ID string to be written +to the baseboard FRU Product area field 6. This field can be +any string up to 20 characters. +.IP "-o oem" +This option specifies a product OEM field string to be written +to the baseboard FRU Product area field 7. This field can be +any string up to 20 characters. + +.IP "-b" +Only show the Baseboard FRU data. The default behavior is to also scan +for any SDR FRU data or DIMM SPD data referenced by the SDRs. +.IP "-c" +Show FRU output in a canonical format, with a default delimiter of '|'. +.IP "-i 00" +This option specifies a specific FRU ID to show. The input value should be +in hex (0b, 1a, etc.), as shown from the sensor SDR output. +By default, all FRU IDs that are specified in the FRU locator SDRs are shown. +.IP "-m 002000" +Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-x" +Causes eXtra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are -E or -P. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ifwum.8 b/doc/ifwum.8 new file mode 100644 index 0000000..330811b --- /dev/null +++ b/doc/ifwum.8 @@ -0,0 +1,124 @@ +.TH IFWUM 8 "Version 1.0: 24 Aug 2010" +.SH NAME +ipmiutil_fwum \- Update IPMC using Kontron OEM Firmware Update Manager + +.SH SYNOPSIS +.B "ipmiutil fwum [-mixNUPREFJTVY] parameters" + +.SH DESCRIPTION +This +.I ipmiutil fwum +subcommand updates IPMC firmware using Kontron OEM Firmware Update Manager. + +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. +.IP "-i 00" +This option specifies a specific FRU ID to show. The input value should be +in hex (0b, 1a, etc.), as shown from the sensor SDR output. +The default FRU ID is zero (0). +.IP "-m 002000" +Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH PARAMETERS +\fIfwum\fP \fBparameters\fR +.RS + +.TP +\fIinfo\fP +.br +Show information about current firmware. + +.TP +\fIstatus\fP +.br +Show status of each firmware bank present in the hardware. + +.TP +\fIdownload\fP \fBfilename\fR +.br +Download the specified firmware image. + +.TP +\fIupgrade\fP [\fBfilename\fR] +.br +Install firmware upgrade. If the filename is specified, +the file is downloaded first, otherwise the last firmware +downloaded is used. + +.TP +\fIrollback\fP +.br +Ask IPMC to rollback to previous version. + +.TP +\fItracelog\fP +.br +Show the firmware upgrade log. + + +.SH "EXAMPLES" +ipmiutil fwum info +.br +Gets Firmware information +.PP +ipmiutil fwum \-N 192.168.1.1 \-U root \-P pswd download firmware.img +.br +Downloads the firmware version contained in firmware.img over IPMI LAN. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2010 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/igetevent.8 b/doc/igetevent.8 new file mode 100644 index 0000000..c5df169 --- /dev/null +++ b/doc/igetevent.8 @@ -0,0 +1,154 @@ +.TH IGETEVENT 8 "Version 1.2: 17 Feb 2010" +.SH NAME +ipmiutil_getevt \- wait for IPMI events +.SH SYNOPSIS +.B "ipmiutil getevt [-abosx -t secs -N node -U user -P/-R pswd -EFJTVY]" + +.SH DESCRIPTION +.I ipmiutil getevt +is a program that uses IPMI commands to +wait for IPMI events sent from the BMC firmware. These events are +also sent to the IPMI System Event Log (SEL). +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +Some server management functions want to trigger custom actions or +alerts when IPMI hardware-related events occur, but do not want to +track all events, just newly occurring events. +This utility waits a specified timeout period for any events, and +returns interpreted output for each event. It is designed as a +scriptable command-line utility, but if the timeout is infinite +(\-t 0), then this code could be used for a sample service as well. + +.br +There are several methods to do this which are implemented here. +.PP +The SEL method: +.br +This method polls the SEL once a second, keeps track of the last +SEL event read, and only new events are processed. This ensures +that in a series of rapid events, all events are received in order, +however, some transition-to-OK events may not be configured to +write to the SEL on certain platforms. +This method is used if getevent \-s is specified. +This is the only method supported over IPMI LAN, i.e. with \-N. +.PP +The ReadEventMessageBuffer method: +.br +This uses an IPMI Message Buffer in the BMC firmware to read +each new event. This receives any event, but if two events +occur nearly simultaneously, only the most recent of the two +will be returned with this method. An example of simultaneous +events might be, if a fan stops/fails, both the non-critical +and critical fan threshold events would occur at that time. +This is the default method for getevent. +.PP +The OpenIPMI custom method: +.br +Different IPMI drivers may have varying behavior. For instance, +the OpenIPMI driver uses the IPMI GetMessage commands internally +and does not allow client programs to use those commands. It has +its own custom mechanism, see getevent_mv(). +This method is used if the OpenIPMI driver is detected, and +no other method is specified. +.PP +The Async Event method: +.br +This only gets certain Asynchronous requests from the BMC to an +SMS OS service, like a remote OS shutdown, and get_software_id. +This method is disabled by default and only turned on if +the getevent \-a option is specified. This method is only +supported via the Intel IMB and OpenIPMI driver interfaces. +There is an init script provided with ipmiutil to automate the +task of starting this async event daemon. +.br +# chkconfig \-\-add ipmiutil_asy (skip this if no chkconfig) +.br +# /etc/init.d/ipmiutil_asy start +.br +This listens for IPMI LAN requests for soft-shutdown, and logs +the output to /var/log/ipmiutil_asy.log + +.SH OPTIONS +Command line options are described below. + +.IP "-a" +Use the Async request method, which receives SMS OS requests +from the BMC using the IMB or OpenIPMI driver interface. This services +remote SMS bridge agent requests, like remote OS shutdown and get software_id. +.IP "-b" +Run in Background as a daemon. If this option is specified, normal output +will be redirected to /var/log/ipmiutil_getevt.log. The default is to run +in foreground. +.IP "-c" +Show output in a canonical format, with a delimiter of '|'. +.IP "-e N" +Wait for a specific event sensor type N. +The parameter can be in hex (0x23) or decimal (35). +The default is 0xFF which means wait for any event. +.IP "-r F" +Run script file F when an event occurs. The filename can include a full path. +The script will be passed the event description as a parameter. +A sample evt.sh script is included with the ipmiutil package. +.IP "-o" +Only run one pass to wait for the first event. Default is to loop for multiple events for the timeout period. +.IP "-s" +Use the SEL method to get events. This polls the SEL once a second for new +events. The last SEL record read is saved in /usr/share/ipmiutil/evt.idx. +Otherwise, the default is to use the ReadEventMessageBuffer method +to get new events. +.IP "-t N" +Set the timeout period to N seconds. Default is 120 seconds. +A timeout of 0 means an infinite period. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ihealth.8 b/doc/ihealth.8 new file mode 100644 index 0000000..8d510f4 --- /dev/null +++ b/doc/ihealth.8 @@ -0,0 +1,93 @@ +.TH IHEALTH 8 "Version 1.1: 17 Feb 2010" +.SH NAME +ipmiutil_health\- show IPMI health +.SH SYNOPSIS +.B "ipmiutil health [-ifhglmnopqsx -N node -U user -P/-R pswd -EFJTVY]" + +.SH DESCRIPTION +.I ipmiutil health +is a program that uses IPMI commands to +show the health of the BMC. +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. + +.IP "-c" +Show canonical, delimited output. +.IP "-f" +Show the FRUSDR version also. +.IP "-g" +Show the IPMI GUID of this system. The GUID is a read-only unique identifier. +.IP "-h" +Check the health of the HotSwap Controller also. +.IP "-l" +Show the IPMI LAN channel statistics also. +.IP "-m 002000" +Target a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-n string" +Set the System Name to this string in the IPMI System Information. +.IP "-o string" +Set the Primary Operating System to this string in the IPMI System Information. +.IP "-p 1" +Set the chassis Power restore policy, governing the desired behavior when power was lost and is restored. Values: 0 = stay off, 1 = last state, 2 = always on. +.IP "-q string" +Set the Secondary Operating System to this string in the IPMI System Information. +.IP "-s" +Show the IPMI Session information also. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ihpm.8 b/doc/ihpm.8 new file mode 100644 index 0000000..1b93358 --- /dev/null +++ b/doc/ihpm.8 @@ -0,0 +1,185 @@ +.TH IHPM 8 "Version 1.0: 25 Aug 2010" +.SH NAME +ipmiutil_hpm \- PICMG HPM.1 Upgrade Agent + +.SH SYNOPSIS +.B "ipmiutil hpm [-mxNUPREFJTVY] parameters" + +.SH DESCRIPTION +This +.I ipmiutil hpm +subcommand updates HPM components using PICMG HPM.1 file + +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. +.IP "-m 002000" +Target a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH PARAMETERS +\fIhpm\fP \fBparameters\fR +.RS + +.TP +\fIcheck\fR +.br +Check the target information. + +.TP +\fIcheck\fP \fBfilename\fR +.br +Display both the existing target version and image version on the screen. + +.TP +\fIdownload\fP \fBfilename\fR +.br +Download specified firmware. + +.TP +\fIupgrade\fP \fBfilename\fR [\fBall\fR] [\fBcomponent x\fR] [\fBactivate\fR] +.br +Upgrade the firmware using a valid HPM.1 image file. If no option is specified, +the firmware versions are checked first and the firmware is upgraded only if they +are different. + +.RS +.TP +\fIall\fR +.br +Upgrade all components even if the firmware versions are the same +(use this only after using "check" command). + +.TP +\fIcomponent\fP \fBx\fR +.br +Upgrade only given component from the given file. +.br +component 0 - BOOT +.br +component 1 - RTK + +.TP +\fIactivate\fR +.br +Activate new firmware right away. + +.RE + +.TP +\fIactivate\fR +.br +Activate the newly uploaded firmware. + +.TP +\fItargetcap\fR +.br +Get the target upgrade capabilities. + +.TP +\fIcompprop\fP \fBid\fR \fBopt\fR +.br +Get the specified component properties. Valid component \fBid\fR: 0-7. +\fBOpt\fR can be one of following: +.br +0 - General properties +.br +1 - Current firmware version +.br +2 - Description string +.br +3 - Rollback firmware version +.br +4 - Deferred firmware version + +.TP +\fIabort\fR +.br +Abort the on-going firmware upgrade. + +.TP +\fIupgstatus\fR +.br +Show status of the last long duration command. + +.TP +\fIrollback\fR +.br +Perform manual rollback on the IPM Controller firmware. + +.TP +\fIrollbackstatus\fR +.br +Show the rollback status. + +.TP +\fIselftestresult\fR +.br +Query the self test results. + +.RE + +.SH "EXAMPLES" +ipmiutil hpm targetcap +.br +Gets HPM target capabilities +.PP +ipmiutil hpm \-N 192.168.1.1 \-U root \-P pswd download firmware.img +.br +Downloads the HPM firmware version contained in firmware.img over IPMI LAN. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2010 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ilan.8 b/doc/ilan.8 new file mode 100644 index 0000000..31b26ae --- /dev/null +++ b/doc/ilan.8 @@ -0,0 +1,305 @@ +.TH ILAN 8 "Version 1.8: 17 Feb 2010" +.SH NAME +ipmiutil_lan \- show and configure BMC LAN parameters and +set up a PEF entry to send BMC LAN Alerts for OS Critical Stop log events +.SH SYNOPSIS +.B "ipmiutil lan [-abcdefghijklmnopq#rstuvwxyzBDQK -i eth1 ]" + [\-I ipadr \-M macadr \-S subnet \-B baud_sol ] + [\-G gwyip \-H gwymac \-L lan_channel_num ] + [\-A alertip \-X alertmac \-C community ] + [\-u user_to_set \-p password_to_set ] + [\-N nodename \-U username \-Fimb ] + [\-P/\-R rmt_node_pswd \-EFJTVY ] + +.SH DESCRIPTION +.I ipmiutil lan +shows or sets all of the IPMI LAN Parameters to enable +remote LAN sessions or BMC LAN Alerts. The IP address and MAC address of +the local system, the default gateway, and the alert destination +can be defaulted to those specified in Linux, or can be overridden +by user parameters. +It also creates a new Platform Event Filter table entry for an OS Critical +Stop (0x20) SEL firmware log event, so that it will be enabled to send a +BMC LAN Alert. This utility will skip the PEF records if the system does +not support IPMI 1.5 or greater. +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. +Note that without options, ipmiutil lan behaves as if option \-r were used. +To configure IPMI LAN & PEF, use option \-e. + +.IP "-a alertnum" +Specify which PEF alert number is to be used. Default is 1. This would only +be used if extra PEF alert destinations had been set. +.IP "-b authmask" +Specify a certain authtype mask in hex to use when configuring this channel. +The default mask is 0x16, so to include authtype None (bit 0), it would +require entering '\-b 17'. +.IP "-c" +Show Canonical output, which shows only interpreted text and streamlines +the parameters shown, using a common delimiter. +.IP "-d" +This option disables the IPMI LAN and PEF parameters, so as not to allow BMC +LAN connections or alerts. This option also sets the IP address to zeros. +.IP "-e" +This option enables the BMC LAN configuration and PEF event alerts. +The utility will attempt to obtain the default BMC LAN parameters +from the OS automatically, or they can be specified with command +options below. +.IP "-f" +Set the ARP control parameter to 1 = gratuituous ARPs, 2 = ARP responses, +or 3 = both grat ARP and ARP responses. The default is 1. +.IP "-g" +This specifies the secondary gateway IP address to use for the BMC LAN. +The default is to omit this parameter and only use the default gateway. +See also \-G. +.IP "-h" +Set the IPMI VLAN ID to this value. Setting to a value >=4096 disables the +VLAN ID. The default behavior is not to set this parameter. +.IP "-i ethif" +By default, the eth0 interface is used to find IP and MAC addresses. +Sometimes, however, the first ethernet port on the baseboard may +be represented by Linux as eth1 or eth2 instead. If so, use this +option to indicate the correct ethernet interface to use. By default, +ipmiutil lan will scan up to 32 eth interfaces for the onboard one that +BMC LAN uses. +.IP "-j" +This sets a custom PEF rule as the last PEF entry. The input is +a series of 10 hex bytes, forming the PEF entry. For example, this +sample PEF entry would perform a power down action if the Baseboard Temp +reached its threshold. + "ipmiutil lan \-e \-j020110ffff013001950a" +.IP "-k" +This causes ipmiutil lan to also insert two rules to send alerts for +transition-to-OK events, including Power Redundancy OK and Temperature OK. +.IP "-l" +This option enables the BMC LAN configuration, but not PEF events. +The utility will attempt to obtain the default BMC LAN parameters +from the OS automatically, or they can be specified with command +options below. +.IP "-n num" +By default, the new PEF entry for OS Critical Stop is inserted at +offset 12 into the table. This can be changed to insert it at an +offset > 12 if another entry already exists at offset 12. +.IP "-o" +Disable Only SOL. This could be used after the IPMI LAN was configured, to +disable Serial-Over-LAN console access but still allow other IPMI LAN access. +.IP "-p password_to_set" +This specifies the firmware password to set for BMC LAN access. +If not specified, the user and password configuration will not be changed. +.IP "-q" +Specify an alternate user number for the LAN username from the \-u option. +This is normally user number 2, 3, or 4, where 2 is the default. +The maximum number of users is 15. Same as -# below. +.IP "-#" +Specify an alternate user number for the LAN username from the \-u option. +Same as \-q above. +.IP "-r" +This option just reads the configuration without writing any BMC LAN +parameters or writing any new entries to the PEF table. +.IP "-s" +This option will also display some of the Serial parameters. +.IP "-t" +Test if the BMC LAN has already been configured. Returns 0 if so. +.IP "-u username_to_set" +This specifies the firmware username to set for BMC LAN access. +If a username is specified, user 3 will be set. +If not specified, the default user 1 will be used. +.IP "-v priv" +Set a specific access priVilege for this user, where priv can be: +1=Callback, 2=User, 3=Operator, 4=Admin, 5=OEM, 15=NoAccess +The default if not specified or specified in error, is to use 4=Admin. +.IP "-w N" +Set the Gratuitous ARP Interval to N seconds. This has no effect if +the firmware does not support Grat-ARP, as shown in Lan Param 10. +If not set, the interval remains at the firmware default. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-y N" +Set the OEM LAN Failover parameter to N. Values for N with Intel Romley/S2600 baseboards: 1 = enable, 0 = disable. Values for N with SuperMicro baseboards: 2 = failover, 1 = lan1 , 0 = dedicated. +.IP "-z" +Also show the IPMI LAN Statistics +.IP "-A alert_ip_addr" +This specifies the SNMP Alert Destination IP address to use for the BMC LAN. +By default, this utility will attempt to obtain this from the +/etc/snmp/snmpd.conf file, via the trapsink parameter. +The alert destination will see the BMC LAN traps with the +enterprises.3183.1.1 OID. If no alert IP address is specified in either +snmpd.conf or this parameter, or if that IP address does not respond, +the other SNMP parameters for BMC LAN will be skipped. +.IP "-B baud_sol" +This specifies the Baud rate for SerialOverLan. The possible values are: +9600, 19.2k, 38.4k, 57.6k, and 115.2k. The default is 19.2k. +.IP "-C snmp_community" +This specifies the SNMP Community name to use for BMC LAN Alerts. +The default community string is "public". +This parameter is ignored if there is no Alert IP address. +.IP "-D " +This causes the local IP address to be determined by DHCP instead of a +static IP address. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-G gwy_ip_addr" +This specifies the default gateway IP address to use for the BMC LAN. +The default is to automatically obtain this from the Linux route table. +.IP "-H gwy_mac_addr" +This specifies the default gateway MAC address to use for the BMC LAN. +The format can be either 11:22:33:44:55:66 or 11-22-33-44-55-66. +The default is to try to automatically obtain this by sending an arp request +from an OS LAN eth interface: the default one, or as specified by \-i. +.IP "-K hostname" +This specifies the IPMI hostname to set, for Kontron servers only. +This enables the firmware to properly map the IP address to a hostname, +especially with the web interface. +The default is not to set this parameter, and use IP address only. +.IP "-I ip_addr" +This specifies the local IP address to use for the BMC LAN on eth0. +The default is to automatically obtain this from the Linux ifconfig. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-L lan_ch_num" +This specifies the IPMI LAN channel number used for BMC LAN. This varies +by platform, and can be found in the platform technical specifications. +For instance, Intel platforms usually use channels 1 & 2 for onboard NICs, +and channel 3 for optional RMM NICs. +By default, ipmiutil lan scans all IPMI channels to find the first LAN +channel for BMC LAN. +To just list all IPMI channels to see what is available, use the string 'list' +instead of a LAN channel number. This will list the channels and exit. +.IP "-M mac_addr" +This specifies the local MAC address to use for the BMC LAN on eth0. +The format can be either 11:22:33:44:55:66 or 11-22-33-44-55-66. +The default is to automatically obtain this from the Linux ifconfig. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P rmt_pswd" +Remote password for the nodename given. The default is a null password. +Same as \-R below. +.IP "-Q" +Set the IPMI VLAN Priority. The default priority is 0. +.IP "-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +Same as \-P above. +.IP "-S subnet" +This specifies the local subnet mask to use for the BMC LAN on eth0. +The default is to automatically obtain this from the Linux ifconfig. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, +4=Straight Password, 5=OEM. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, +3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-X alert_mac_addr" +This specifies the SNMP Alert Destinations's MAC address to use for the BMC LAN. +The format can be either 11:22:33:44:55:66 or 11-22-33-44-55-66. +The default is to attempt to obtain this from the Linux arp cache. +This parameter is ignored if there is no Alert IP address. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH EXAMPLES +To read existing settings: +.br +ipmiutil lan \-r +.PP +To enable IPMI LAN with default settings detected, assuming shared MAC/IP: +.br +ipmiutil lan \-e +.PP +To set up IPMI LAN for a unique IP address and set PEF SNMP Alerts: +.br +ipmiutil lan \-e \-I 192.168.1.1 \-A 192.168.1.10 +.PP +To set the IPMI LAN password for the default user: +.br +ipmiutil lan \-e \-p mypassword +.PP +To disable access to the IPMI LAN channel: +.br +ipmiutil lan \-d + +.SH "SAMPLE PEF TABLE" +These 11 PEF table entries are configured from the factory for various +Intel Sahalee BMC systems, and will be applied as the defaults for a +system with an empty PEF table: +.br +PEF(01): 01 Temperature Sensor event - enabled for alert +.br +01 c0 01 01 00 ff ff 01 ff 01 95 0a 00 00 00 00 00 00 00 00 00 +.br +PEF(02): 02 Voltage Sensor event - enabled for alert +.br +02 c0 01 01 00 ff ff 02 ff 01 95 0a 00 00 00 00 00 00 00 00 00 +.br +PEF(03): 04 Fan Failure event - enabled for alert +.br +03 c0 01 01 00 ff ff 04 ff 01 95 0a 00 00 00 00 00 00 00 00 00 +.br +PEF(04): 05 Chassis Intrusion event - enabled for alert +.br +04 c0 01 01 00 ff ff 05 05 6f 01 00 00 00 00 00 00 00 00 00 00 +.br +PEF(05): 08 Power Supply Fault event - enabled for alert +.br +05 c0 01 01 00 ff ff 08 ff 6f 06 00 00 00 00 00 00 00 00 00 00 +.br +PEF(06): 0c Memory ECC Error event - enabled for alert +.br +06 c0 01 01 00 ff ff 0c 08 6f 02 00 00 00 00 00 00 00 00 00 00 +.br +PEF(07): 0f FRB Failure event - enabled for alert +.br +07 c0 01 01 00 ff ff 0f 06 6f 01 00 00 00 00 00 00 00 00 00 00 +.br +PEF(08): 07 BIOS POST Error event - enabled for alert +.br +08 c0 01 01 00 ff ff 07 ff 6f 1c 00 00 00 00 00 00 00 00 00 00 +.br +PEF(09): 13 Fatal NMI event - enabled for alert +.br +09 c0 01 01 00 ff ff 13 ff 6f 3e 03 00 00 00 00 00 00 00 00 00 +.br +PEF(10): 23 Watchdog Timer Reset event - enabled for alert +.br +0a c0 01 01 00 ff ff 23 03 6f 0e 00 00 00 00 00 00 00 00 00 00 +.br +PEF(11): 12 System Restart event - enabled for alert +.br +0b c0 01 01 00 ff ff 12 ff 6f 02 00 00 00 00 00 00 00 00 00 00 + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ipicmg.8 b/doc/ipicmg.8 new file mode 100644 index 0000000..0f4523f --- /dev/null +++ b/doc/ipicmg.8 @@ -0,0 +1,157 @@ +.TH IPICMG 8 "Version 1.0: 04 Jun 2010" +.SH NAME +ipmiutil_picmg \- send specific PICMG extended IPMI commands + +.SH SYNOPSIS +.B "ipmiutil picmg [-mixNUPREFJTVY] parameters" + +.SH DESCRIPTION +This +.I ipmiutil picmg +subcommand sends specific PICMG/ATCA extended IPMI commands to the firmware. + +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. +.IP "-i 00" +This option specifies a specific FRU ID to show. The input value should be +in hex (0b, 1a, etc.), as shown from the sensor SDR output. +The default FRU ID is zero (0). +.IP "-m 002000" +Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH PARAMETERS +\fIpicmg\fP \fBparameters\fR +.RS + +.TP +\fIproperties\fP +Get PICMG properties may be used to +obtain and print Extension major version information, PICMG identifier, +FRU Device ID and Max FRU Device ID. + +.TP +\fIaddrinfo\fP +.br + +Get address information. This command may return information on the Hardware +address, IPMB-0 Address, FRU ID, Site/Entity ID, and Site/Entity Type. +.TP +\fIfrucontrol\fP \fBfru id\fR \fBoptions\fR +.br + +Set various control options: +.RS +.TP +\fI0x00\fP - Cold Reset +.br +.TP +\fI0x01\fP - Warm Reset +.br +.TP +\fI0x02\fP - Graceful Reboot +.br +.TP +\fI0x03\fP - Issue Diagnostic Interrupt +.br +.TP +\fI0x04\fP - Quiesce [AMC only] +.br +.TP +\fI0x05-0xFF\fP - Cold Reset +.br +.RE +.TP +\fIactivate\fP \fBfru id\fR +.br + +Activate the specified FRU. +.TP +\fIdeactivate\fP \fBfru id\fR +.br + +Deactivate the specified FRU. +.TP +\fIpolicy\fP \fIget\fP \fBfru id\fR +.br + +Get FRU activation policy. +.TP +\fIpolicy\fP \fIset\fP \fBfru id\fR \fBlockmask\fR \fBlock\fR +.br + +Set FRU activation policy. \fBlockmask\fR is 1 or 0 to indicate action +on the deactivation or activation locked bit respectively. \fBlock\fR is +1 or 0 to set/clear locked bit. +.TP +\fIportstate\fP \fBset\fR|\fBgetall\fR|\fBgetgranted\fR|\fBgetdenied\fR \fBparameters\fR +.br + +Get or set various port states. See usage for parameter details. + + + +.SH "EXAMPLES" +ipmiutil picmg properties +.br +Gets PICMG properties from the default target address (slave address 0x20). +.PP +ipmiutil picmg \-N 192.168.1.1 \-U root \-P pswd addrinfo +.br +Gets PICMG Address Information from the specified IP address. + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2010 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ipmi_port.8 b/doc/ipmi_port.8 new file mode 100644 index 0000000..15287e2 --- /dev/null +++ b/doc/ipmi_port.8 @@ -0,0 +1,44 @@ +.TH IPMI_PORT 8 "Version 1.0: 14 Apr 2010" +.SH NAME +ipmi_port \- a daemon to bind RMCP port 623 to prevent portmap from using it + +.SH SYNOPSIS +.B "ipmi_port [-bx]" + +.SH DESCRIPTION +This +.I ipmi_port +service starts and binds port 623, then sleeps forever, so that the portmap +service will not try to reuse port 623, which it otherwise might try to do. +Since the IPMI firmware snoops the NIC channel and grabs any traffic destined +for RMCP port 623, any application in the OS which tried to use port 623 +would fail. + +.SH OPTIONS +Command line options are described below. +.IP "-b" +Background mode. Convert to a daemon and run in background. +Without specifying this option, ipmi_port will run in foreground. +.IP "-x" +Causes eXtra debug messages to be displayed. + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ipmiutil.8 b/doc/ipmiutil.8 new file mode 100644 index 0000000..24d0a3a --- /dev/null +++ b/doc/ipmiutil.8 @@ -0,0 +1,116 @@ +.TH IPMIUTIL 8 "Version 1.1: 10 May 2012" +.SH NAME +ipmiutil \- a meta-command to invoke various IPMI functions. + +.SH SYNOPSIS +.B "ipmiutil [-x -NUPREFJTVY] [other command options] + +.SH DESCRIPTION +This utility performs various IPMI functions. Each of the individual +commands in the ipmiutil project can be invoked via this meta-command. +The is one of the following: + alarms show/set the front panel alarm LEDs and relays + leds show/set the front panel alarm LEDs and relays + cmd send a specified raw IPMI command to the BMC + config list/save/restore BMC configuration parameters + dcmi get/set DCMI parameters + discover discover all IPMI servers on this LAN + ekanalyzer run FRU-EKeying analyzer on FRU files (deprecated, see fru) + events decode IPMI events and display them + firewall show/set firmware firewall functions + fru show decoded FRU inventory data, write asset tag + fwum OEM firmware update manager extensions + getevt get IPMI events and display them, event daemon + getevent get IPMI events and display them, event daemon + health check and show the basic health of the IPMI BMC + hpm HPM firmware update manager extensions + lan show/set IPMI LAN parameters and PEF table + picmg show/set picmg extended functions + reset cause the BMC to reset or power down the system + sel show/clear firmware System Event Log records + sensor show Sensor Data Records, readings, thresholds + serial show/set IPMI Serial & Terminal Mode parameters + sol start/stop an SOL console session + smcoem SuperMicro OEM functions + sunoem Sun OEM functions + delloem Dell OEM functions + tsol Tyan SOL console start/stop session + wdt show/set/reset the watchdog timer +.br +For help on each command (e.g. 'sel'), enter: + ipmiutil sel -? +.br +For man pages on each command, its man page is named "i", +or refer to SEE ALSO below. + +.br +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N is used. + +.SH OPTIONS +Command options are described in the man page for each command. +Below are a few of the common options. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH "EXAMPLES" +ipmiutil sel +.br +Shows the IPMI System Event Log entries. +.PP +ipmiutil wdt +.br +Shows the watchdog timer values. +.PP + +.SH "SEE ALSO" +ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifirewall(8) +ifru(8) ifruset(8) ifwum(8) igetevent(8) ihealth(8) ihpm(8) +ilan(8) ipicmg(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) isunoem(8) +iwdt(8) ipmiutil(8) ipmi_port(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec new file mode 100644 index 0000000..cd849f2 --- /dev/null +++ b/doc/ipmiutil.spec @@ -0,0 +1,424 @@ +# spec file for package ipmiutil +# +# Copyright (c) 2012 Andy Cress +# +Name: ipmiutil +Version: 2.9.3 +Release: 1%{?dist} +Summary: Easy-to-use IPMI server management utilities +License: BSD +Group: System/Management +Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +URL: http://ipmiutil.sourceforge.net +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +# Suggests: cron or vixie-cron or cronie or similar +%if 0%{?fedora} >= 15 +BuildRequires: systemd +Requires: systemd-units +%endif +%if 0%{?suse_version} >= 1210 +%define req_systemd 1 +%endif +%if 0%{?req_systemd} +BuildRequires: openssl-devel gcc gcc-c++ libtool systemd +%define unit_dir %{_unitdir} +%define systemd_fls %{unit_dir} +# Requires: %{?systemd_requires} +%else +BuildRequires: openssl-devel gcc gcc-c++ libtool +%if 0%{?fedora} == 16 +%define unit_dir /lib/systemd/system +%else +%define unit_dir %{_unitdir} +%endif +%define systemd_fls %{_datadir}/%{name} +%endif +%define init_dir %{_initrddir} + +%description +The ipmiutil package provides easy-to-use utilities to view the SEL, +perform an IPMI chassis reset, set up the IPMI LAN and Platform Event Filter +entries to allow SNMP alerts, Serial-Over-LAN console, event daemon, and +other IPMI tasks. +These can be invoked with the metacommand ipmiutil, or via subcommand +shortcuts as well. IPMIUTIL can also write sensor thresholds, FRU asset tags, +and has a full IPMI configuration save/restore. +An IPMI driver can be provided by either the OpenIPMI driver (/dev/ipmi0) +or the Intel IPMI driver (/dev/imb), etc. If used locally and no driver is +detected, ipmiutil will use user-space direct I/Os instead. + +%package devel +Group: Development/Libraries +Summary: Includes libraries and headers for the ipmiutil package +Provides: ipmiutil-static = %{version}-%{release} + +%description devel +The ipmiutil-devel package contains headers and libraries which are +useful for building custom IPMI applications. + +%prep +%setup -q + +%build +%if 0%{?fedora} >= 15 +autoconf +%endif +%if 0%{?req_systemd} +%configure --enable-systemd +%else +%configure +%endif +make + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-, root, root, -) +%dir %{_datadir}/%{name} +%dir %{_var}/lib/%{name} +%{_bindir}/ipmiutil +%{_bindir}/idiscover +%{_bindir}/ievents +%{_sbindir}/iseltime +%{_sbindir}/ipmi_port +%{_sbindir}/ialarms +%{_sbindir}/iconfig +%{_sbindir}/icmd +%{_sbindir}/ifru +%{_sbindir}/igetevent +%{_sbindir}/ihealth +%{_sbindir}/ilan +%{_sbindir}/ireset +%{_sbindir}/isel +%{_sbindir}/isensor +%{_sbindir}/iserial +%{_sbindir}/isol +%{_sbindir}/iwdt +%{_sbindir}/ipicmg +%{_sbindir}/ifirewall +%{_sbindir}/ifwum +%{_sbindir}/ihpm +%{_datadir}/%{name}/ipmiutil_evt +%{_datadir}/%{name}/ipmiutil_asy +%{_datadir}/%{name}/ipmiutil_wdt +%{_datadir}/%{name}/ipmi_port +%{_datadir}/%{name}/ipmi_info +%{_datadir}/%{name}/checksel +%{systemd_fls}/ipmiutil_evt.service +%{systemd_fls}/ipmiutil_asy.service +%{systemd_fls}/ipmiutil_wdt.service +%{systemd_fls}/ipmi_port.service +%{_datadir}/%{name}/ipmiutil.env +%{_datadir}/%{name}/ipmiutil.pre +%{_datadir}/%{name}/ipmiutil.setup +%{_datadir}/%{name}/ipmi_if.sh +%{_datadir}/%{name}/evt.sh +%{_datadir}/%{name}/ipmi.init.basic +%{_datadir}/%{name}/bmclanpet.mib +%{_mandir}/man8/isel.8* +%{_mandir}/man8/isensor.8* +%{_mandir}/man8/ireset.8* +%{_mandir}/man8/igetevent.8* +%{_mandir}/man8/ihealth.8* +%{_mandir}/man8/iconfig.8* +%{_mandir}/man8/ialarms.8* +%{_mandir}/man8/iwdt.8* +%{_mandir}/man8/ilan.8* +%{_mandir}/man8/iserial.8* +%{_mandir}/man8/ifru.8* +%{_mandir}/man8/icmd.8* +%{_mandir}/man8/isol.8* +%{_mandir}/man8/ipmiutil.8* +%{_mandir}/man8/idiscover.8* +%{_mandir}/man8/ievents.8* +%{_mandir}/man8/ipmi_port.8* +%{_mandir}/man8/ipicmg.8* +%{_mandir}/man8/ifirewall.8* +%{_mandir}/man8/ifwum.8* +%{_mandir}/man8/ihpm.8* +%{_mandir}/man8/isunoem.8* +%{_mandir}/man8/idelloem.8* +%{_mandir}/man8/ismcoem.8* +%{_mandir}/man8/iekanalyzer.8* +%{_mandir}/man8/itsol.8* +%{_mandir}/man8/idcmi.8* +%doc AUTHORS ChangeLog COPYING NEWS README TODO +%doc doc/UserGuide + +%files devel +%defattr(-,root,root) +# %{_datadir}/%{name} is used by both ipmiutil and ipmituil-devel +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/ipmi_sample.c +%{_datadir}/%{name}/ipmi_sample_evt.c +%{_datadir}/%{name}/isensor.c +%{_datadir}/%{name}/ievents.c +%{_datadir}/%{name}/isensor.h +%{_datadir}/%{name}/ievents.h +%{_datadir}/%{name}/Makefile +%{_includedir}/ipmicmd.h +%{_libdir}/libipmiutil.a +%{_libdir}/libipmiutil.so + + +%pre +%if 0%{?req_systemd} +%service_add_pre ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +%endif + +%post +# POST_INSTALL, $1 = 1 if rpm -i, $1 = 2 if rpm -U +if [ "$1" = "1" ] +then + # doing rpm -i, first time + vardir=%{_var}/lib/%{name} + scr_dir=%{_datadir}/%{name} + +%if 0%{?req_systemd} +%service_add_post ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +%else + if [ -x /bin/systemctl ]; then + echo "IINITDIR=%{init_dir}" >>%{_datadir}/%{name}/ipmiutil.env + cp -f ${scr_dir}/ipmiutil_evt.service %{unit_dir} + cp -f ${scr_dir}/ipmiutil_asy.service %{unit_dir} + cp -f ${scr_dir}/ipmiutil_wdt.service %{unit_dir} + cp -f ${scr_dir}/ipmi_port.service %{unit_dir} + # systemctl enable ipmi_port.service >/dev/null 2>&1 || : + else + cp -f ${scr_dir}/ipmiutil_wdt %{init_dir} + cp -f ${scr_dir}/ipmiutil_asy %{init_dir} + cp -f ${scr_dir}/ipmiutil_evt %{init_dir} + cp -f ${scr_dir}/ipmi_port %{init_dir} + cp -f ${scr_dir}/ipmi_info %{init_dir} + fi +%endif + + # Run some ipmiutil command to see if any IPMI interface works. + %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 || : + IPMIret=$? + # If IPMIret==0, the IPMI cmd was successful, and IPMI is enabled locally. + if [ $IPMIret -eq 0 ]; then + # If IPMI is enabled, automate managing the IPMI SEL + if [ -d %{_sysconfdir}/cron.daily ]; then + cp -f %{_datadir}/%{name}/checksel %{_sysconfdir}/cron.daily + fi + # IPMI_IS_ENABLED, so enable services, but only if Red Hat + if [ -f /etc/redhat-release ]; then + if [ -x /bin/systemctl ]; then + touch ${scr_dir}/ipmi_port.service + elif [ -x /sbin/chkconfig ]; then + /sbin/chkconfig --add ipmi_port + /sbin/chkconfig --add ipmiutil_wdt + /sbin/chkconfig --add ipmiutil_evt + /sbin/chkconfig --add ipmi_info + fi + fi + + # Capture a snapshot of IPMI sensor data once now for later reuse. + sensorout=$vardir/sensor_out.txt + if [ ! -f $sensorout ]; then + %{_bindir}/ipmiutil sensor -q >$sensorout || : + if [ $? -ne 0 ]; then + # remove file if error, try again in ipmi_port on reboot. + rm -f $sensorout + fi + fi + fi +else + # postinstall, doing rpm update + %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 || : + if [ $? -eq 0 ]; then + if [ -d %{_sysconfdir}/cron.daily ]; then + cp -f %{_datadir}/%{name}/checksel %{_sysconfdir}/cron.daily + fi + fi +fi +%if 0%{?fedora} >= 18 +%systemd_post ipmiutil_evt.service +%systemd_post ipmiutil_asy.service +%systemd_post ipmiutil_wdt.service +%systemd_post ipmi_port.service +%endif + +%preun +# before uninstall, $1 = 1 if rpm -U, $1 = 0 if rpm -e +if [ "$1" = "0" ] +then +%if 0%{?req_systemd} +%service_del_preun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +%else + if [ -x /bin/systemctl ]; then + if [ -f %{unit_dir}/ipmiutil_evt.service ]; then +%if 0%{?fedora} >= 18 +%systemd_preun ipmiutil_evt.service +%systemd_preun ipmiutil_asy.service +%systemd_preun ipmiutil_wdt.service +%systemd_preun ipmi_port.service +%else + systemctl disable ipmi_port.service >/dev/null 2>&1 || : + systemctl disable ipmiutil_evt.service >/dev/null 2>&1 || : + systemctl disable ipmiutil_asy.service >/dev/null 2>&1 || : + systemctl disable ipmiutil_wdt.service >/dev/null 2>&1 || : + systemctl stop ipmiutil_evt.service >/dev/null 2>&1 || : + systemctl stop ipmiutil_asy.service >/dev/null 2>&1 || : + systemctl stop ipmiutil_wdt.service >/dev/null 2>&1 || : + systemctl stop ipmi_port.service >/dev/null 2>&1 || : +%endif + fi + else + if [ -x /sbin/service ]; then + /sbin/service ipmi_port stop >/dev/null 2>&1 || : + /sbin/service ipmiutil_wdt stop >/dev/null 2>&1 || : + /sbin/service ipmiutil_asy stop >/dev/null 2>&1 || : + /sbin/service ipmiutil_evt stop >/dev/null 2>&1 || : + fi + if [ -x /sbin/chkconfig ]; then + /sbin/chkconfig --del ipmi_port >/dev/null 2>&1 || : + /sbin/chkconfig --del ipmiutil_wdt >/dev/null 2>&1 || : + /sbin/chkconfig --del ipmiutil_asy >/dev/null 2>&1 || : + /sbin/chkconfig --del ipmiutil_evt >/dev/null 2>&1 || : + fi + fi +%endif + if [ -f %{_sysconfdir}/cron.daily/checksel ]; then + rm -f %{_sysconfdir}/cron.daily/checksel + fi +fi + +%postun +%if 0%{?req_systemd} +%service_del_postun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +%else +if [ -x /bin/systemctl ]; then +%if 0%{?fedora} >= 18 +%systemd_postun_with_restart ipmi_port.service +%else + systemctl daemon-reload || : + if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + systemctl try-restart ipmi_port.service || : + fi +%endif + if [ -f %{unit_dir}/ipmiutil_evt.service ]; then + rm -f %{unit_dir}/ipmiutil_evt.service 2>/dev/null || : + rm -f %{unit_dir}/ipmiutil_asy.service 2>/dev/null || : + rm -f %{unit_dir}/ipmiutil_wdt.service 2>/dev/null || : + rm -f %{unit_dir}/ipmi_port.service 2>/dev/null || : + fi +else + if [ -f %{init_dir}/ipmiutil_evt.service ]; then + rm -f %{init_dir}/ipmiutil_wdt 2>/dev/null || : + rm -f %{init_dir}/ipmiutil_asy 2>/dev/null || : + rm -f %{init_dir}/ipmiutil_evt 2>/dev/null || : + rm -f %{init_dir}/ipmi_port 2>/dev/null || : + fi +fi +%endif + +%changelog +* Tue Aug 21 2012 Andrew Cress 2.8.5-2 + Added F18 systemd macros for RH bug #850163 +* Fri May 04 2012 Andrew Cress 2.8.4-1 + Fixups for devel rpm (RH bug #818910) +* Tue Apr 24 2012 Andrew Cress 2.8.3-1 + Use service_* macros if req_systemd is set +* Thu Mar 08 2012 Andrew Cress 2.8.2-1 + reworked systemd logic/macros, moved ipmiutil from sbindir to bindir +* Mon Dec 12 2011 Andrew Cress 2.8.0-1 + added devel package files +* Fri Nov 11 2011 Andrew Cress 2.7.9-3 + fix RH bug #752319 to not copy checksel to cron.daily if IPMI not enabled +* Tue Sep 13 2011 Andrew Cress 2.7.8-1 + added systemd scripts, added idelloem.8 +* Mon Jun 06 2011 Andrew Cress 2.7.7-1 + add gcc,gcc-c++ to BuildRequires to detect broken build systems +* Mon May 09 2011 Andrew Cress 2.7.6-1 + updated ipmiutil +* Fri Nov 12 2010 Andrew Cress 2.7.3-1 + updated package description +* Fri Oct 15 2010 Andrew Cress 2.7.1-1 + skip chkconfig --add if not Red Hat +* Mon Sep 27 2010 Andrew Cress 2.7.0-1 + added fwum, hpm, sunoem, ekanalyzer man pages +* Mon Jul 19 2010 Andrew Cress 2.6.8-1 + cleaned up two more rpmlint issues +* Mon Jul 12 2010 Andrew Cress 2.6.7-1 + cleaned up some rpmlint issues, include ipmiutil_evt in chkconfig's +* Thu Apr 29 2010 Andrew Cress 2.6.4-1 + cleaned up some style issues +* Fri Mar 5 2010 Andrew Cress 2.6.1-1 + cleaned up some style issues +* Tue Feb 16 2010 Andrew Cress 2.6.0-1 + cleaned up some script clutter, changed naming scheme for sub-commands +* Tue Jan 26 2010 Andrew Cress 2.5.3-1 + cleaned up some rpmlint issues, removed bmclanaol.mib +* Mon Nov 9 2009 Andrew Cress 2.5.1-1 + do not gzip man files, clean up scripts, move distro specifics to configure +* Tue Jun 23 2009 Andrew Cress 2.4.0-1 + moved all progs to sbin, install init/cron scripts via files not post +* Wed Dec 10 2008 Andrew Cress 2.3.2-1 + changes for Fedora with ipmiutil-2.3.2 +* Fri Jun 08 2007 Andrew Cress + rpmlint tweaks for ipmiutil-1.9.8 +* Mon May 21 2007 Andrew Cress + added isroot flag for chroot cases +* Mon May 18 2007 Andrew Cress + added ipmi_port init handling +* Mon Jul 10 2006 Andrew Cress + changed to libfreeipmi.so.2, include and run ipmi_if.sh +* Tue Aug 02 2005 Andrew Cress + changed not to run pefconfig if already configured +* Wed Feb 03 2005 Andrew Cress + changed /usr/man to /usr/share/man, + fixed postun to recognize rpm -U via arg 1 +* Mon Nov 1 2004 Andrew Cress + added freeipmi install files and logic +* Tue Aug 23 2004 Andrew Cress +- added MIB links to /usr/share/snmp/mibs +* Tue Aug 10 2004 Andrew Cress +- added icmd utility to the rpm +* Thu Aug 05 2004 Andrew Cress +- added special logic for SuSE snmpd.conf +* Fri Apr 02 2004 Andrew Cress +- added checksel cron job +* Tue Jan 28 2003 Andrew Cress +- added sensor & fruconfig for ipmiutil 1.2.8 +* Tue Aug 2 2002 Andrew Cress +- fixed bug 793 (dont need Require:ipmidrvr) for ipmiutil 1.2.2 +* Tue Jul 2 2002 Andrew Cress +- fixed bug 555 in showsel for ipmiutil 1.2.1 +* Fri May 10 2002 Andrew Cress +- fixed bug 504 in pefconfig for ipmiutil 1.1.5 +* Thu Apr 11 2002 Andrew Cress +- updated pathnames for ipmiutil 1.1.4, some cleanup +* Mon Mar 18 2002 Andrew Cress +- updated for 1.1.3-2, added checking for grub vs. lilo to .spec +* Tue Mar 12 2002 Andrew Cress +- updated for 1.1.3, added source rpm, changed license, etc. +* Thu Jan 31 2002 Andrew Cress +- updated for 1.1.0-2, changed selpef to pefconfig +* Thu Jan 25 2002 Andrew Cress +- updated for 1.1.0, changed to ipmidrvr rather than isc dependency +* Thu Jan 16 2002 Andrew Cress +- updated for 1.1.0, added hwreset utility +* Thu Dec 14 2001 Andrew Cress +- updated for 1.0.0, man page updates +* Thu Nov 19 2001 Andrew Cress +- updated for 0.9.0, uses new OSS bmc_panic, so don't install module. +* Thu Nov 13 2001 Andrew Cress +- updated for 0.8.5, add "Requires: isc" (#32), hide selpef output (#38) +* Thu Nov 8 2001 Andrew Cress +- updated for 0.8.4, eliminate "file exists" messages by fixing removal +* Thu Oct 25 2001 Andrew Cress +- updated for 0.8.2, run selpef (objdump:applypatch gives bogus warning) +* Thu Oct 25 2001 Andrew Cress +- updated for 0.8.2, run selpef (objdump:applypatch gives bogus warning) +* Wed Oct 24 2001 Andrew Cress +- created ipmiutil package 0.8.1 without kbuild +* Tue Oct 23 2001 Andrew Cress +- created ipmiutil package 0.8.0 diff --git a/doc/ireset.8 b/doc/ireset.8 new file mode 100644 index 0000000..a018000 --- /dev/null +++ b/doc/ireset.8 @@ -0,0 +1,118 @@ +.TH IRESET 8 "Version 1.5: 01 Jul 2011" +.SH NAME +ipmiutil_reset \- perform a hardware reset on the system +.SH SYNOPSIS +.B "ipmiutil reset [-bcdDefhijmnoprsuwxy -N node -U user -P/-R pswd -EFJTVY]" + +.SH DESCRIPTION +.I ipmiutil reset +is a program that uses IPMI commands to +perform a hardware reset of the chassis, or boot to a specific +device. +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. +.IP "-c" +Power Cycle the system chassis +.IP "-d" +Power Down the system chassis +.IP "-n" +Send NMI to the system +.IP "-u" +Power Up the system chassis +.IP "-r" +Hard Reset the system chassis +.IP "-D" +Do a soft shutdown of the OS, and then power down. +Note that remote soft shutdown (\-D \-N) for Intel S5000 baseboard requires +ipmiutil getevt \-a running on the target server. +.IP "-o" +Do a soft shutdown of the OS, and then reset. +Note that remote soft shutdown (\-o \-N) for Intel S5000 baseboard requires +ipmiutil getevt \-a running on the target server. +.IP "-k" +Do a cold reset to restart the BMC firmware. +.IP "-m 002000s" +Perform these function for a specific MC (e.g. bus 00, sa 20, lun 00). +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-b" +Do a hard reset and reboot to the BIOS Setup menu, for this reboot only. +.IP "-e" +Do a hard reset to EFI, if IPMI EFI boot is enabled, for this reboot only. +.IP "-f" +Do a hard reset to Floppy/Removable, for this reboot only. +.IP "-h" +Do a hard reset to a Hard Disk, for this reboot only. +.IP "-i" +Set the boot Initiator mailbox string, usually for PXE use. +The string must be less than 78 characters. +.IP "-j" +Set the IANA number used for the boot Initiator mailbox string. +.IP "-p" +Do a hard reset and network boot to PXE server, for this reboot only. +.IP "-s" +Do a hard reset and reboot to the Service/Diagnostic Partition, for this +reboot only. Reboots to the default if no service partition is configured. +.IP "-v" +Do a hard reset to DVD/CDROM Media, for this reboot only. +.IP "-w" +Wait for BMC ready after a reset before exiting the utility. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-y" +Yes, try to persist any boot options used [\-befhprsv]. This requires the IPMI +firmware to ask the BIOS to change boot order settings, so it may not +be supported by all BMC firmware vendors. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) isel(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/isel.8 b/doc/isel.8 new file mode 100644 index 0000000..a765e32 --- /dev/null +++ b/doc/isel.8 @@ -0,0 +1,137 @@ +.TH ISEL 8 "Version 1.4: 17 Feb 2010" +.SH NAME +ipmiutil_sel \- show firmware System Event Log records +.SH SYNOPSIS +.B "ipmiutil sel [-abcflswvx -N node -P/-R pswd -U user -EFJTVY]" + +.SH DESCRIPTION +.I ipmiutil sel +is a program that uses IPMI commands to +to read and display the System Event Log (SEL) which +is stored by the BMC firmware. IPMI commands are issued +to read each record, and, if specified, incrementally write +records that have not previously been read into the +Linux syslog (/var/log/messages). +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. + +.IP "-a string" +Add a SEL record with a string of up to 13 characters. Longer strings will +be truncated. Note that this should be used sparingly, but would be useful +for changes made to the hardware or firmware environment, like "Fan replaced" +or "flash FW2.1". + +.IP "-b bin_file" +Interpret a file containing raw binary/hex SEL data dumped in binary form, +such as that produced by "ipmitool sel writeraw bin_file". +Each set of 16 bytes in the file will be interpreted as an IPMI event. + +.IP "-c" +Show output in a canonical format, with a default delimiter of '|'. +(same as \-n). + +.IP "-d" +Deletes/Clears the SEL of all records. +If the SEL becomes full (free space = 0), it no longer accepts new records, +so the SEL should be cleared periodically (use checksel cron script). + +.IP "-e" +Show Extended sensor descriptions for events if run locally. +This option will attempt to get the full sensor description from +/var/lib/ipmiutil/sensor_out.txt, and also use its SDR to decode any raw +threshold values in the event, if present. + +.IP "-f sel_file" +Interpret a file containing raw ascii text SEL data captured with +ipmiutil sel \-r, or some other similar utility. +Each line in the file should be in this +form, with no leading spaces: +.br +04 00 02 76 a9 4a 47 20 00 04 10 09 6f 42 0f ff +.br +Lines not in this format will be ignored. + +.IP "-l N" +Show last N SEL records, in reverse order (newest first). +For some BMC implementations, this may not show all N records specified. +.IP "-n" +Show output in a nominal/canonical format, with a default delimiter of '|'. +(same as \-c). +.IP "-r" +Show the 16 raw hex bytes for each SEL entry. The default is to display +interpreted entries, and include relevant hex event bytes. +.IP "-p" +By default, all SEL records are displayed. This option +causes only the Panic events with sensor_type = 0x20 (OS Critical Stop) +to be displayed. +.IP "-s N" +Show only SEL events with severity N or greater. Severity 0=INF, 1=MIN, +2=MAJ, 3=CRT. The default is to show all SEL events. +.IP "-u" +Show the SEL time as UTC and also get the SEL Time UTC offset if that +command is supported. The default is to convert the SEL Time to local time. +.IP "-v" +Only show the version information. This shows: the ipmiutil sel utility +version, the BMC version, the IPMI version, the SEL version, and the amount +of free space in the SEL. +.IP "-w" +This option writes SEL records to the Linux syslog (/var/log/messages) +or Windows Application Log. It only writes SEL records that have +timestamps newer than the last record written to syslog. +It saves the last timestamp in an index file named +/usr/share/ipmiutil/sel.idx (.\\sel.idx in Windows). +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isensor(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any +bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/iseltime.8 b/doc/iseltime.8 new file mode 100644 index 0000000..eb9a705 --- /dev/null +++ b/doc/iseltime.8 @@ -0,0 +1,79 @@ +.TH ISELTIME 8 "Version 1.0: 01 Apr 2013" +.SH NAME +iseltime \- synchronize BMC SEL time with OS system time +.SH SYNOPSIS +.B "seltime [-sx -NUPRETVF]" + +.SH DESCRIPTION +.I seltime +is a program that uses IPMI commands to +set the BMC SEL time from the OS system time. +The OS system time should be in sync with the BIOS Real-Time-Clock. +The OS system time may also be kept from drifting via an NTP server. +Normally the BIOS will set the BMC time from the RTC during boot, but +running this command may be necessary periodically if the system +does not reboot for many weeks, for instance. +Note that this command should not be run too frequently to avoid +BMC timing issues. Once per day should be sufficient. + +Run with no options, this command reads the BMC SEL time without +setting anything. + +This utility can use either the /dev/ipmi0 openipmi driver, +the /dev/imb Intel driver, the /dev/ipmikcs valinux driver, +a driverless interface, or IPMI LAN. + +.SH OPTIONS +.IP "-s" +Sets the SEL time (no more than once a day). +.IP "-x" +Causes eXtra debug messages to be displayed. + +.IP "-N nodename" +Nodename of the remote target system. If a nodename is specified, +IPMI LAN interface is used. Otherwise the local system management +interface is used. +.IP "-P/-R password" +Remote password for the nodename given. The default is a null password. +.IP "-U username" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 14): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are -E or -P. + + +.SH "SEE ALSO" +ipmiutil(8) isel(8) ievents(8) icmd(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2013 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/isensor.8 b/doc/isensor.8 new file mode 100644 index 0000000..dcfdd1a --- /dev/null +++ b/doc/isensor.8 @@ -0,0 +1,213 @@ +.TH ISENSOR 8 "Version 1.6: 09 Nov 2011" +.SH NAME +ipmiutil_sensor \- show Sensor Data Records +.SH SYNOPSIS +.B "ipmiutil sensor [-abcdefgmpqrstuvwx -i id -n snum -h tval -l tval -NUPREFJTVY]" + +.SH DESCRIPTION +.I ipmiutil sensor +is a program that uses IPMI commands to +show and decode Sensor Data Records and current +sensor readings for all sensors in the system. +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +Note that this utility by default only displays Sensor Data Records +reported by from the Baseboard Management Controller. +To show sensors for other controllers, see options \-b and \-m below. + +.SH OPTIONS +Command line options are described below. +.IP "-a snum" +ReArms the sensor number for events +.IP "-b" +Shows SDRs for Bladed (PICMG or ATCA) systems by traversing the child MCs +(same as \-e). +.IP "-c" +Show sensor list in a simpler/Canonical format without uninterpreted binary +values. Only the user-friendly interpreted sensor information is shown. +(same as \-s). +.IP "-d " +Dump the SDRs to a specified binary file. +.IP "-e" +Show Every SDR in a bladed system by traversing the child MCs (same as \-b). +.IP "-f " +Restore the SDRs from the specified binary File. +This is normally only done with the initial factory provisioning. +.IP "-g sens_type" +Shows only those SDRs matching the given sensor type group. +The sens_type string can be "fan", "temp", "voltage", or any string or +substring matching those in the IPMI 2.0 Table 42-3 for Sensor Types. +Multiple types can be listed, separated by a comma (,) but no spaces. +.IP "-h tval" +Highest threshold value to set for the specified sensor. +This tval can be in decimal, or of the form 0x1a, +to match the raw reading value shown by sensor following the " = ". +The value passed is set as the non-critical threshold value, with the +more critical ones set by the utility as incrementally lower. +This simplifies the interface and ensures that the threshold values +do not get out of order. +This requires specifying the sensor number via \-n. +.IP "-i ID" +Show or set only the sensor Index corresponding to ID, where ID is the +hex ID of the SDR as shown in the sensor output under "_ID_". +The ID argument can be one hex number (e.g. 0x0e or 0e), or a range of +hex numbers (e.g. 0e-1a or 1a,2a or 0x0e-0x2a). +This is useful to repeatedly view just a few sensor readings for changes, +or to set just one sensor quickly without reading all of the SDRs. +.IP "-l tval" +Lowest threshold value to set for the specified sensor. +This tval can be in decimal, or of the form 0x1a, +to match the raw reading value shown by sensor following the " = ". +The value passed is set as the non-critical threshold value, with the +more critical ones set by the utility as incrementally higher. +This simplifies the interface and ensures that the threshold values +do not get out of order. +This requires specifying the sensor number via \-n. +.IP "-m 002000s" +Show SDRs for a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-n snum" +Number of the sensor to set. +This num can be in decimal, or of the form 0x1a, +to match the value shown by sensor following the "snum" tag. +This is required if setting hi/lo thresholds via \-h/\-l. +.IP "-o" +Output the memory DIMM information from SMBIOS, including size. Not available if using IPMI LAN via \-N. Sample output: +.br +Memory Device (0,0): DIMM_A1 : size=2048MB +.br +Memory Device (0,1): DIMM_A2 : not present +.IP "-p" +Persist the threshold being set (as specified via \-l or \-h). This writes +a "sensor \-i" script line to the file /usr/share/ipmiutil/thresholds.sh, +which can then be executed at each reboot by starting the /etc/init.d/ipmi_port service for the desired runlevels. For Windows, the filename is thresholds.cmd. +.IP "-q" +Show any thresholds for each sensor in short format with ':' delimiters, useful as an example for setting thresholds with '\-u'. +.IP "-r" +Show Raw SDR bytes also. +.IP "-s" +Show sensor list in a simpler/canonical format without uninterpreted binary +values. Only the user-friendly interpreted sensor information is shown. +(same as \-c). +.IP "-t" +Show any Thresholds for each sensor also, in text format. +.IP "-u" +Set unique threshold values. The values are specified in a string of threshold values. It can be in raw hex characters or in float values. All 6 possible +thresholds must be specified, but only the ones that are valid for this sensor +will be applied. These values are validated for ordering. For example: + \-u 6:5:4:60:65:69 (float) or + \-u 0x0605043c4145 (raw hex) + would mean 0x06=noncrit_lo, 0x05=crit_lo, 0x04=nonrec_lo, 0x3c=noncrit_hi, +0x41=crit_hi, 0x45=nonrec_hi. +.IP "-v" +Show Verbose output, including volatile thresholds, SDR thresholds, +max/min, hysteresis, and BMC_TAM decoding. +.IP "-w" +Wrap the threshold data onto the same line as the sensor. +This may be convenient for scripting. +.IP "-x" +Causes eXtra debug messages to be displayed. +.IP "-L n" +Loop n times. This is useful along with \-i. Default is one loop. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH "EXAMPLES" +ipmiutil sensor sample output is below. +.br +ipmiutil ver 2.21 +.br +sensor: version 2.21 +.br +-- BMC version 0.17, IPMI version 2.0 +.br +_ID_ SDR_Type_xx ET Own Typ S_Num Sens_Description Hex & Interp Reading +.br +000b SDR Full 01 01 20 a 01 snum 30 Baseboard Temp = 2e OK 46.00 degrees C +.br +000e SDR Full 01 01 20 m 04 snum 50 Fan 1A = 6f OK 7659.00 RPM +.br +0042 SDR Comp 02 6f 20 a 21 snum e0 DIMM 1A = 00 c0 04 00 Present +.br +004e SDR FRU 11 1b dev: 20 03 80 00 0a 01 Pwr Supply 1 FRU +.br +0050 SDR IPMB 12 1b dev: 20 00 bf 07 01 Basbrd Mgmt Ctlr +.br +0051 SDR OEM c0 09 Intel: 02 02 00 01 70 71 +.br +0065 SDR OEM c0 11 Intel: SDR Package 17 +.br +[...] +.PP +Output Columns: +.br +_ID_: This is an SDR ID or index number, in hex. This may vary from chassis to chassis. +.br +SDR_Type_xx: This shows the SDR Type and its hex representation. Some SDR types have a custom display. The OEM SDRs only show the OEM vendor by IANA number and then usually the data is listed in hex. +.br +ET: For Full or Comp SDRs, this shows the Event Type. +For other SDRs, this shows the size of the SDR entry in hex (Sz). +.br +Own: This is the hex slave address of the SDR Owner, usually 20 if BMC. +.br +a/m: This indicates whether this sensor is either automatically or manually rearmed, respectively. +.br +Typ: This is the Sensor Type as defined in Table 42-3 of the IPMI 2.0 spec. +(01 = Temperature, 02 = Voltage, 03 = Current, 04 = Fan, etc.) +.br +S_Num: This is the sensor number in hex. This remains consistent across baseboards of the same type. The output can be parsed with the "snum" delimiter to extract this value. +.br +Sens_Description: This is the text description of this SDR, which is stored within the SDR on the BMC. +.br +Hex & Interp Reading: This is the raw hex value returned by GetSensorReading, and its interpreted meaning. + + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) iserial(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/iserial.8 b/doc/iserial.8 new file mode 100644 index 0000000..d7bbfcb --- /dev/null +++ b/doc/iserial.8 @@ -0,0 +1,251 @@ +.TH ISERIAL 8 "Version 2.2: 17 Feb 2010" +.SH NAME +ipmiutil_serial \- configure a system for Serial/EMP management functions, such as Terminal Mode, and optionally share the port with the Serial Console. +.SH SYNOPSIS +.B "ipmiutil serial [-bcdeflq#rsvxB -m0 -m1 -n ser_chan -u user -p passwd -NUPREFJTVY]" + +.SH DESCRIPTION +.I ipmiutil serial +is a program that uses an IPMI driver to send IPMI commands which +configure a system to enable EMP/serial Terminal Mode management +functions within the firmware, so that an administrator can use +command-line character commands via the serial port to +power cycle the system and perform other functions, +even if the system is not running an OS. +This level of access needs to be protected by a username/password +login, which can be specified with this utility. +This utility can use either the /dev/ipmi0 driver from OpenIPMI, +the /dev/imb driver from Intel, the /dev/ipmikcs driver from valinux, +direct user-space IOs, or the IPMI LAN interface if \-N. + +.SH OPTIONS +Command line options are described below. +.IP "-b" +Set up and enable the Serial Port EMP parameters for Basic Mode management functions. This does not set a username or password. +.IP "-c" +Configure and enable the Serial Port EMP parameters for Terminal Mode management functions, shared with BIOS Console Redirection. +Setting a new username and password for serial access via \-u and \-p is +recommended for security. +.IP "-d" +Disable the serial port access for IPMI commands. The serial port is then +only available for BIOS console and OS functions. +A side-effect of this option is that it sets the default user (1) back to +admin access. +.IP "-e" +Enable EMP Terminal Mode without shared BIOS console. The serial port is +then only available for EMP Terminal Mode functions. +.IP "-f" +Specifies the Flow Control for the Serial EMP. 0 means no flow control, and +1 means RTS/CTS flow control (default). This must match the BIOS Serial +Console setting. +.IP "-l" +Show LAN Parameters. This option reads and displays the LAN Parameter +configuration also. +.IP "-m0" +Switch the Serial Port MUX to Baseboard/BIOS Console operation. +Set no other configuration parameters. +.IP "-m1" +Switch the Serial Port MUX to Terminal Mode management. +Set no other configuration parameters. +.IP "-n ser_chan" +Sets the IPMI channel number to use for the EMP serial channel +(often 4). Note that the IPMI channels for LAN, Serial, etc. +are numbered differently on each platform type. +The default is to detect the first available IPMI serial channel. +.IP "-#" +Same as \-q below. +.IP "-q" +Specify an alternate user number for the EMP Username from the \-u option. +This is normally user number 2, 3, or 4, where 3 is the default. +The maximum number of users is 15. +.IP "-r" +Read Only. This option just reads the Serial Parameter configuration +without writing any values. +.IP "-s" +Set up and enable the Serial Port EMP parameters for Shared operation +between Basic Mode management functions and Baseboard (BIOS) Remote Console. +This option switches the Serial Port MUX to Baseboard Console operation. +.IP "-t" +Configure and enable the Serial Port EMP parameters for Terminal Mode management functions, shared with BIOS Console Redirection. Same as \-c, but easier to remember. +.IP "-u username" +This specifies a username for the EMP Terminal Mode login. It can +be any string, up to 15 characters. If \-u is not used, the default user 1 +(null) will be assumed. The username, if specified, will be set for user 3, +unless option \-q is specified. +.IP "-p password" +This specifies a password for the EMP Terminal Mode login. It can +be any string, up to 15 characters. A null password is used if +none is specified. This password applies to user 3 if \-u is used, to +user 1 otherwise. +.IP "-v priv" +Set a specific access priVilege for this user, where priv can be: +1=Callback, 2=User, 3=Operator, 4=Admin, 5=OEM, 15=NoAccess +The default if not specified or specified in error, is to use 4=Admin. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-B" +Set the Baud rate of the serial port to one of the following: +9600, 19,2K, 38.4K, 57.6K, or 115.2K. The default is 19.2K bps. + +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH EXAMPLES + +.IP "ipmiutil serial -t (or -c)" +Enables Terminal Mode management functions, shared with BIOS Serial Console redirection. The user can switch between serial console operations and IPMI Terminal Mode commands by typing ESC ')' and ESC 'Q'. + +.IP "ipmiutil serial -s" +Enables Basic Mode management functions shared with BIOS Serial Console redirection. The user can switch between serial console operations and IPMI Basic Mode management programs on the same serial port. + +.IP "ipmiutil serial -d" +Disables the serial port management functions. This would be used if only the BIOS Serial Console were used and no BMC serial management functions. + +.P +How to login to a Terminal Mode console: +.br +ESC ( (switch to Terminal mode) +.br +[SYS PWD \-N ] (login for default user, null psw) +.br +[SYS PWD \-U ROOT \-N PASSWORD] (syntax example for user 3) +.br +[SYS 000157 ACTIVATE] (activate advanced commands) +.br +[SYS HEALTH QUERY] +.br +[SYS HELP] +.br +[SYS PWD] (logoff) +.br +ESC Q (switch to BIOS console) +.br +See IPMI 1.5 Spec, Appendix E, and Intel TIGPR2U TPS for more information. + +.SH DEPENDENCIES +The ipmiutil serial utility is intended to configure the EMP serial port on the +server for shared access between BMC/IPMI functions and BIOS Console +Redirection. Some platforms only support only Basic Mode for BMC/IPMI +functions. Basic Mode requires a remote client application to utilize it +(Windows ISC Console/DPC, or a special modified Linux telnet). +There are some platforms which implement Terminal Mode via IPMI v1.5 +Appendix E to make remote management with character commands available +on the serial port without a special remote client application. + +For example, Intel TSRLT2 systems would use "ipmiutil serial \-s" for Basic Mode +shared functions, but Intel TIGPR2U systems could use "ipmiutil serial \-c" to +configure Terminal Mode functions. On your system, run "ipmiutil serial \-r" to +check whether Serial Param(29): "Terminal Mode Config" is supported. If +not, configure Basic Mode via "ipmiutil serial \-s". + + +.SH "PLATFORM SERIAL PORT CONFIGURATION EXAMPLES" + +First, enter BIOS Setup for Serial Console Redirection parameters: +(these vary by platform) +.br + Console Redirection = Serial Port B +.br + ACPI Redirection = Disabled +.br + Baud Rate = 115.2K +.br + Flow Control = CTS/RTS +.br + Terminal Type = VT100 +.br + Legacy Redirection = Enabled +.br +Note that the Baud Rate can vary, but it must match in all +locations where it is used (BIOS, IPMI, and Linux). +.br +For some non-Intel platforms, the serial console would be +COM1 instead of COM2, but should be enabled in BIOS. +.br +From Linux, run "ipmiutil serial \-c" for Terminal Mode shared configuration. +.br +Or, on older Intel TSRLT2 platforms: +From Linux, run "ipmiutil serial \-s" for Basic Mode Shared configuration. + +.SH "LINUX CONFIGURATION FOR SERIAL CONSOLE" + +If using lilo, in /etc/lilo.conf, add +.br + append="console=ttyS1,19200n8 console=tty0" +.br +(and comment out the "message=" line because it includes graphics) +.br +Note that the append line can be placed in the global section +and removed from each kernel section if there are no other differences. + +.PP +Or, if using grub, edit /boot/grub/grub.conf as follows: +.br + #Omit the splashimage or gfxmenu +.br + # splashimage=(hd0,0)/grub/splash.xpm.gz +.br + #The serial and terminal lines are not usually needed +.br + # serial \-\-unit=1 \-\-speed=19200 \-\-word=8 \-\-parity=no \-\-stop=1 +.br + # terminal \-\-timeout=10 serial console +.br + #Add the console=ttyS* parameter to the kernel line +.br + kernel (hd0,0) /vmlinuz root=/dev/sda2 console=ttyS1,19200n8 + +.PP +Add this line to /etc/initab, if ttyS1 is not already there: +.br + co:2345:respawn:/sbin/agetty ttyS1 19200 vt100 +.PP +Add this line to /etc/securetty, if ttyS1 is not already there: +.br + ttyS1 + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) isol(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/ismcoem.8 b/doc/ismcoem.8 new file mode 100644 index 0000000..7ecdbf9 --- /dev/null +++ b/doc/ismcoem.8 @@ -0,0 +1,104 @@ +.TH ISMCOEM 8 "Version 1.0: 05 Apr 2013" +.SH NAME +ipmiutil_smcoem \- OEM commands for SuperMicro servers +.SH SYNOPSIS +.B "ipmiutil smcoem [-mx -NPRUEFJTVY] commands" + +.SH DESCRIPTION +.I ipmiutil smcoem +is a function that uses SuperMicro OEM IPMI commands to +perform platform-specific functions. + +.SH OPTIONS + +.IP "-m 002000" +Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH COMMANDS +.TP +\fIintrusion\fP +.RS + +This command resets any chassis intrusion condition that may have +occurred. +.RE + +.TP +\fIbmcstatus\fP \fB[enable|disable]\fR +.RS +This command gets or sets the BMC service status. +Alone, without arguments, it gets the BMC status as either enabled or +disabled. With an argument of either enable or disable, it will +also set the BMC status as specified. +.RE + +.TP +\fIfirmware\fP +.RS + +This command gets the extra firmware version information, if available. + +.RE + +.TP +\fIlanport\fP \fB[dedicated|lan1|failover]\fR +.RS +This command gets or sets the IPMI LAN interface port. +If set to dedicated, only the dedicated IPMI NIC can be configured for +IPMI LAN. If set to lan1, only the first onboard NIC (LAN1) can be configured +for IPMI LAN. If set to failover, both the dedicated and onboard LAN1 port +would be configured for IPMI LAN, with the same IP address. +.RE + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2013 Andy Cress +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/isol.8 b/doc/isol.8 new file mode 100644 index 0000000..7048f64 --- /dev/null +++ b/doc/isol.8 @@ -0,0 +1,133 @@ +.TH ISOL 8 "Version 1.1: 17 Feb 2010" +.SH NAME +ipmiutil_sol \- an IPMI Serial-Over-LAN Console application + +.SH SYNOPSIS +.B "ipmiutil sol [-acdeilorsvwxz -NUPREFJTVY] + +.SH DESCRIPTION +This utility starts an IPMI Serial-Over-LAN console session. +A Serial-over-LAN console allows the client to see and modify +functions before the OS boots, such as BIOS setup, grub, etc. +This utility uses either the IPMI LAN 1.5 or 2.0 SOL interface. +The 1.5 SOL interface is specific to Intel BMCs, while any IPMI 2.0 +BMC should support 2.0 SOL. +The target system/node must first have these parameters configured +before SOL sessions can be started: +.br +- [BIOS] serial console redirection parameters, +.br +- [IPMI] lan and SOL parameters (see ipmiutil lan or ilan), and +.br +- [OS] For Linux, edit grub.conf, inittab, and securetty parameters. +.br +Be sure that the baud rate matches in all of the above places. +See the ipmiutil UserGuide section 4.8 for details. + +.SH OPTIONS +.IP "-a" +Activate the SOL Console session, and enter console mode. +Use the escape sequence ('~.') to exit the session. +.IP "-c '^'" +Set the escape Character to '^', or another ANSI character. This changes the +default two-character escape sequence ('~.') to the specified single escape +character, which will end the SOL session. +.IP "-d" +Deactivate the SOL Console session. Use this if the previous session +was aborted abnormally and starting a new session gives an error. +.IP "-e" +Turn Encryption off in negotiation when activating a session. By default, +encryption is on for Serial-Over-LAN console sessions. +.IP "-l" +Use Legacy BIOS mapping for Enter key (CR+LF) instead of just LF. +This is needed for BIOS Setup menus and DOS, but causes an extra LF to +occur in Linux. So, only use this option if doing BIOS or DOS changes. +This should be seldom be needed since now the default is to automatically +detect these menus with colored backgrounds and change the mapping. +.IP "-i input_file" +Use this file as an input script. The input_file will be read after the +session is established. This can be used to automate certain tasks. The +input_file is read one line at a time. If the input_file does not +have an escape character (~) to end the session, then the input is +returned to the keyboard when the file ends. +.IP "-o output_file" +Use a Trace log. The output_file is created and all SOL screen output is +written to the file, including VT100 escape sequences. If the output_file +exists, the output is appended to it. This can be used to log what the +user has done in an SOL session. +.IP "-r" +Use Raw terminal I/O instead of custom VT100 to ANSI translation (in Windows). +Use this option if the server is configured in BIOS and BMC for ANSI and +the utility is being invoked from Windows. +.IP "-s NNN" +For a slow link with high latency, this adds a delay of NNN microseconds +between sending and receiving SOL packets. The default is 100 microseconds. +.IP "-w" +(Windows only) +Do not use the Windows Console buffer, but use Windows stdio instead. +This does not handle cursor positioning correctly in some cases, however. +.IP "-v log_file" +Causes debug messages to be displayed to the specified debug log_file. +The default log_file is isoldbg.log in the current directory. +.IP "-x" +Causes debug messages to be displayed to the debug log file. +.IP "-z" +Causes more verbose debug messages to be displayed to the debug log file. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any supported driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH "EXAMPLES" +ipmiutil sol \-a \-N nodename \-U username \-P password +.br +Starts an SOL console session to the nodename. Detect the lan protocol. +.PP +ipmiutil sol \-a \-N nodename \-U username \-P password \-Flan2 +.br +Starts an SOL console session to the nodename. Force lan protocol to 2.0. +.PP + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/isunoem.8 b/doc/isunoem.8 new file mode 100644 index 0000000..366ed7d --- /dev/null +++ b/doc/isunoem.8 @@ -0,0 +1,135 @@ +.TH ISUNOEM 8 "Version 1.0: 09 Sep 2010" +.SH NAME +ipmiutil_sunoem \- OEM commands for Sun servers +.SH SYNOPSIS +.B "ipmiutil sunoem [-mx -NPRUEFJTVY] commands" + +.SH DESCRIPTION +.I ipmiutil sunoem commands +is a program that uses Sun OEM IPMI commands to +perform platform-specific functions. + +.SH OPTIONS + +.IP "-m 002000" +Show FRU for a specific MC (e.g. bus 00, sa 20, lun 00). +This could be used for PICMG or ATCA blade systems. +The trailing character, if present, indicates SMI addressing if 's', +or IPMB addressing if 'i' or not present. +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + +.SH COMMANDS +.TP +\fIled\fP +.RS + +These commands provide a way to get and set the status of LEDs +on a Sun Microsystems server. Use 'sdr list generic' to get a +list of devices that are controllable LEDs. The \fIledtype\fP +parameter is optional and not necessary to provide on the command +line unless it is required by hardware. +.TP +\fIget\fP \fBsensorid\fR [\fBledtype\fR] + +Get status of a particular LED described by a Generic Device Locator +record in the SDR. A sensorid of \fIall\fP will get the status +of all available LEDS. +.TP +\fIset\fP \fBsensorid\fR \fBledmode\fR [\fBledtype\fR] + +Set status of a particular LED described by a Generic Device Locator +record in the SDR. A sensorid of \fIall\fP will set the status +of all available LEDS to the specified \fIledmode\fP and \fIledtype\fP. +.TP +LED Mode is required for set operations: +.br +\fIOFF\fP Off +.br +\fION\fP Steady On +.br +\fISTANDBY\fP 100ms on 2900ms off blink rate +.br +\fISLOW\fP 1HZ blink rate +.br +\fIFAST\fP 4HZ blink rate +.TP +LED Type is optional: +.br +\fIOK2RM\fP Ok to Remove +.br +\fISERVICE\fP Service Required +.br +\fIACT\fP Activity +.br +\fILOCATE\fP Locate + +.RE +.TP +\fIfan\fP \fIspeed\fP 0-100 + +Set system fan speed (PWM duty cycle). +.RS +.TP +\fIsshkey\fP +.RS +.TP +\fIset\fP \fBuserid\fR \fBkeyfile\fR + +This command will allow you to specify an SSH key to use for a particular +user on the Service Processor. This key will be used for CLI logins to +the SP and not for IPMI sessions. View available users and their userids +with the 'user list' command. +.TP +\fIdel\fP \fBuserid\fR + +This command will delete the SSH key for a specified userid. +.RE + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/itsol.8 b/doc/itsol.8 new file mode 100644 index 0000000..a7a3d0a --- /dev/null +++ b/doc/itsol.8 @@ -0,0 +1,66 @@ +.TH ITSOL 8 "Version 1.0: 03 Feb 2012" +.SH NAME +ipmiutil_tsol \- Tyan IPMIv1.5 Serial-Over-LAN Console application + +.SH SYNOPSIS +.B "ipmiutil tsol [recvip] [port=NUM] [ro|rw] [rows=NUM] [cols=NUM] [altterm] + +.SH DESCRIPTION +This command allows Serial-over-LAN sessions to be established +with Tyan IPMIv1.5 SMDC such as the M3289 or M3290. The default +command run with no arguments will establish default SOL session +back to local IP address. Optional arguments may be supplied in +any order. + +.SH OPTIONS + +.IP "" +Send receiver IP address to SMDC which it will use to +send serial traffic to. By default this detects the +local IP address and establishes two-way session. Format +of ipaddr is XX.XX.XX.XX + +.IP "port" +Configure UDP port to receive serial traffic on. +By default this is 6230. + +.IP "ro|rw" +Confiure SOL session as read-only or read-write. +Sessions are read-write by default. + +.IP "rows" +Set terminal rows [default: rows=24] + +.IP "cols" +Set terminal columns [default: cols=80] + +.IP "altterm" +Alternate terminal setup [default is off] + + +.SH "EXAMPLES" +ipmiutil tsol 192.168.1.1 +.br +Starts a Tyan SOL console session to the IP address. +.PP + +.SH "SEE ALSO" +ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) iwdt(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2012 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/iwdt.8 b/doc/iwdt.8 new file mode 100644 index 0000000..2fa4642 --- /dev/null +++ b/doc/iwdt.8 @@ -0,0 +1,113 @@ +.TH IWDT 8 "Version 1.3: 26 Apr 2010" +.SH NAME +ipmiutil_wdt\- display and set WatchDog Timer parameters +.SH SYNOPSIS +.B "ipmiutil wdt [-acdelrtx -N node -P/-R pswd -U user -EFJTVY]" + +.SH DESCRIPTION +.I ipmiutil wdt +is a program that uses IPMI commands to +display and set WatchDog Timer parameters. + +This utility can use either any available IPMI driver, or direct +user-space IOs, or the IPMI LAN interface if \-N. + +This utility is an example of how to access the IPMI watchdog parameters +directly, which allows changing the timer configuration. + +There is an init script provided with ipmiutil to automate the task of +managing the watchdog timer in user-space. +.br +# chkconfig \-\-add ipmiutil_wdt (skip this if no chkconfig) +.br +# /etc/init.d/ipmiutil_wdt start +.br +This sets the watchdog timer to reset the system if the wdt is not +restarted within 90 seconds. It creates an /etc/cron.d/wdt file to +restart wdt every 60 seconds. +See also ipmiutil UserGuide section 4.4 for more information. + +.SH OPTIONS +Command line options are described below. +.IP "-a N" +Set watchdog event Action to N. Values: +0 = No action, 1 = Hard Reset(default), 2 = Power down, 3 = Power cycle. +.IP "-c" +Show watchdog output in a canonical format, with a default delimiter of '|'. +.IP "-d" +Disables the watchdog timer. +.IP "-e" +Enables the watchdog timer. The timer is not actually started, however, +until the timer is reset. The pre-timeout action is not enabled. +.IP "-l" +Set the watchdog dontLog bit to not log watchdog events in the SEL. +.IP "-p N" +Set watchdog Pretimeout event action to N. Values: +0 = No action(default), 1 = SMI, 2 = NMI, 3 = Messaging Interrupt. +If this is set to an action other than 0, the pretimeout will also +be set to 90% of the timeout. However, if the timeout is less than +20 seconds, the pretimeout will not be enabled. +.IP "-q S" +Set watchdog pretimeout value to S seconds, rather than 90% of the timeout +as in \-p. The pretimeout value must be >= 5 and at least 5 seconds less +than the timeout value. +.IP "-r" +Resets the watchdog timer. This should be done every N seconds if the +timer is running to prevent the watchdog action (usually a system reset) +from occurring. +.IP "-tN" +Set the watchdog Timeout to N seconds. The default is 120 seconds (2 minutes). +.IP "-x" +Causes extra debug messages to be displayed. +.IP "-N nodename" +Nodename or IP address of the remote target system. If a nodename is +specified, IPMI LAN interface is used. Otherwise the local system +management interface is used. +.IP "-P/-R rmt_pswd" +Remote password for the nodename given. The default is a null password. +.IP "-U rmt_user" +Remote username for the nodename given. The default is a null username. +.IP "-E" +Use the remote password from Environment variable IPMI_PASSWORD. +.IP "-F drv_t" +Force the driver type to one of the followng: +imb, va, open, gnu, landesk, lan, lan2, lan2i, kcs, smb. +Note that lan2i means lan2 with intelplus. +The default is to detect any available driver type and use it. +.IP "-J" +Use the specified LanPlus cipher suite (0 thru 17): 0=none/none/none, +1=sha1/none/none, 2=sha1/sha1/none, 3=sha1/sha1/cbc128, 4=sha1/sha1/xrc4_128, +5=sha1/sha1/xrc4_40, 6=md5/none/none, ... 14=md5/md5/xrc4_40. +Default is 3. +.IP "-T" +Use a specified IPMI LAN Authentication Type: 0=None, 1=MD2, 2=MD5, 4=Straight Password, 5=OEM. +.IP "-V" +Use a specified IPMI LAN privilege level. 1=Callback level, 2=User level, 3=Operator level, 4=Administrator level (default), 5=OEM level. +.IP "-Y" +Yes, do prompt the user for the IPMI LAN remote password. +Alternatives for the password are \-E or \-P. + + +.SH "SEE ALSO" +ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifirewall(8) +ifru(8) ifruset(8) ifwum(8) igetevent(8) ihealth(8) ihpm(8) +ilan(8) ipicmg(8) ireset(8) isel(8) isensor(8) iserial(8) isol(8) isunoem(8) +iwdt(8) ipmiutil(8) ipmi_port(8) + +.SH WARNINGS +See http://ipmiutil.sourceforge.net/ for the latest version of ipmiutil and any bug fix list. + +.SH COPYRIGHT +Copyright (C) 2009 Kontron America, Inc. +.PP +See the file COPYING in the distribution for more details +regarding redistribution. +.PP +This utility is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY. + +.SH AUTHOR +.PP +Andy Cress +.br + diff --git a/doc/rh.patch b/doc/rh.patch new file mode 100644 index 0000000..e0e691b --- /dev/null +++ b/doc/rh.patch @@ -0,0 +1,111 @@ +--- ipmiutil.spec.orig 2012-06-12 12:05:50.000000000 -0400 ++++ ipmiutil.spec 2012-06-12 12:07:47.000000000 -0400 +@@ -7,7 +7,7 @@ + Release: 1%{?dist} + Summary: Easy-to-use IPMI server management utilities + License: BSD +-Group: System/Management ++Group: System Environment/Base + Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz + URL: http://ipmiutil.sourceforge.net + BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +@@ -15,18 +15,9 @@ + %if 0%{?fedora} >= 15 + Requires: systemd-units + %endif +-%if 0%{?suse_version} >= 1210 +-%define req_systemd 1 +-%endif +-%if 0%{?req_systemd} +-BuildRequires: openssl-devel gcc gcc-c++ libtool systemd +-%define systemd_fls %{_unitdir} +-# Requires: %{?systemd_requires} +-%else + BuildRequires: openssl-devel gcc gcc-c++ libtool +-%define systemd_fls %{_datadir}/%{name} +-%endif +-%define init_dir %{_initrddir} ++%global systemd_fls %{_datadir}/%{name} ++%global init_dir %{_initrddir} + + %description + The ipmiutil package provides easy-to-use utilities to view the SEL, +@@ -53,12 +44,8 @@ + %setup -q + + %build +-%if 0%{?req_systemd} +-%configure --enable-systemd +-%else + %configure +-%endif +-make ++make %{?_smp_mflags} + + %install + rm -rf %{buildroot} +@@ -146,11 +133,6 @@ + %{_libdir}/libipmiutil.a + + +-%pre +-%if 0%{?req_systemd} +-%service_add_pre ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +-%endif +- + %post + # POST_INSTALL, $1 = 1 if rpm -i, $1 = 2 if rpm -U + +@@ -160,9 +142,6 @@ + vardir=%{_var}/lib/%{name} + scr_dir=%{_datadir}/%{name} + +-%if 0%{?req_systemd} +-%service_add_post ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +-%else + if [ -x /bin/systemctl ]; then + systemd_dir=%{_unitdir} + echo "IINITDIR=%{init_dir}" >>%{_datadir}/%{name}/ipmiutil.env +@@ -177,7 +156,6 @@ + cp -f ${scr_dir}/ipmiutil_evt %{init_dir} + cp -f ${scr_dir}/ipmi_port %{init_dir} + fi +-%endif + + # Run some ipmiutil command to see if any IPMI interface works. + %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 +@@ -213,9 +191,6 @@ + # before uninstall, $1 = 1 if rpm -U, $1 = 0 if rpm -e + if [ "$1" = "0" ] + then +-%if 0%{?req_systemd} +-%service_del_preun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +-%else + if [ -x /bin/systemctl ]; then + systemd_dir=%{_unitdir} + if [ -f ${systemd_dir}/ipmiutil_evt.service ]; then +@@ -250,16 +225,12 @@ + rm -f %{init_dir}/ipmiutil_evt 2>/dev/null + rm -f %{init_dir}/ipmi_port 2>/dev/null + fi +-%endif + if [ -f %{_sysconfdir}/cron.daily/checksel ]; then + rm -f %{_sysconfdir}/cron.daily/checksel + fi + fi + + %postun +-%if 0%{?req_systemd} +-%service_del_postun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +-%else + if [ -x /bin/systemctl ]; then + systemctl daemon-reload || : + if [ $1 -ge 1 ] ; then +@@ -267,7 +238,6 @@ + systemctl try-restart ipmi_port.service || : + fi + fi +-%endif + + %changelog + * Fri May 04 2012 Andrew Cress 2.8.4-1 diff --git a/doc/rh_spec.patch b/doc/rh_spec.patch new file mode 100644 index 0000000..e0e691b --- /dev/null +++ b/doc/rh_spec.patch @@ -0,0 +1,111 @@ +--- ipmiutil.spec.orig 2012-06-12 12:05:50.000000000 -0400 ++++ ipmiutil.spec 2012-06-12 12:07:47.000000000 -0400 +@@ -7,7 +7,7 @@ + Release: 1%{?dist} + Summary: Easy-to-use IPMI server management utilities + License: BSD +-Group: System/Management ++Group: System Environment/Base + Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz + URL: http://ipmiutil.sourceforge.net + BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +@@ -15,18 +15,9 @@ + %if 0%{?fedora} >= 15 + Requires: systemd-units + %endif +-%if 0%{?suse_version} >= 1210 +-%define req_systemd 1 +-%endif +-%if 0%{?req_systemd} +-BuildRequires: openssl-devel gcc gcc-c++ libtool systemd +-%define systemd_fls %{_unitdir} +-# Requires: %{?systemd_requires} +-%else + BuildRequires: openssl-devel gcc gcc-c++ libtool +-%define systemd_fls %{_datadir}/%{name} +-%endif +-%define init_dir %{_initrddir} ++%global systemd_fls %{_datadir}/%{name} ++%global init_dir %{_initrddir} + + %description + The ipmiutil package provides easy-to-use utilities to view the SEL, +@@ -53,12 +44,8 @@ + %setup -q + + %build +-%if 0%{?req_systemd} +-%configure --enable-systemd +-%else + %configure +-%endif +-make ++make %{?_smp_mflags} + + %install + rm -rf %{buildroot} +@@ -146,11 +133,6 @@ + %{_libdir}/libipmiutil.a + + +-%pre +-%if 0%{?req_systemd} +-%service_add_pre ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +-%endif +- + %post + # POST_INSTALL, $1 = 1 if rpm -i, $1 = 2 if rpm -U + +@@ -160,9 +142,6 @@ + vardir=%{_var}/lib/%{name} + scr_dir=%{_datadir}/%{name} + +-%if 0%{?req_systemd} +-%service_add_post ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +-%else + if [ -x /bin/systemctl ]; then + systemd_dir=%{_unitdir} + echo "IINITDIR=%{init_dir}" >>%{_datadir}/%{name}/ipmiutil.env +@@ -177,7 +156,6 @@ + cp -f ${scr_dir}/ipmiutil_evt %{init_dir} + cp -f ${scr_dir}/ipmi_port %{init_dir} + fi +-%endif + + # Run some ipmiutil command to see if any IPMI interface works. + %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 +@@ -213,9 +191,6 @@ + # before uninstall, $1 = 1 if rpm -U, $1 = 0 if rpm -e + if [ "$1" = "0" ] + then +-%if 0%{?req_systemd} +-%service_del_preun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +-%else + if [ -x /bin/systemctl ]; then + systemd_dir=%{_unitdir} + if [ -f ${systemd_dir}/ipmiutil_evt.service ]; then +@@ -250,16 +225,12 @@ + rm -f %{init_dir}/ipmiutil_evt 2>/dev/null + rm -f %{init_dir}/ipmi_port 2>/dev/null + fi +-%endif + if [ -f %{_sysconfdir}/cron.daily/checksel ]; then + rm -f %{_sysconfdir}/cron.daily/checksel + fi + fi + + %postun +-%if 0%{?req_systemd} +-%service_del_postun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service +-%else + if [ -x /bin/systemctl ]; then + systemctl daemon-reload || : + if [ $1 -ge 1 ] ; then +@@ -267,7 +238,6 @@ + systemctl try-restart ipmi_port.service || : + fi + fi +-%endif + + %changelog + * Fri May 04 2012 Andrew Cress 2.8.4-1 diff --git a/doc/winsockerr.txt b/doc/winsockerr.txt new file mode 100644 index 0000000..5c81edb --- /dev/null +++ b/doc/winsockerr.txt @@ -0,0 +1,301 @@ +(from http://msdn2.microsoft.com/en-us/library/ms740668.aspx) + +Windows Sockets Error Codes +The following list describes the possible error codes returned by the WSAGetLastError function. Errors are listed in alphabetical order by error macro. Some error codes defined in Winsock2.h are not returned from any functionthese are not included in this list. + +Return code/value Description +WSA_INVALID_HANDLE 6 +Specified event object handle is invalid. +An application attempts to use an event object, but the specified handle is not valid. Note that this error is returned by the operating system, so the error number may change in future releases of Windows. +WSA_NOT_ENOUGH_MEMORY 8 +Insufficient memory available. +An application used a Windows Sockets function that directly maps to a Windows function. The Windows function is indicating a lack of required memory resources. Note that this error is returned by the operating system, so the error number may change in future releases of Windows. +WSA_INVALID_PARAMETER 87 +One or more parameters are invalid. +An application used a Windows Sockets function which directly maps to a Windows function. The Windows function is indicating a problem with one or more parameters. Note that this error is returned by the operating system, so the error number may change in future releases of Windows. +WSA_OPERATION_ABORTED 995 +Overlapped operation aborted. +An overlapped operation was canceled due to the closure of the socket, or the execution of the SIO_FLUSH command in WSAIoctl. Note that this error is returned by the operating system, so the error number may change in future releases of Windows. +WSA_IO_INCOMPLETE 996 +Overlapped I/O event object not in signaled state. +The application has tried to determine the status of an overlapped operation which is not yet completed. Applications that use WSAGetOverlappedResult (with the fWait flag set to FALSE) in a polling mode to determine when an overlapped operation has completed, get this error code until the operation is complete. Note that this error is returned by the operating system, so the error number may change in future releases of Windows. +WSA_IO_PENDING 997 +Overlapped operations will complete later. +The application has initiated an overlapped operation that cannot be completed immediately. A completion indication will be given later when the operation has been completed. Note that this error is returned by the operating system, so the error number may change in future releases of Windows. +WSAEINTR 10004 +Interrupted function call. +A blocking operation was interrupted by a call to WSACancelBlockingCall. +WSAEBADF 10009 +File handle is not valid. +The file handle supplied is not valid. +WSAEACCES 10013 +Permission denied. +An attempt was made to access a socket in a way forbidden by its access permissions. An example is using a broadcast address for sendto without broadcast permission being set using setsockopt(SO_BROADCAST). +Another possible reason for the WSAEACCES error is that when the bind function is called (on Windows NT 4 SP4 or later), another application, service, or kernel mode driver is bound to the same address with exclusive access. Such exclusive access is a new feature of Windows NT 4 SP4 and later, and is implemented by using the SO_EXCLUSIVEADDRUSE option. + +WSAEFAULT 10014 +Bad address. +The system detected an invalid pointer address in attempting to use a pointer argument of a call. This error occurs if an application passes an invalid pointer value, or if the length of the buffer is too small. For instance, if the length of an argument, which is a sockaddr structure, is smaller than the sizeof(sockaddr). +WSAEINVAL 10022 +Invalid argument. +Some invalid argument was supplied (for example, specifying an invalid level to the setsockopt function). In some instances, it also refers to the current state of the socketfor instance, calling accept on a socket that is not listening. +WSAEMFILE 10024 +Too many open files. +Too many open sockets. Each implementation may have a maximum number of socket handles available, either globally, per process, or per thread. +WSAEWOULDBLOCK 10035 +Resource temporarily unavailable. +This error is returned from operations on nonblocking sockets that cannot be completed immediately, for example recv when no data is queued to be read from the socket. It is a nonfatal error, and the operation should be retried later. It is normal for WSAEWOULDBLOCK to be reported as the result from calling connect on a nonblocking SOCK_STREAM socket, since some time must elapse for the connection to be established. +WSAEINPROGRESS 10036 +Operation now in progress. +A blocking operation is currently executing. Windows Sockets only allows a single blocking operationper- task or threadto be outstanding, and if any other function call is made (whether or not it references that or any other socket) the function fails with the WSAEINPROGRESS error. +WSAEALREADY 10037 +Operation already in progress. +An operation was attempted on a nonblocking socket with an operation already in progressthat is, calling connect a second time on a nonblocking socket that is already connecting, or canceling an asynchronous request (WSAAsyncGetXbyY) that has already been canceled or completed. +WSAENOTSOCK 10038 +Socket operation on nonsocket. +An operation was attempted on something that is not a socket. Either the socket handle parameter did not reference a valid socket, or for select, a member of an fd_set was not valid. +WSAEDESTADDRREQ 10039 +Destination address required. +A required address was omitted from an operation on a socket. For example, this error is returned if sendto is called with the remote address of ADDR_ANY. +WSAEMSGSIZE 10040 +Message too long. +A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram was smaller than the datagram itself. +WSAEPROTOTYPE 10041 +Protocol wrong type for socket. +A protocol was specified in the socket function call that does not support the semantics of the socket type requested. For example, the ARPA Internet UDP protocol cannot be specified with a socket type of SOCK_STREAM. +WSAENOPROTOOPT 10042 +Bad protocol option. +An unknown, invalid or unsupported option or level was specified in a getsockopt or setsockopt call. +WSAEPROTONOSUPPORT 10043 +Protocol not supported. +The requested protocol has not been configured into the system, or no implementation for it exists. For example, a socket call requests a SOCK_DGRAM socket, but specifies a stream protocol. +WSAESOCKTNOSUPPORT 10044 +Socket type not supported. +The support for the specified socket type does not exist in this address family. For example, the optional type SOCK_RAW might be selected in a socket call, and the implementation does not support SOCK_RAW sockets at all. +WSAEOPNOTSUPP 10045 +Operation not supported. +The attempted operation is not supported for the type of object referenced. Usually this occurs when a socket descriptor to a socket that cannot support this operation is trying to accept a connection on a datagram socket. +WSAEPFNOSUPPORT 10046 +Protocol family not supported. +The protocol family has not been configured into the system or no implementation for it exists. This message has a slightly different meaning from WSAEAFNOSUPPORT. However, it is interchangeable in most cases, and all Windows Sockets functions that return one of these messages also specify WSAEAFNOSUPPORT. +WSAEAFNOSUPPORT 10047 +Address family not supported by protocol family. +An address incompatible with the requested protocol was used. All sockets are created with an associated address family (that is, AF_INET for Internet Protocols) and a generic protocol type (that is, SOCK_STREAM). This error is returned if an incorrect protocol is explicitly requested in the socket call, or if an address of the wrong family is used for a socket, for example, in sendto. +WSAEADDRINUSE 10048 +Address already in use. +Typically, only one usage of each socket address (protocol/IP address/port) is permitted. This error occurs if an application attempts to bind a socket to an IP address/port that has already been used for an existing socket, or a socket that was not closed properly, or one that is still in the process of closing. For server applications that need to bind multiple sockets to the same port number, consider using setsockopt (SO_REUSEADDR). Client applications usually need not call bind at all connect chooses +an unused port automatically. When bind is called with a wildcard address (involving ADDR_ANY), a WSAEADDRINUSE error could be delayed until the specific address is committed. This could happen with a call to another function later, including connect, listen, WSAConnect, or WSAJoinLeaf. +WSAEADDRNOTAVAIL 10049 +Cannot assign requested address. +The requested address is not valid in its context. This normally results from an attempt to bind to an address that is not valid for the local computer. This can also result from connect, sendto, WSAConnect, WSAJoinLeaf, or WSASendTo when the remote address or port is not valid for a remote computer (for example, address or port 0). +WSAENETDOWN 10050 +Network is down. +A socket operation encountered a dead network. This could indicate a serious failure of the network system (that is, the protocol stack that the Windows Sockets DLL runs over), the network interface, or the local network itself. +WSAENETUNREACH 10051 +Network is unreachable. +A socket operation was attempted to an unreachable network. This usually means the local software knows no route to reach the remote host. +WSAENETRESET 10052 +Network dropped connection on reset. +The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress. It can also be returned by setsockopt if an attempt is made to set SO_KEEPALIVE on a connection that has already failed. +WSAECONNABORTED 10053 +Software caused connection abort. +An established connection was aborted by the software in your host computer, possibly due to a data transmission time-out or protocol error. +WSAECONNRESET 10054 +Connection reset by peer. +An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were i +n progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET. +WSAENOBUFS 10055 +No buffer space available. +An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. +WSAEISCONN 10056 +Socket is already connected. +A connect request was made on an already-connected socket. Some implementations also return this error if sendto is called on a connected SOCK_DGRAM socket (for SOCK_STREAM sockets, the to parameter in sendto is ignored) although other implementations treat this as a legal occurrence. +WSAENOTCONN 10057 +Socket is not connected. +A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using sendto) no address was supplied. Any other type of operation might also return this errorfor example, setsockopt setting SO_KEEPALIVE if the connection has been reset. +WSAESHUTDOWN 10058 +Cannot send after socket shutdown. +A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call. By calling shutdown a partial close of a socket is requested, which is a signal that sending or receiving, or both have been discontinued. +WSAETOOMANYREFS 10059 +Too many references. +Too many references to some kernel object. +WSAETIMEDOUT 10060 +Connection timed out. +A connection attempt failed because the connected party did not properly respond after a period of time, or the established connection failed because the connected host has failed to respond. +WSAECONNREFUSED 10061 +Connection refused. +No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign hostthat is, one with no server application running. +WSAELOOP 10062 +Cannot translate name. +Cannot translate a name. +WSAENAMETOOLONG 10063 +Name too long. +A name component or a name was too long. +WSAEHOSTDOWN 10064 +Host is down. +A socket operation failed because the destination host is down. A socket operation encountered a dead host. Networking activity on the local host has not been initiated. These conditions are more likely to be indicated by the error WSAETIMEDOUT. +WSAEHOSTUNREACH 10065 +No route to host. +A socket operation was attempted to an unreachable host. See WSAENETUNREACH. +WSAENOTEMPTY 10066 +Directory not empty. +Cannot remove a directory that is not empty. +WSAEPROCLIM 10067 +Too many processes. +A Windows Sockets implementation may have a limit on the number of applications that can use it simultaneously.WSAStartup may fail with this error if the limit has been reached. +WSAEUSERS 10068 +User quota exceeded. +Ran out of user quota. +WSAEDQUOT 10069 +Disk quota exceeded. +Ran out of disk quota. +WSAESTALE 10070 +Stale file handle reference. +The file handle reference is no longer available. +WSAEREMOTE 10071 +Item is remote. +The item is not available locally. +WSASYSNOTREADY 10091 +Network subsystem is unavailable. +This error is returned by WSAStartup if the Windows Sockets implementation cannot function at this time because the underlying system it uses to provide network services is currently unavailable. Users should check: +That the appropriate Windows Sockets DLL file is in the current path. +That they are not trying to use more than one Windows Sockets implementation simultaneously. If there is more than one Winsock DLL on your system, be sure the first one in the path is appropriate for the network subsystem currently loaded. +The Windows Sockets implementation documentation to be sure all necessary components are currently installed and configured correctly. +WSAVERNOTSUPPORTED 10092 +Winsock.dll version out of range. +The current Windows Sockets implementation does not support the Windows Sockets specification version requested by the application. Check that no old Windows Sockets DLL files are being accessed. +WSANOTINITIALISED 10093 +Successful WSAStartup not yet performed. +Either the application has not called WSAStartup or WSAStartup failed. The application may be accessing a socket that the current active task does not own (that is, trying to share a socket between tasks), or WSACleanup has been called too many times. +WSAEDISCON 10101 +Graceful shutdown in progress. +Returned by WSARecv and WSARecvFrom to indicate that the remote party has initiated a graceful shutdown sequence. +WSAENOMORE 10102 +No more results. +No more results can be returned by the WSALookupServiceNext function. +WSAECANCELLED 10103 +Call has been canceled. +A call to the WSALookupServiceEnd function was made while this call was still processing. The call has been canceled. +WSAEINVALIDPROCTABLE 10104 +Procedure call table is invalid. +The service provider procedure call table is invalid. A service provider returned a bogus procedure table to Ws2_32.dll. This is usually caused by one or more of the function pointers being NULL. +WSAEINVALIDPROVIDER 10105 +Service provider is invalid. +The requested service provider is invalid. This error is returned by the WSCGetProviderInfo and WSCGetProviderInfo32 functions if the protocol entry specified could not be found. This error is also returned if the service provider returned a version number other than 2.0. +WSAEPROVIDERFAILEDINIT 10106 +Service provider failed to initialize. +The requested service provider could not be loaded or initialized. This error is returned if either a service provider's DLL could not be loaded (LoadLibrary failed) or the provider's WSPStartup or NSPStartup function failed. +WSASYSCALLFAILURE 10107 +System call failure. +A system call that should never fail has failed. This is a generic error code, returned under various conditions. +Returned when a system call that should never fail does fail. For example, if a call to WaitForMultipleEvents fails or one of the registry functions fails trying to manipulate the protocol/namespace catalogs. +Returned when a provider does not return SUCCESS and does not provide an extended error code. Can indicate a service provider implementation error. +WSASERVICE_NOT_FOUND 10108 +Service not found. +No such service is known. The service cannot be found in the specified name space. +WSATYPE_NOT_FOUND 10109 +Class type not found. +The specified class was not found. +WSA_E_NO_MORE 10110 +No more results. +No more results can be returned by the WSALookupServiceNext function. +WSA_E_CANCELLED 10111 +Call was canceled. +A call to the WSALookupServiceEnd function was made while this call was still processing. The call has been canceled. +WSAEREFUSED 10112 +Database query was refused. +A database query failed because it was actively refused. +WSAHOST_NOT_FOUND 11001 +Host not found. +No such host is known. The name is not an official host name or alias, or it cannot be found in the database(s) being queried. This error may also be returned for protocol and service queries, and means that the specified name could not be found in the relevant database. +WSATRY_AGAIN 11002 +Nonauthoritative host not found. +This is usually a temporary error during host name resolution and means that the local server did not receive a response from an authoritative server. A retry at some time later may be successful. +WSANO_RECOVERY 11003 +This is a nonrecoverable error. +This indicates that some sort of nonrecoverable error occurred during a database lookup. This may be because the database files (for example, BSD-compatible HOSTS, SERVICES, or PROTOCOLS files) could not be found, or a DNS request was returned by the server with a severe error. +WSANO_DATA 11004 +Valid name, no data record of requested type. +The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for. The usual example for this is a host name-to-address translation attempt (using gethostbyname or WSAAsyncGetHostByName) which uses the DNS (Domain Name Server). An MX record is returned but no A recordindicating the host itself exists, but is not directly reachable. +WSA_QOS_RECEIVERS 11005 +QOS receivers. +At least one QOS reserve has arrived. +WSA_QOS_SENDERS 11006 +QOS senders. +At least one QOS send path has arrived. +WSA_QOS_NO_SENDERS 11007 +No QOS senders. +There are no QOS senders. +WSA_QOS_NO_RECEIVERS 11008 +QOS no receivers. +There are no QOS receivers. +WSA_QOS_REQUEST_CONFIRMED 11009 +QOS request confirmed. +The QOS reserve request has been confirmed. +WSA_QOS_ADMISSION_FAILURE 11010 +QOS admission error. +A QOS error occurred due to lack of resources. +WSA_QOS_POLICY_FAILURE 11011 +QOS policy failure. +The QOS request was rejected because the policy system couldnt allocate the requested resource within the existing policy. +WSA_QOS_BAD_STYLE 11012 +QOS bad style. +An unknown or conflicting QOS style was encountered. +WSA_QOS_BAD_OBJECT 11013 +QOS bad object. +A problem was encountered with some part of the filterspec or the provider-specific buffer in general. +WSA_QOS_TRAFFIC_CTRL_ERROR 11014 +QOS traffic control error. +An error with the underlying traffic control (TC) API as the generic QOS request was converted for local enforcement by the TC API. This could be due to an out of memory error or to an internal QOS provider error. +WSA_QOS_GENERIC_ERROR 11015 +QOS generic error. +A general QOS error. +WSA_QOS_ESERVICETYPE 11016 +QOS service type error. +An invalid or unrecognized service type was found in the QOS flowspec. +WSA_QOS_EFLOWSPEC 11017 +QOS flowspec error. +An invalid or inconsistent flowspec was found in the QOS structure. +WSA_QOS_EPROVSPECBUF 11018 +Invalid QOS provider buffer. +An invalid QOS provider-specific buffer. +WSA_QOS_EFILTERSTYLE 11019 +Invalid QOS filter style. +An invalid QOS filter style was used. +WSA_QOS_EFILTERTYPE 11020 +Invalid QOS filter type. +An invalid QOS filter type was used. +WSA_QOS_EFILTERCOUNT 11021 +Incorrect QOS filter count. +An incorrect number of QOS FILTERSPECs were specified in the FLOWDESCRIPTOR. +WSA_QOS_EOBJLENGTH 11022 +Invalid QOS object length. +An object with an invalid ObjectLength field was specified in the QOS provider-specific buffer. +WSA_QOS_EFLOWCOUNT 11023 +Incorrect QOS flow count. +An incorrect number of flow descriptors was specified in the QOS structure. +WSA_QOS_EUNKOWNPSOBJ 11024 +Unrecognized QOS object. +An unrecognized object was found in the QOS provider-specific buffer. +WSA_QOS_EPOLICYOBJ 11025 +Invalid QOS policy object. +An invalid policy object was found in the QOS provider-specific buffer. +WSA_QOS_EFLOWDESC 11026 +Invalid QOS flow descriptor. +An invalid QOS flow descriptor was found in the flow descriptor list. +WSA_QOS_EPSFLOWSPEC 11027 +Invalid QOS provider-specific flowspec. +An invalid or inconsistent flowspec was found in the QOS provider-specific buffer. +WSA_QOS_EPSFILTERSPEC 11028 +Invalid QOS provider-specific filterspec. +An invalid FILTERSPEC was found in the QOS provider-specific buffer. +WSA_QOS_ESDMODEOBJ 11029 +Invalid QOS shape discard mode object. +An invalid shape discard mode object was found in the QOS provider-specific buffer. +WSA_QOS_ESHAPERATEOBJ 11030 +Invalid QOS shaping rate object. +An invalid shaping rate object was found in the QOS provider-specific buffer. +WSA_QOS_RESERVED_PETYPE 11031 +Reserved policy QOS element type. +A reserved policy element was found in the QOS provider-specific buffer. + diff --git a/hpiutil/COPYING b/hpiutil/COPYING new file mode 100644 index 0000000..1a27065 --- /dev/null +++ b/hpiutil/COPYING @@ -0,0 +1,28 @@ +The BSD License + +Copyright (c) 2003, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + a.. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b.. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + c.. Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/hpiutil/ChangeLog b/hpiutil/ChangeLog new file mode 100644 index 0000000..755db47 --- /dev/null +++ b/hpiutil/ChangeLog @@ -0,0 +1,106 @@ +06/20/03 hpiutil 1.0.0 ARCress - initial release, includes: + hpisensor + hpisel + hpifru + hpireset + hpiwdt + hpialarmpanel + SpiLibd + libSpi*.so +06/26/03 hpiutil 1.0.1 ARCress + SpiLibd code: disabled RestoreDefault functions, + fixed Entity path root truncation, + tweaked EventTranslation for event data + hpisel: changed event data logic + hpisensor: added -t for thresholds + hpireset: cut out functions not supported in HPI 1.0 +06/27/03 hpiutil 1.0.2 ARCress + hpiutil.spec: check for ipmidrvr rpm, since no /dev/imb until reboot + Build MV CGE 2.1 rpm (gcc 2) + README: change test suite contact, added Test Notes + env.hpi: increased log level to 5 for errors only + hpiinit.sh: increased log level to 5 for errors only +07/08/03 hpiutil 1.0.3 ARCress + README: added list of APIs +07/22/03 hpiutil 1.0.4 ARCress + Makefile: added changes for OpenHPI + INSTALL: created build/install instructions + env.openhpi: created + hpisel.c: added BUGGY section for OpenHPI Discover workaround + hpisensor.c: added BUGGY section for OpenHPI Discover workaround +08/12/03 hpiutil 1.0.4-2 ARCress + built rh80open rpm with everything for OpenIPMI +09/25/03 hpiutil 1.0.5 ARCress + don't include libraries in rpms +11/12/03 hpiutil 1.0.6 ARCress + hpisel.c: check for CAPABLITY_SEL in RPT +02/19/04 hpiutil 1.1.0 ARCress + hpifru.c: added IsBmcTag() to generalize tag parsing + hpiinit.sh: added LD_ASSUME_KERNEL to avoid RH EL 3 NPTL + hpiutil.spec: changed /etc/init.d name to just "hpi" + hpisensor.c: recognize common errors for Compact & mBMC sensors. + SpiLibd: rebuilt lib objects with Gold Intel HPI 1.0 libraries + README updated for new OSs, etc. +02/23/04 hpiutil 1.1.1 ARCress + hpialarmpanel: added checking/setting disk LEDs + SpiLibd: fixed disk LEDs for mBMC + fixed IPMI timeout for mBMC +03/16/04 hpiutil 1.1.2 ARCress + hpievent 0.8: added general search for any Fan sensor + hpisel 1.2: use better free space logic now + hpiwdt 1.0: use description strings for use and action values, + fixed another 0xcc error w pretimeout byte. + SpiLibd: recognize special Watchdog sensor for mBMC + recognize System Boot records in domain SEL + skip Hysteresis if mBMC (caused ThresholdsGet error) + special code to allow mBMC ThresholdsSet +03/18/04 hpiutil 1.1.3 ARCress + SpiLibd: Check for bad SdrLock at init if mBMC + fix to mBMC ThresholdsSet + fix to not abort if SEL delete timestamp changes + hpievent 1.0: changed general search to a Temp sensor (has Low Major) +03/26/04 hpiutil 1.1.4 ARCress + hpiutil.spec - changes for kill scripts + hpiinit.sh - changes for chkconfig + SpiLibd: Changed timeouts for GetEvent, etc. +06/24/04 hpiutil 1.1.5 ARCress + SpiLibd: Fixed GetIpmiEvent for fast events, more than 1 per second. + test/hpieventloop.c Created for testing fast events, not in rpm + spi-lib.conf: Changed SpiLibHlpResponseTimeout from 9000 to 11000 + for "hpifru -a" client timeout error. +09/02/04 hpiutil 1.1.6 ARCress + SpiLibd: Changed saHpiInitialize to report version 0x010101 (A.01.01) + rather than 0x000101 (pre HPI 1.0) +09/15/04 hpiutil 1.1.7 ARCress + SpiLibd: fixed uninitialized pointer in debug printf for GetEvent +01/12/05 hpiutil 1.1.8 ARCress + SpiLibd: fixed spiCpsRptInfoGetRspCodec for 32bit UpdateCount + SaHpi.h-A: new file, include file for HPI A.01.01 spec + (SaHpi.h is the working copy) + SaHpi.h-B: new file, include file for HPI B.01.01 spec + hpialarmpanel.c: added HPI_A/HPI_B logic, misc changes + hpisel.c: added HPI_A/HPI_B logic + hpisensor.c: added HPI_A/HPI_B logic, misc changes + hpiwdt v1.1 - fixed RPT loop, added more decoding, + added flags for HPI_A/HPI_B. + hpireset v1.1 - added HPI_A/B flags + hpifru v1.3 - added HPI_A/B flags, + increased buffer sizes, check null ptr in fixstr + hpifrub.c new file, fully ported to HPI B + hpifrua.c new file, changed to skip read errors + hpievent.c - added HPI_A/B flags + Makefile - added a common HPI_A/B compile option + +03/16/05 hpiutil 1.1.9 ARCress + SpiLibd: various changes for new TIGI2U platform + hpifrub.c - added FieldSet for asset tag, Changed IsTagBmc usage + hpifrua.c - only write asset tag if IsTagBmc + hpisel.c - decode more of the record for IPMI sensor events + +04/07/05 hpiutil 1.1.10 ARCress + hpievent.c - set UpMajor if not Fan threshold + hpisel.c - add logic to show domain event log if HPI_B + +08/30/11 hpiutil 1.1.11 ARCress + hpiutil.spec - updated Version, syntax of header + hpiinit.sh - use /var/run if /var/lock/subsys is not present. diff --git a/hpiutil/INSTALL b/hpiutil/INSTALL new file mode 100644 index 0000000..ef5790f --- /dev/null +++ b/hpiutil/INSTALL @@ -0,0 +1,27 @@ +hpiutil + +BUILD & INSTALL INSTRUCTIONS + +This package uses the Intel HPI library implementation (closed source), +but there is also an OpenHPI library implementation that could also be +linked with these utilities. There are comments in the Makefile to show +how this can be done. + +How to make the utilities: +1) If OpenHPI, edit the makefile to uncomment the 2 lines indicated. +2) do ". env.hpi" or ". env.openhpi" to set the environment variables +3) make clean +4) make + +How to make the rpms: +(Only valid for Intel HPI at this time.) +mkrpm $OS + where OS = rh80 | as21 | mv21 | mv30 | mv30wv | el3 | mv31 + +How to install the rpms: +(Only valid for Intel HPI at this time.) +rpm -i hpiutil-1.0.3-as21.i386.rpm + The hpi utilities will be in /usr/bin. + The SaHpi libraries will be in /usr/lib. + The *.conf files will be in /etc/hpi. + diff --git a/hpiutil/Makefile b/hpiutil/Makefile new file mode 100644 index 0000000..e1faa35 --- /dev/null +++ b/hpiutil/Makefile @@ -0,0 +1,77 @@ +################################################################################ +# +# Makefile for hpiutils +# +################################################################################ + +# All items listed will be linked. By default, each has a dependency of the corresponding .o file. +# Each .o file has a default dependency of the correspoonding .c file. +TARGETS = hpialarmpanel hpisensor hpisel hpireset hpiwdt hpifru hpievent + +ifeq ($(DEBUG),y) +DEBFLAGS = -O -g3 -DDEBUG +else +DEBFLAGS = -O2 +endif +CFLAGS = $(DEBFLAGS) -Wall -D_REENTRANT -DLINUX -DUNIX -DUWSVR4 +INCLUDES = + +# Intel HPI parameters +LIBDIR = /root/hpi/lib +#LIBDIR = /usr/lib +#LIBDIR = ./rpm/usr/lib +LIBHPI = SaHpi +HPIA = -DHPI_A +# OpenHPI parameters (uncomment the next 3 lines) +#LIBDIR = /usr/local/lib +#LIBHPI = openhpi +#HPIA = +# (If openhpi is less than version 2.0.0, don't uncomment #HPIA.) + +# Additional compile flags +CC = gcc +CFLAGS += +LIBHPIF = $(LIBDIR)/lib$(LIBHPI).so + +# Link flags +LDFLAGS = -pthread +LDFLAGS += -lc +LDFLAGS += -lm +LDFLAGS += -L $(LIBDIR) +LD_LIBRARY_PATH = $(LIBDIR) + +all: $(TARGETS) + +hpialarmpanel: hpialarmpanel.o $(LIBHPIF) + $(CC) $(LDFLAGS) -l$(LIBHPI) -o hpialarmpanel hpialarmpanel.o + +hpisensor: hpisensor.o $(LIBHPIF) + $(CC) $(LDFLAGS) -l$(LIBHPI) -o hpisensor hpisensor.o + +hpisel: hpisel.o $(LIBHPIF) + $(CC) $(LDFLAGS) -l$(LIBHPI) -o hpisel hpisel.o + +hpifru: hpifru.o $(LIBHPIF) + $(CC) $(LDFLAGS) -l$(LIBHPI) -o hpifru hpifru.o + +hpireset: hpireset.o $(LIBHPIF) + $(CC) $(LDFLAGS) -l$(LIBHPI) -o hpireset hpireset.o + +hpiwdt: hpiwdt.o $(LIBHPIF) + $(CC) $(LDFLAGS) -l$(LIBHPI) -o hpiwdt hpiwdt.o + +hpievent: hpievent.o $(LIBHPIF) + $(CC) $(LDFLAGS) -l$(LIBHPI) -o hpievent hpievent.o + +hpieventloop: hpieventloop.o $(LIBHPIF) + $(CC) $(LDFLAGS) -l$(LIBHPI) -o hpieventloop hpieventloop.o + +clean: + rm -f *.o *.i *.s $(TARGETS) + +distclean: clean + rm -f Makefile.deps + +%.o: %.c + $(CC) -c $(CFLAGS) $(INCLUDES) $(HPIA) -o $@ $< + diff --git a/hpiutil/README b/hpiutil/README new file mode 100644 index 0000000..75594f0 --- /dev/null +++ b/hpiutil/README @@ -0,0 +1,249 @@ +hpiutil + +OVERVIEW + +The HPI utilities package provides system management utilities that +conform to the SA Forum's Hardware Platform Interface specification, and +as such are hardware-independent across platforms that have an HPI +library implementation. The HPI library on Intel platforms requires +an IPMI driver. An IPMI driver can be provided by either the Intel +IPMI driver (/dev/imb) or the OpenIPMI driver (/dev/ipmi0) in Linux +kernel versions 2.4.20 and greater. + +This Intel HPI library is currently configured to use the /dev/imb +interface, since that will coexist well with Intel Server Management +software. The hpiutil rpms default to the /dev/imb interface. +Note that the OpenIPMI driver also has imb emulation +as an option. + +To switch to using the OpenIPMI driver's /dev/ipmi0 interface with +this hpiutil package, do this after installing the rpm: + cp /usr/lib/libSpiModIpmi.so /usr/lib/libSpiModIpmi.so-imb + cp /usr/lib/libSpiModIpmi.so-open /usr/lib/libSpiModIpmi.so + sed -e 's/imb/ipmi0/' /etc/hpi/spi-daemon.conf >/tmp/spi + cp /tmp/spi /etc/hpi/spi-daemon.conf + +This package includes the Intel HPI binary libraries and the +following HPI utilities. + hpialarmpanel + hpisel + hpifru + hpisensor + hpireset + hpiwdt + +NOTES +This package uses the Intel HPI library implementation, but there +is also an OpenHPI library implementation that could also be linked +with these utilities. There are comments in the Makefile to show +how this can be done. +The hpiutil utilities are included in OpenHPI 1.0.0 and greater +as openhpi-clients. +The openhpi-2.6.3 and greater releases with the ipmidirect plugin +have been tested to work well on IPMI systems. + +Variations from HPI 1.0 spec: + +- SystemGUID added. Implemented as a FRU Product Custom field. + The IPMI SystemGUID was not supported in the HPI FRU fields. + This library implementation shows SystemGUID as part of FRU, but + does not try to write GUID as part of FRU. + See HPI 1.0 spec errata #66 + +- Power down added to Chassis/Cold Reset RDR via ControlStateSet(OFF) + There was no mechanism defined in the HPI 1.0 spec to support chassis + power down. Here is the way this was implemented with this library. + Doing ControlStateSet(ON) with the Reset RDR causes a hard reset. + Doing ControlStateSet(OFF) with the Reset RDR causes a power down. + See HPI 1.0 spec errata #30 + +- Alarm LED RDRs were not differentiated. + This variation is required to implement ControlStateSet for Alarm LEDs. + See also HPI 1.0 spec errata #75 + The oem field values are used to do this according to the following schema. + + Control.Type Control.OutputType Control.Oem Meaning + Digital (=0) LED (=1) 0x10 Alarm panel Power LED + Digital (=0) LED (=1) 0x11 Alarm panel Critical LED + Digital (=0) LED (=1) 0x12 Alarm panel Major LED + Digital (=0) LED (=1) 0x13 Alarm panel Minor LED + Digital (=0) LED (=1) 0x14 - 0x1F Alarm panel other LEDs + Digital (=0) LED (=1) 0x20 - 0x2F Disk LEDs (if used) + Digital (=0) LED (=1) 0x30 - 0x3F NIC LEDs (if used) + Analog (=2) LED (=1) 0x60 Chassis Identify LED + Analog (=2) LED (=1) 0x61 - 0x6F Other Analog LEDs (if used) + Digital (=0) Generic (=0) 0x70 - 0x7F Chassis Reset Control + + +SUPPORT + +The following error codes are returned by HPI APIs and are defined in SaHpi.h. + 0 SA_OK +-1001 SA_ERR_HPI_ERROR +-1002 SA_ERR_HPI_UNSUPPORTED_API +-1003 SA_ERR_HPI_BUSY +-1004 SA_ERR_HPI_INVALID +-1005 SA_ERR_HPI_INVALID_CMD +-1006 SA_ERR_HPI_TIMEOUT +-1007 SA_ERR_HPI_OUT_OF_SPACE +-1008 SA_ERR_HPI_DATA_TRUNCATED +-1009 SA_ERR_HPI_DATA_LEN_INVALID +-1010 SA_ERR_HPI_DATA_EX_LIMITS +-1011 SA_ERR_HPI_INVALID_PARAMS +-1012 SA_ERR_HPI_INVALID_DATA +-1013 SA_ERR_HPI_NOT_PRESENT +-1014 SA_ERR_HPI_INVALID_DATA_FIELD +-1015 SA_ERR_HPI_INVALID_SENSOR_CMD +-1016 SA_ERR_HPI_NO_RESPONSE +-1017 SA_ERR_HPI_DUPLICATE +-1018 SA_ERR_HPI_UPDATING +-1019 SA_ERR_HPI_INITIALIZING +-1020 SA_ERR_HPI_UNKNOWN +-1021 SA_ERR_HPI_INVALID_SESSION +-1022 SA_ERR_HPI_INVALID_DOMAIN +-1023 SA_ERR_HPI_INVALID_RESOURCE +-1024 SA_ERR_HPI_INVALID_REQUEST +-1025 SA_ERR_HPI_ENTITY_NOT_PRESENT +-1026 SA_ERR_HPI_UNINITIALIZED + +If problems occur, additional debug information can be obtained by +editing the SPI_DAEMON_LOG_LEVEL variable in the /etc/rc.d/init.d/hpi +script to change the log level. +SPI_DAEMON_LOG_LEVEL - Level at which to log debug information. The + following list describes each of the logging + switches. Multiple switches may be used at once. + -l: Logs data at a given level. Where num... + 1 = Logs debug low through fatal errors. + 2 = Logs debug high through fatal errors. + 3 = Logs informational through fatal errors. + 4 = Logs warnings through fatal errors. + 5 = Log non-fatal errors and fatal errors. + 6 = Logs fatal errors only. + -lf: Logs function entrance and exit.* + -lm: Logs memory usage.* + -ls: Logs semaphore usage.* + * = In order to use these options, the -l + option must also be set. + +Support for the hpiutil rpm is provided on a best-effort basis via + tltsupport@linux.intel.com + + +REFERENCES + +IPMI 1.5 specification: http://www.intel.com/design/servers/ipmi/ +Open source IPMI utilities: http://panicsel.sourceforge.net +SA Forum HPI 1.0 spec: http://www.saforum.org/specification/HPI_Specification +Intel HPI 1.0 compliance test suite: Contact Keith.L.Perrin@Intel.com +OpenHPI project: http://openhpi.sourceforge.net + +TESTING + + The binary HPI libraries included in this package have been tested to be + HPI 1.0 compliant via the Intel HPI 1.0 compliance test suite. + + This package has been tested and is supported on the following Intel + servers: TSRLT2, TSRMT2, TIGPR2U, TIGPT1U. + See also http://www.saforum.org for platform support information. + Most of the utilities (except hpialarmpanel) should work on other + platforms as well, if they have IPMI 1.5 support. + Note that mBMC platforms, such as TIGPT1U, do not support the + Power On Hours function, which is optional in IPMI 1.5. + + This hpiutil package is not inherently dependent on any OS variance, + as long as there is an IPMI driver. However, the version of glibc/gcc + does matter, since the library includes shared object files. + This HPI library and the HPI utilities have been tested on the + following Linux OSs. + RedHat EL 3 (gcc 3.2.3, glibc 2.3.2) + RedHat AS 2.1 (gcc 2.96, glibc 2.2.4) + RedHat 8.0 (gcc 3.2, glibc 2.2.93) + MontaVista CGE 2.1 (gcc 2.95.3, glibc 2.2.3 ) + MontaVista CGE 3.0 (gcc 3.2.1, glibc 2.2.5) + MontaVista CGE 3.1 (gcc 3.2.1, glibc 2.2.5) + Other Linux OSs should work fine using an rpm with similar gcc/glibc. + + SA-HPI Release 1.0 Library APIs + The following APIs are supported in this release: + +Initialization and Cleanup +saHpiInitialize() +saHpiFinalize() +Session Management +saHpiSessionOpen() +saHpiSessionClose() + +Discovery of Resources +saHpiResourcesDiscover() +saHpiRptInfoGet() +saHpiRptEntryGet() +saHpiRptEntryGetByResourceId() +saHpiResourceSeveritySet() +saHpiResourceTagSet() +saHpiResourceIdGet() +saHpiEntitySchemaGet() + +Event Log Management +saHpiEventLogInfoGet() +saHpiEventLogEntryGet() +saHpiEventLogEntryAdd() +saHpiEventLogEntryDelete () +saHpiEventLogClear() +saHpiEventLogTimeGet() +saHpiEventLogTimeSet() +saHpiEventLogStateGet() +saHpiEventLogStateSet() + +Events +saHpiSubscribe() +saHpiUnsubscribe() +saHpiEventGet() + +RDR Repository Management +saHpiRdrGet() + +Sensor Functions +saHpiSensorReadingGet() +saHpiSensorReadingConvert() +saHpiSensorThresholdsGet() +saHpiSensorThresholdsSet() +saHpiSensorTypeGet() +saHpiSensorEventEnablesGet() +saHpiSensorEventEnablesSet() + +Controls +saHpiControlTypeGet() +saHpiControlStateGet() +saHpiControlStateSet() + +Entity Inventory Data +saHpiEntityInventoryDataRead() +saHpiEntityInventoryDataWrite() + +Watchdog Timer +saHpiWatchdogTimerGet() +saHpiWatchdogTimerSet() +saHpiWatchdogTimerReset() + +Reset +saHpiResourceResetStateGet() +saHpiResourceResetStateSet() + +Hot Swap Routines +saHpiHotSwapControlRequest() +saHpiResourceActiveSet() +saHpiResourceInactiveSet() +saHpiAutoInsertTimeoutGet() +saHpiAutoInsertTimeoutSet() +saHpiAutoExtractTimeoutGet() +saHpiAutoExtractTimeoutSet() +saHpiHotSwapStateGet() +saHpiHotSwapActionRequest() +saHpiResourcePowerStateGet() +saHpiResourcePowerStateSet() +saHpiHotSwapIndicatorStateGet() +saHpiHotSwapIndicatorStateSet() + +Configuration +saHpiParmControl() - disabled for this library by design + diff --git a/hpiutil/SaHpi.h b/hpiutil/SaHpi.h new file mode 100644 index 0000000..6efd5e9 --- /dev/null +++ b/hpiutil/SaHpi.h @@ -0,0 +1,4509 @@ +/******************************************************************************* +** +** FILE: +** SaHpi.h +** +** DESCRIPTION: +** This file provides the C language binding for the Service +** Availability(TM) Forum Platform Interface. It contains all of +** the prototypes and type definitions. Note, this file was +** generated from the Platform Interface specification document. +** +** SPECIFICATION VERSION: +** SAI-HPI-A.01.01 +** +** DATE: +** Thu Oct 3 14:48:41 2002 +** +** LEGAL: +** OWNERSHIP OF SPECIFICATION AND COPYRIGHTS. +** The Specification and all worldwide copyrights therein are +** the exclusive property of Licensor. You may not remove, obscure, or +** alter any copyright or other proprietary rights notices that are in or +** on the copy of the Specification you download. You must reproduce all +** such notices on all copies of the Specification you make. Licensor +** may make changes to the Specification, or to items referenced therein, +** at any time without notice. Licensor is not obligated to support or +** update the Specification. +** +** Copyright(c) 2002, Service Availability(TM) Forum. All rights +** reserved. +** +*******************************************************************************/ + +#ifndef __SAHPI_H +#define __SAHPI_H + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Basic Data Types and Values ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* General Types - need to be specified correctly for the host architecture */ +typedef unsigned char SaHpiUint8T; +typedef unsigned short SaHpiUint16T; +typedef unsigned int SaHpiUint32T; +typedef char SaHpiInt8T; +typedef short SaHpiInt16T; +typedef int SaHpiInt32T; +typedef long long SaHpiInt64T; +typedef float SaHpiFloat32T; +typedef double SaHpiFloat64T; + +typedef SaHpiUint8T SaHpiBoolT; +#define SAHPI_TRUE 1 +#define SAHPI_FALSE 0 + +/* Platform, O/S, or Vendor dependent */ +#define SAHPI_API +#define SAHPI_IN +#define SAHPI_OUT +#define SAHPI_INOUT + +/* +** Identifier for the manufacturer +** +** This is the IANA-assigned private enterprise number for the +** manufacturer of the resource or FRU, or of the manufacturer +** defining an OEM control or event type. A list of current +** IANA-assigned private enterprise numbers may be obtained at +** +** http://www.iana.org/assignments/enterprise-numbers +** +** If a manufacturer does not currently have an assigned number, one +** may be obtained by following the instructions located at +** +** http://www.iana.org/cgi-bin/enterprise.pl +*/ +typedef SaHpiUint32T SaHpiManufacturerIdT; +#define SAHPI_MANUFACTURER_ID_UNSPECIFIED (SaHpiManufacturerIdT)0 + +/* Version Types */ +typedef SaHpiUint32T SaHpiVersionT; + +/* +** Interface Version +** +** The interface version is the version of the actual interface and not the +** version of the implementation. It is a 24 bit value where +** the most significant 8 bits represent the compatibility level +** (with letters represented as the corresponding numbers); +** the next 8 bits represent the major version number; and +** the least significant 8 bits represent the minor version number. +*/ +#define SAHPI_INTERFACE_VERSION (SaHpiVersionT)0x010101 /* A.01.01 */ + +/* +** Return Codes +** +** SaErrorT is defined in the HPI specification. In the future a +** common SAF types definition may be created to contain this type. At +** that time, this typedef should be removed. +*/ +typedef SaHpiInt32T SaErrorT; /* Return code */ + +/* +** SA_OK: This code indicates that a command completed successfully. +*/ +#define SA_OK (SaErrorT)0x0000 + +/* This value is the base for all HPI-specific error codes. */ +#define SA_HPI_ERR_BASE -1000 + +/* +** SA_ERR_HPI_ERROR: An unspecified error occurred. This code should +** be returned only as a last resort; eg. if the cause of an error +** cannot be determined. +*/ +#define SA_ERR_HPI_ERROR (SaErrorT)(SA_HPI_ERR_BASE - 1) + +/* +** SA_ERR_HPI_UNSUPPORTED_API: The HPI implementation does not support +** this API. This code is appropriate, for example, if invoking the +** Hot Swap functions on an HPI implementation which has no hot swap +** support. Note that such an implementation would not report any hot +** swap capabilities via its RDRs. +*/ +#define SA_ERR_HPI_UNSUPPORTED_API (SaErrorT)(SA_HPI_ERR_BASE - 2) + +/* +** SA_ERR_HPI_BUSY: The command cannot be performed because the +** targeted device is busy. +*/ +#define SA_ERR_HPI_BUSY (SaErrorT)(SA_HPI_ERR_BASE - 3) + +/* +** SA_ERR_HPI_INVALID: The request is fundamentally invalid. +*/ +#define SA_ERR_HPI_INVALID (SaErrorT)(SA_HPI_ERR_BASE - 4) + +/* +** SA_ERR_HPI_INVALID_CMD: The specific object to which a command was +** directed does not support that command (which was otherwise valid). +*/ +#define SA_ERR_HPI_INVALID_CMD (SaErrorT)(SA_HPI_ERR_BASE - 5) + +/* +** SA_ERR_HPI_TIMEOUT: The requested operation, which had a timeout +** value specified, timed out. For example, when reading input with a +** timeout value, if no input arrives within the timeout interval, +** this code should be returned. This should only be returned in +** cases where a timeout is anticipated as a valid consequence of the +** operation; if the addressed entity is not responding due to a +** fault, use SA_ERR_HPI_NO_RESPONSE (qv). +*/ +#define SA_ERR_HPI_TIMEOUT (SaErrorT)(SA_HPI_ERR_BASE - 6) + +/* +** SA_ERR_HPI_OUT_OF_SPACE: The requested command failed due to +** resource limits. +*/ +#define SA_ERR_HPI_OUT_OF_SPACE (SaErrorT)(SA_HPI_ERR_BASE - 7) + +/* +** SA_ERR_HPI_DATA_TRUNCATED: The returned data was truncated. For +** example, when reading data into a fixed-size buffer, if the data is +** larger than the buffer, this code should be returned. +*/ +#define SA_ERR_HPI_DATA_TRUNCATED (SaErrorT)(SA_HPI_ERR_BASE - 8) + +/* +** SA_ERR_HPI_DATA_LEN_INVALID: The specified data length is invalid. +*/ +#define SA_ERR_HPI_DATA_LEN_INVALID (SaErrorT)(SA_HPI_ERR_BASE - 9) + +/* +** SA_ERR_HPI_DATA_EX_LIMITS: The supplied data exceeds limits. +*/ +#define SA_ERR_HPI_DATA_EX_LIMITS (SaErrorT)(SA_HPI_ERR_BASE - 10) + +/* +** SA_ERR_HPI_INVALID_PARAMS: One or more parameters to the command +** were invalid. +*/ +#define SA_ERR_HPI_INVALID_PARAMS (SaErrorT)(SA_HPI_ERR_BASE - 11) + +/* +** SA_ERR_HPI_INVALID_DATA: Cannot return requested data; eg. the +** specific object to which a command was directed does not support +** the data required by the command. +*/ +#define SA_ERR_HPI_INVALID_DATA (SaErrorT)(SA_HPI_ERR_BASE - 12) + +/* +** SA_ERR_HPI_NOT_PRESENT: The requested object was not present. For +** example, this code would be returned when attempting to access an +** entry in a RPT or RDR which is not present. As another example, this +** code would also be returned when accessing an invalid management +** instrument on a valid resource. +*/ +#define SA_ERR_HPI_NOT_PRESENT (SaErrorT)(SA_HPI_ERR_BASE - 13) + +/* +** SA_ERR_HPI_INVALID_DATA_FIELD: Invalid data field. +*/ +#define SA_ERR_HPI_INVALID_DATA_FIELD (SaErrorT)(SA_HPI_ERR_BASE - 14) + +/* +** SA_ERR_HPI_INVALID_SENSOR_CMD: Invalid sensor command. +*/ +#define SA_ERR_HPI_INVALID_SENSOR_CMD (SaErrorT)(SA_HPI_ERR_BASE - 15) + +/* +** SA_ERR_HPI_NO_RESPONSE: There was no response from the domain or +** object targeted by the command, due to some fault. This code +** indicates an un-anticipated failure to respond; compare with +** SA_ERR_HPI_TIMEOUT. +*/ +#define SA_ERR_HPI_NO_RESPONSE (SaErrorT)(SA_HPI_ERR_BASE - 16) + +/* +** SA_ERR_HPI_DUPLICATE: Duplicate request -- such as attempting to +** initialize something which has already been initialized (and which +** cannot be initialized twice). +*/ +#define SA_ERR_HPI_DUPLICATE (SaErrorT)(SA_HPI_ERR_BASE - 17) + +/* +** SA_ERR_HPI_UPDATING: The command could not be completed because +** the targeted object is in update mode. +*/ +#define SA_ERR_HPI_UPDATING (SaErrorT)(SA_HPI_ERR_BASE - 18) + +/* +** SA_ERR_HPI_INITIALIZING: The command could not be completed because +** the targeted object is initializing. +*/ +#define SA_ERR_HPI_INITIALIZING (SaErrorT)(SA_HPI_ERR_BASE - 19) + +/* +** SA_ERR_HPI_UNKNOWN: This code should be returned if, for some +** reason, the HPI implementation cannot determine the proper response +** to a command. For example, there may be a proper value to return +** for a given call, but the implementation may be unable to determine +** which one it is. +*/ +#define SA_ERR_HPI_UNKNOWN (SaErrorT)(SA_HPI_ERR_BASE - 20) + +/* +** SA_ERR_HPI_INVALID_SESSION: An invalid session ID was specified in +** the command. +*/ +#define SA_ERR_HPI_INVALID_SESSION (SaErrorT)(SA_HPI_ERR_BASE - 21) + +/* +** SA_ERR_HPI_INVALID_DOMAIN: Invalid domain ID specified -- ie. a +** domain ID which does not correspond to any real domain was +** specified in the command. +*/ +#define SA_ERR_HPI_INVALID_DOMAIN (SaErrorT)(SA_HPI_ERR_BASE - 22) + +/* +** SA_ERR_HPI_INVALID_RESOURCE: Invalid resource ID specified -- ie. a +** resource ID which does not correspond to a resource in the addressed +** domain was specified in the command. +*/ +#define SA_ERR_HPI_INVALID_RESOURCE (SaErrorT)(SA_HPI_ERR_BASE - 23) + +/* +** SA_ERR_HPI_INVALID_REQUEST: The request is invalid in the current +** context. An example would be attempting to unsubscribe for events, +** when the caller has not subscribed to events. +*/ +#define SA_ERR_HPI_INVALID_REQUEST (SaErrorT)(SA_HPI_ERR_BASE - 24) + +/* +** SA_ERR_HPI_ENTITY_NOT_PRESENT: The addressed management instrument is not active +** because the entity with which it is associated is not present. This +** condition could occur, for instance, when an alarm module is managing a +** fan tray FRU. The alarm module would contain management instruments (sensors, +** etc) for the fan tray. The fan tray may be removed, even though the +** management instruments are still represented in the alarm module. In this +** case, SA_ERR_HPI_ENTITY_NOT_PRESENT would be returned if a management instrument +** associated with a removed entity is accessed. +*/ +#define SA_ERR_HPI_ENTITY_NOT_PRESENT (SaErrorT)(SA_HPI_ERR_BASE - 25) + +/* +** SA_ERR_HPI_UNINITIALIZED: This code is returned when a request is +** made, and the HPI has not, yet, been initialized via saHpiInitialize(). +*/ +#define SA_ERR_HPI_UNINITIALIZED (SaErrorT)(SA_HPI_ERR_BASE - 26) + + +/* +** Domain, Session and Resource Type Definitions +*/ + +/* Domain ID. */ +typedef SaHpiUint32T SaHpiDomainIdT; +#define SAHPI_DEFAULT_DOMAIN_ID (SaHpiDomainIdT)0 + +/* The SAHPI_UNSPECIFIED_DOMAIN_ID value may be used by an implementation +** when populating the ResourceId value for an RPT entry that is a +** domain only. +*/ +#define SAHPI_UNSPECIFIED_DOMAIN_ID (SaHpiDomainIdT) 0xFFFFFFFF + +/* Session ID. */ +typedef SaHpiUint32T SaHpiSessionIdT; + +/* Resource identifier. */ +typedef SaHpiUint32T SaHpiResourceIdT; + +/* The SAHPI_UNSPECIFIED_RESOURCE_ID value may be used by an implementation +** when populating the DomainId value for an RPT entry that is a +** resource only. Note that this reserved value (0xFFFFFFFF) is also used +** to designate the domain controller, for domain-based event log access. +*/ +#define SAHPI_UNSPECIFIED_RESOURCE_ID (SaHpiResourceIdT) 0xFFFFFFFF + +/* The SAHPI_DOMAIN_CONTROLLER_ID value is a reserved resource ID +** value which is used to select the domain controller's event log +** (as opposed to a real resource's event log) when accessing logs. +** This value must not be used as the ID of any real resource. +*/ +#define SAHPI_DOMAIN_CONTROLLER_ID (SaHpiResourceIdT) 0xFFFFFFFE + +/* Table Related Type Definitions */ +typedef SaHpiUint32T SaHpiEntryIdT; +#define SAHPI_FIRST_ENTRY (SaHpiEntryIdT)0x00000000 +#define SAHPI_LAST_ENTRY (SaHpiEntryIdT)0xFFFFFFFF + +/* +** Time Related Type Definitions +** +** An HPI time value represents the local time as the number of nanoseconds +** from 00:00:00, January 1, 1970, in a 64-bit signed integer. This format +** is sufficient to represent times with nano-second resolution from the +** year 1678 to 2262. Every API which deals with time values must define +** the timezone used. +** +** It should be noted that although nano-second resolution is supported +** in the data type, the actual resolution provided by an implementation +** may be more limited than this. +** +** The value -2**63, which is 0x8000000000000000, is used to indicate +** "unknown/unspecified time". +** +** Conversion to/from POSIX and other common time representations is +** relatively straightforward. The following code framgment converts +** between SaHpiTimeT and time_t: +** +** time_t tt1, tt2; +** SaHpiTimeT saHpiTime; +** +** time(&tt1); +** saHpiTime = (SaHpiTimeT) tt1 * 1000000000; +** tt2 = saHpiTime / 1000000000; +** +** The following fragment converts between SaHpiTimeT and a struct timeval: +** +** struct timeval tv1, tv2; +** SaHpiTimeT saHpiTime; +** +** gettimeofday(&tv1, NULL); +** saHpiTime = (SaHpiTimeT) tv1.tv_sec * 1000000000 + tv1.tv_usec * 1000; +** tv2.tv_sec = saHpiTime / 1000000000; +** tv2.tv_usec = saHpiTime % 1000000000 / 1000; +** +** The following fragment converts between SaHpiTimeT and a struct timespec: +** +** struct timespec ts1, ts2; +** SaHpiTimeT saHpiTime; +** +** clock_gettime(CLOCK_REALTIME, &ts1); +** saHpiTime = (SaHpiTimeT) ts1.tv_sec * 1000000000 + ts1.tv_nsec; +** ts2.tv_sec = saHpiTime / 1000000000; +** ts2.tv_nsec = saHpiTime % 1000000000; +** +** Note, however, that since time_t is (effectively) universally 32 bits, +** all of these conversions will cease to work on January 18, 2038. +** +** Some subsystems may need the flexibility to report either absolute or +** relative (eg. to system boot) times. This will typically be in the +** case of a board which may or may not, depending on the system setup, +** have an idea of absolute time. For example, some boards may have +** "time of day" clocks which start at zero, and never get set to the +** time of day. +** +** In these cases, times which represent "current" time (in events, for +** example) can be reported based on the clock value, whether it has been +** set to the actual date/time, or whether it represents the elapsed time +** since boot. If it is the time since boot, the value will be (for 27 +** years) less than 0x0C00000000000000, which is Mon May 26 16:58:48 1997. +** If the value is greater than this, then it can be assumed to be an +** absolute time. +** +** Every API which can report either absolute or relative times must +** state this rule clearly in its interface specification. +*/ +typedef SaHpiInt64T SaHpiTimeT; /* Time in nanoseconds */ + +/* Unspecified or unknown time */ +#define SAHPI_TIME_UNSPECIFIED (SaHpiTimeT) 0x8000000000000000 + +/* Maximum time that can be specified as relative */ +#define SAHPI_TIME_MAX_RELATIVE (SaHpiTimeT) 0x0C00000000000000 +typedef SaHpiInt64T SaHpiTimeoutT; /* Timeout in nanoseconds */ + +/* Non-blocking call */ +#define SAHPI_TIMEOUT_IMMEDIATE (SaHpiTimeoutT) 0x0000000000000000 + +/* Blocking call, wait indefinitely for call to complete */ +#define SAHPI_TIMEOUT_BLOCK (SaHpiTimeoutT) -1 + +/* +** Language +** +** This enumeration lists all of the languages that can be associated with text. +** +** SAHPI_LANG_UNDEF indicates that the language is unspecified or +** unknown. +*/ +typedef enum { + SAHPI_LANG_UNDEF = 0, SAHPI_LANG_AFAR, SAHPI_LANG_ABKHAZIAN, + SAHPI_LANG_AFRIKAANS, SAHPI_LANG_AMHARIC, SAHPI_LANG_ARABIC, + SAHPI_LANG_ASSAMESE, SAHPI_LANG_AYMARA, SAHPI_LANG_AZERBAIJANI, + SAHPI_LANG_BASHKIR, SAHPI_LANG_BYELORUSSIAN, SAHPI_LANG_BULGARIAN, + SAHPI_LANG_BIHARI, SAHPI_LANG_BISLAMA, SAHPI_LANG_BENGALI, + SAHPI_LANG_TIBETAN, SAHPI_LANG_BRETON, SAHPI_LANG_CATALAN, + SAHPI_LANG_CORSICAN, SAHPI_LANG_CZECH, SAHPI_LANG_WELSH, + SAHPI_LANG_DANISH, SAHPI_LANG_GERMAN, SAHPI_LANG_BHUTANI, + SAHPI_LANG_GREEK, SAHPI_LANG_ENGLISH, SAHPI_LANG_ESPERANTO, + SAHPI_LANG_SPANISH, SAHPI_LANG_ESTONIAN, SAHPI_LANG_BASQUE, + SAHPI_LANG_PERSIAN, SAHPI_LANG_FINNISH, SAHPI_LANG_FIJI, + SAHPI_LANG_FAEROESE, SAHPI_LANG_FRENCH, SAHPI_LANG_FRISIAN, + SAHPI_LANG_IRISH, SAHPI_LANG_SCOTSGAELIC, SAHPI_LANG_GALICIAN, + SAHPI_LANG_GUARANI, SAHPI_LANG_GUJARATI, SAHPI_LANG_HAUSA, + SAHPI_LANG_HINDI, SAHPI_LANG_CROATIAN, SAHPI_LANG_HUNGARIAN, + SAHPI_LANG_ARMENIAN, SAHPI_LANG_INTERLINGUA, SAHPI_LANG_INTERLINGUE, + SAHPI_LANG_INUPIAK, SAHPI_LANG_INDONESIAN, SAHPI_LANG_ICELANDIC, + SAHPI_LANG_ITALIAN, SAHPI_LANG_HEBREW, SAHPI_LANG_JAPANESE, + SAHPI_LANG_YIDDISH, SAHPI_LANG_JAVANESE, SAHPI_LANG_GEORGIAN, + SAHPI_LANG_KAZAKH, SAHPI_LANG_GREENLANDIC, SAHPI_LANG_CAMBODIAN, + SAHPI_LANG_KANNADA, SAHPI_LANG_KOREAN, SAHPI_LANG_KASHMIRI, + SAHPI_LANG_KURDISH, SAHPI_LANG_KIRGHIZ, SAHPI_LANG_LATIN, + SAHPI_LANG_LINGALA, SAHPI_LANG_LAOTHIAN, SAHPI_LANG_LITHUANIAN, + SAHPI_LANG_LATVIANLETTISH, SAHPI_LANG_MALAGASY, SAHPI_LANG_MAORI, + SAHPI_LANG_MACEDONIAN, SAHPI_LANG_MALAYALAM, SAHPI_LANG_MONGOLIAN, + SAHPI_LANG_MOLDAVIAN, SAHPI_LANG_MARATHI, SAHPI_LANG_MALAY, + SAHPI_LANG_MALTESE, SAHPI_LANG_BURMESE, SAHPI_LANG_NAURU, + SAHPI_LANG_NEPALI, SAHPI_LANG_DUTCH, SAHPI_LANG_NORWEGIAN, + SAHPI_LANG_OCCITAN, SAHPI_LANG_AFANOROMO, SAHPI_LANG_ORIYA, + SAHPI_LANG_PUNJABI, SAHPI_LANG_POLISH, SAHPI_LANG_PASHTOPUSHTO, + SAHPI_LANG_PORTUGUESE, SAHPI_LANG_QUECHUA, SAHPI_LANG_RHAETOROMANCE, + SAHPI_LANG_KIRUNDI, SAHPI_LANG_ROMANIAN, SAHPI_LANG_RUSSIAN, + SAHPI_LANG_KINYARWANDA, SAHPI_LANG_SANSKRIT, SAHPI_LANG_SINDHI, + SAHPI_LANG_SANGRO, SAHPI_LANG_SERBOCROATIAN, SAHPI_LANG_SINGHALESE, + SAHPI_LANG_SLOVAK, SAHPI_LANG_SLOVENIAN, SAHPI_LANG_SAMOAN, + SAHPI_LANG_SHONA, SAHPI_LANG_SOMALI, SAHPI_LANG_ALBANIAN, + SAHPI_LANG_SERBIAN, SAHPI_LANG_SISWATI, SAHPI_LANG_SESOTHO, + SAHPI_LANG_SUDANESE, SAHPI_LANG_SWEDISH, SAHPI_LANG_SWAHILI, + SAHPI_LANG_TAMIL, SAHPI_LANG_TELUGU, SAHPI_LANG_TAJIK, + SAHPI_LANG_THAI, SAHPI_LANG_TIGRINYA, SAHPI_LANG_TURKMEN, + SAHPI_LANG_TAGALOG, SAHPI_LANG_SETSWANA, SAHPI_LANG_TONGA, + SAHPI_LANG_TURKISH, SAHPI_LANG_TSONGA, SAHPI_LANG_TATAR, + SAHPI_LANG_TWI, SAHPI_LANG_UKRAINIAN, SAHPI_LANG_URDU, + SAHPI_LANG_UZBEK, SAHPI_LANG_VIETNAMESE, SAHPI_LANG_VOLAPUK, + SAHPI_LANG_WOLOF, SAHPI_LANG_XHOSA, SAHPI_LANG_YORUBA, + SAHPI_LANG_CHINESE, SAHPI_LANG_ZULU +} SaHpiLanguageT; + +/* +** Text Buffers +** +** These structures are used for defining the type of data in the text buffer +** and the length of the buffer. Text buffers are used in the inventory data, +** RDR, RPT, etc. for variable length strings of data. +*/ + +#define SAHPI_MAX_TEXT_BUFFER_LENGTH 255 + +typedef enum { + SAHPI_TL_TYPE_BINARY = 0, /* String of bytes, any values legal */ + SAHPI_TL_TYPE_BCDPLUS, /* String of 0-9, space, dash, period ONLY */ + SAHPI_TL_TYPE_ASCII6, /* Reduced ASCII character set: 0x20-0x5F + ONLY */ + SAHPI_TL_TYPE_LANGUAGE /* ASCII or UNICODE depending on language */ +} SaHpiTextTypeT; + +typedef struct { + SaHpiTextTypeT DataType; + SaHpiLanguageT Language; /* Language the text is in. */ + SaHpiUint8T DataLength; /* Bytes used in Data buffer */ + SaHpiUint8T Data[SAHPI_MAX_TEXT_BUFFER_LENGTH]; /* Data buffer */ +} SaHpiTextBufferT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Entities ********** +********** ********** +******************************************************************************** +*******************************************************************************/ +/* +** Entity Types +** +** Entities are used to associate specific hardware components with sensors, +** controls, watchdogs, or resources. Entities are defined with an entity +** type enumeration, and an entity instance number (to distinguish between +** multiple instances of a particular type of entity; e.g., multiple power +** supplies in a system). +** +** Entities are uniquely identified in a system with an ordered series of +** Entity Type / Entity Instance pairs called an "Entity Path". Each subsequent +** Entity Type/Entity Instance in the path is the next higher "containing" +** entity. The "root" of the Entity Path (the outermost level of containment) +** is designated with an Entity Type of SAHPI_ENT_ROOT if the entire Entity Path +** is fewer than SAHPI_MAX_ENTITY_PATH entries in length. +** +** Enumerated Entity Types include those types enumerated by the IPMI Consortium +** for IPMI-managed entities, as well as additional types defined by the +** HPI specification. Room is left in the enumeration for the inclusion of +** Entity Types taken from other lists, if needed in the future. +*/ +/* Base values for entity types from various sources. */ +#define SAHPI_ENT_IPMI_GROUP 0 +#define SAHPI_ENT_SAFHPI_GROUP 0x10000 +#define SAHPI_ENT_ROOT_VALUE 0xFFFF +typedef enum +{ + SAHPI_ENT_UNSPECIFIED = SAHPI_ENT_IPMI_GROUP, + SAHPI_ENT_OTHER, + SAHPI_ENT_UNKNOWN, + SAHPI_ENT_PROCESSOR, + SAHPI_ENT_DISK_BAY, /* Disk or disk bay */ + SAHPI_ENT_PERIPHERAL_BAY, + SAHPI_ENT_SYS_MGMNT_MODULE, /* System management module */ + SAHPI_ENT_SYSTEM_BOARD, /* Main system board, may also be + processor board and/or internal + expansion board */ + SAHPI_ENT_MEMORY_MODULE, /* Board holding memory devices */ + SAHPI_ENT_PROCESSOR_MODULE, /* Holds processors, use this + designation when processors are not + mounted on system board */ + SAHPI_ENT_POWER_SUPPLY, /* Main power supply (supplies) for the + system */ + SAHPI_ENT_ADD_IN_CARD, + SAHPI_ENT_FRONT_PANEL_BOARD, /* Control panel */ + SAHPI_ENT_BACK_PANEL_BOARD, + SAHPI_ENT_POWER_SYSTEM_BOARD, + SAHPI_ENT_DRIVE_BACKPLANE, + SAHPI_ENT_SYS_EXPANSION_BOARD, /* System internal expansion board + (contains expansion slots). */ + SAHPI_ENT_OTHER_SYSTEM_BOARD, /* Part of board set */ + SAHPI_ENT_PROCESSOR_BOARD, /* Holds 1 or more processors. Includes + boards that hold SECC modules) */ + SAHPI_ENT_POWER_UNIT, /* Power unit / power domain (typically + used as a pre-defined logical entity + for grouping power supplies)*/ + SAHPI_ENT_POWER_MODULE, /* Power module / DC-to-DC converter. + Use this value for internal + converters. Note: You should use + entity ID (power supply) for the + main power supply even if the main + supply is a DC-to-DC converter */ + SAHPI_ENT_POWER_MGMNT, /* Power management/distribution + board */ + SAHPI_ENT_CHASSIS_BACK_PANEL_BOARD, + SAHPI_ENT_SYSTEM_CHASSIS, + SAHPI_ENT_SUB_CHASSIS, + SAHPI_ENT_OTHER_CHASSIS_BOARD, + SAHPI_ENT_DISK_DRIVE_BAY, + SAHPI_ENT_PERIPHERAL_BAY_2, + SAHPI_ENT_DEVICE_BAY, + SAHPI_ENT_COOLING_DEVICE, /* Fan/cooling device */ + SAHPI_ENT_COOLING_UNIT, /* Can be used as a pre-defined logical + entity for grouping fans or other + cooling devices. */ + SAHPI_ENT_INTERCONNECT, /* Cable / interconnect */ + SAHPI_ENT_MEMORY_DEVICE, /* This Entity ID should be used for + replaceable memory devices, e.g. + DIMM/SIMM. It is recommended that + Entity IDs not be used for + individual non-replaceable memory + devices. Rather, monitoring and + error reporting should be associated + with the FRU [e.g. memory card] + holding the memory. */ + SAHPI_ENT_SYS_MGMNT_SOFTWARE, /* System Management Software */ + SAHPI_ENT_BIOS, + SAHPI_ENT_OPERATING_SYSTEM, + SAHPI_ENT_SYSTEM_BUS, + SAHPI_ENT_GROUP, /* This is a logical entity for use with + Entity Association records. It is + provided to allow a sensor data + record to point to an entity- + association record when there is no + appropriate pre-defined logical + entity for the entity grouping. + This Entity should not be used as a + physical entity. */ + SAHPI_ENT_REMOTE, /* Out of band management communication + device */ + SAHPI_ENT_EXTERNAL_ENVIRONMENT, + SAHPI_ENT_BATTERY, + SAHPI_ENT_CHASSIS_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0x90, + SAHPI_ENT_BOARD_SET_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0xB0, + SAHPI_ENT_OEM_SYSINT_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0xD0, + SAHPI_ENT_ROOT = SAHPI_ENT_ROOT_VALUE, + SAHPI_ENT_RACK = SAHPI_ENT_SAFHPI_GROUP, + SAHPI_ENT_SUBRACK, + SAHPI_ENT_COMPACTPCI_CHASSIS, + SAHPI_ENT_ADVANCEDTCA_CHASSIS, + SAHPI_ENT_SYSTEM_SLOT, + SAHPI_ENT_SBC_BLADE, + SAHPI_ENT_IO_BLADE, + SAHPI_ENT_DISK_BLADE, + SAHPI_ENT_DISK_DRIVE, + SAHPI_ENT_FAN, + SAHPI_ENT_POWER_DISTRIBUTION_UNIT, + SAHPI_ENT_SPEC_PROC_BLADE, /* Special Processing Blade, + including DSP */ + SAHPI_ENT_IO_SUBBOARD, /* I/O Sub-Board, including + PMC I/O board */ + SAHPI_ENT_SBC_SUBBOARD, /* SBC Sub-Board, including PMC + SBC board */ + SAHPI_ENT_ALARM_MANAGER, /* Chassis alarm manager board */ + SAHPI_ENT_ALARM_MANAGER_BLADE, /* Blade-based alarm manager */ + SAHPI_ENT_SUBBOARD_CARRIER_BLADE /* Includes PMC Carrier Blade -- + Use only if "carrier" is only + function of blade. Else use + primary function (SBC_BLADE, + DSP_BLADE, etc.). */ + } SaHpiEntityTypeT; + +typedef SaHpiUint32T SaHpiEntityInstanceT; + +typedef struct { + SaHpiEntityTypeT EntityType; + SaHpiEntityInstanceT EntityInstance; +} SaHpiEntityT; + +#define SAHPI_MAX_ENTITY_PATH 16 + +typedef struct { + SaHpiEntityT Entry[SAHPI_MAX_ENTITY_PATH]; +} SaHpiEntityPathT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Events, part 1 ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** Category +** +** Sensor events contain an event category and event state. Depending on the +** event category, the event states take on different meanings for events +** generated by specific sensors. +** +** The SAHPI_EC_GENERIC category can be used for discrete sensors which have +** state meanings other than those identified with other event categories. +*/ +typedef SaHpiUint8T SaHpiEventCategoryT; + +#define SAHPI_EC_UNSPECIFIED (SaHpiEventCategoryT)0x00 /* Unspecified */ +#define SAHPI_EC_THRESHOLD (SaHpiEventCategoryT)0x01 /* Threshold + events */ +#define SAHPI_EC_USAGE (SaHpiEventCategoryT)0x02 /* Usage state + events */ +#define SAHPI_EC_STATE (SaHpiEventCategoryT)0x03 /* Generic state + events */ +#define SAHPI_EC_PRED_FAIL (SaHpiEventCategoryT)0x04 /* Predictive fail + events */ +#define SAHPI_EC_LIMIT (SaHpiEventCategoryT)0x05 /* Limit events */ +#define SAHPI_EC_PERFORMANCE (SaHpiEventCategoryT)0x06 /* Performance + events */ +#define SAHPI_EC_SEVERITY (SaHpiEventCategoryT)0x07 /* Severity + indicating + events */ +#define SAHPI_EC_PRESENCE (SaHpiEventCategoryT)0x08 /* Device presence + events */ +#define SAHPI_EC_ENABLE (SaHpiEventCategoryT)0x09 /* Device enabled + events */ +#define SAHPI_EC_AVAILABILITY (SaHpiEventCategoryT)0x0A /* Availability + state events */ + +#define SAHPI_EC_REDUNDANCY (SaHpiEventCategoryT)0x0B /* Redundancy + state events */ +#define SAHPI_EC_USER (SaHpiEventCategoryT)0x7E /* User defined + events */ +#define SAHPI_EC_GENERIC (SaHpiEventCategoryT)0x7F /* OEM defined + events */ + +/* +** Event States +** +** The following event states are specified relative to the categories listed +** above. The event types are only valid for their given category. Each set of +** events is labeled as to which category it belongs to. +** Each event will have only one event state associated with it. When retrieving +** the event status or event enabled status a bit mask of all applicable event +** states is used. Similarly, when setting the event enabled status a bit mask +** of all applicable event states is used. +*/ +typedef SaHpiUint16T SaHpiEventStateT; + +/* +** SaHpiEventCategoryT == +*/ +#define SAHPI_ES_UNSPECIFIED (SaHpiEventStateT)0x0000 + +/* +** SaHpiEventCategoryT == SAHPI_EC_THRESHOLD +** When using these event states, the event state should match +** the event severity (for example SAHPI_ES_LOWER_MINOR should have an +** event severity of SAHPI_MINOR). +*/ +#define SAHPI_ES_LOWER_MINOR (SaHpiEventStateT)0x0001 +#define SAHPI_ES_LOWER_MAJOR (SaHpiEventStateT)0x0002 +#define SAHPI_ES_LOWER_CRIT (SaHpiEventStateT)0x0004 +#define SAHPI_ES_UPPER_MINOR (SaHpiEventStateT)0x0008 +#define SAHPI_ES_UPPER_MAJOR (SaHpiEventStateT)0x0010 +#define SAHPI_ES_UPPER_CRIT (SaHpiEventStateT)0x0020 + +/* SaHpiEventCategoryT == SAHPI_EC_USAGE */ +#define SAHPI_ES_IDLE (SaHpiEventStateT)0x0001 +#define SAHPI_ES_ACTIVE (SaHpiEventStateT)0x0002 +#define SAHPI_ES_BUSY (SaHpiEventStateT)0x0004 + +/* SaHpiEventCategoryT == SAHPI_EC_STATE */ +#define SAHPI_ES_STATE_DEASSERTED (SaHpiEventStateT)0x0001 +#define SAHPI_ES_STATE_ASSERTED (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_PRED_FAIL */ +#define SAHPI_ES_PRED_FAILURE_DEASSERT (SaHpiEventStateT)0x0001 +#define SAHPI_ES_PRED_FAILURE_ASSERT (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_LIMIT */ +#define SAHPI_ES_LIMIT_NOT_EXCEEDED (SaHpiEventStateT)0x0001 +#define SAHPI_ES_LIMIT_EXCEEDED (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_PERFORMANCE */ +#define SAHPI_ES_PERFORMANCE_MET (SaHpiEventStateT)0x0001 +#define SAHPI_ES_PERFORMANCE_LAGS (SaHpiEventStateT)0x0002 + +/* +** SaHpiEventCategoryT == SAHPI_EC_SEVERITY +** When using these event states, the event state should match +** the event severity +*/ +#define SAHPI_ES_OK (SaHpiEventStateT)0x0001 +#define SAHPI_ES_MINOR_FROM_OK (SaHpiEventStateT)0x0002 +#define SAHPI_ES_MAJOR_FROM_LESS (SaHpiEventStateT)0x0004 +#define SAHPI_ES_CRITICAL_FROM_LESS (SaHpiEventStateT)0x0008 +#define SAHPI_ES_MINOR_FROM_MORE (SaHpiEventStateT)0x0010 +#define SAHPI_ES_MAJOR_FROM_CRITICAL (SaHpiEventStateT)0x0020 +#define SAHPI_ES_CRITICAL (SaHpiEventStateT)0x0040 +#define SAHPI_ES_MONITOR (SaHpiEventStateT)0x0080 +#define SAHPI_ES_INFORMATIONAL (SaHpiEventStateT)0x0100 + +/* SaHpiEventCategoryT == SAHPI_EC_PRESENCE */ +#define SAHPI_ES_ABSENT (SaHpiEventStateT)0x0001 +#define SAHPI_ES_PRESENT (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_ENABLE */ +#define SAHPI_ES_DISABLED (SaHpiEventStateT)0x0001 +#define SAHPI_ES_ENABLED (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_AVAILABILITY */ +#define SAHPI_ES_RUNNING (SaHpiEventStateT)0x0001 +#define SAHPI_ES_TEST (SaHpiEventStateT)0x0002 +#define SAHPI_ES_POWER_OFF (SaHpiEventStateT)0x0004 +#define SAHPI_ES_ON_LINE (SaHpiEventStateT)0x0008 +#define SAHPI_ES_OFF_LINE (SaHpiEventStateT)0x0010 +#define SAHPI_ES_OFF_DUTY (SaHpiEventStateT)0x0020 +#define SAHPI_ES_DEGRADED (SaHpiEventStateT)0x0040 +#define SAHPI_ES_POWER_SAVE (SaHpiEventStateT)0x0080 +#define SAHPI_ES_INSTALL_ERROR (SaHpiEventStateT)0x0100 + +/* SaHpiEventCategoryT == SAHPI_EC_REDUNDANCY */ +#define SAHPI_ES_FULLY_REDUNDANT (SaHpiEventStateT)0x0001 +#define SAHPI_ES_REDUNDANCY_LOST (SaHpiEventStateT)0x0002 +#define SAHPI_ES_REDUNDANCY_DEGRADED (SaHpiEventStateT)0x0004 +#define SAHPI_ES_REDUNDANCY_LOST_SUFFICIENT_RESOURCES \ + (SaHpiEventStateT)0x0008 +#define SAHPI_ES_NON_REDUNDANT_SUFFICIENT_RESOURCES \ + (SaHpiEventStateT)0x0010 +#define SAHPI_ES_NON_REDUNDANT_INSUFFICIENT_RESOURCES \ + (SaHpiEventStateT)0x0020 +#define SAHPI_ES_REDUNDANCY_DEGRADED_FROM_FULL (SaHpiEventStateT)0x0040 +#define SAHPI_ES_REDUNDANCY_DEGRADED_FROM_NON (SaHpiEventStateT)0x0080 + +/* +** SaHpiEventCategoryT == SAHPI_EC_GENERIC || SAHPI_EC_USER +** These event states are defined by the OEM or the user of the +** implementation. +*/ +#define SAHPI_ES_STATE_00 (SaHpiEventStateT)0x0001 +#define SAHPI_ES_STATE_01 (SaHpiEventStateT)0x0002 +#define SAHPI_ES_STATE_02 (SaHpiEventStateT)0x0004 +#define SAHPI_ES_STATE_03 (SaHpiEventStateT)0x0008 +#define SAHPI_ES_STATE_04 (SaHpiEventStateT)0x0010 +#define SAHPI_ES_STATE_05 (SaHpiEventStateT)0x0020 +#define SAHPI_ES_STATE_06 (SaHpiEventStateT)0x0040 +#define SAHPI_ES_STATE_07 (SaHpiEventStateT)0x0080 +#define SAHPI_ES_STATE_08 (SaHpiEventStateT)0x0100 +#define SAHPI_ES_STATE_09 (SaHpiEventStateT)0x0200 +#define SAHPI_ES_STATE_10 (SaHpiEventStateT)0x0400 +#define SAHPI_ES_STATE_11 (SaHpiEventStateT)0x0800 +#define SAHPI_ES_STATE_12 (SaHpiEventStateT)0x1000 +#define SAHPI_ES_STATE_13 (SaHpiEventStateT)0x2000 +#define SAHPI_ES_STATE_14 (SaHpiEventStateT)0x4000 + + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Sensors ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Sensor Number */ +typedef SaHpiUint8T SaHpiSensorNumT; + +/* Type of Sensor */ +typedef enum { + SAHPI_TEMPERATURE = 0x01, + SAHPI_VOLTAGE, + SAHPI_CURRENT, + SAHPI_FAN, + SAHPI_PHYSICAL_SECURITY, + SAHPI_PLATFORM_VIOLATION, + SAHPI_PROCESSOR, + SAHPI_POWER_SUPPLY, + SAHPI_POWER_UNIT, + SAHPI_COOLING_DEVICE, + SAHPI_OTHER_UNITS_BASED_SENSOR, + SAHPI_MEMORY, + SAHPI_DRIVE_SLOT, + SAHPI_POST_MEMORY_RESIZE, + SAHPI_SYSTEM_FW_PROGRESS, + SAHPI_EVENT_LOGGING_DISABLED, + SAHPI_RESERVED1, + SAHPI_SYSTEM_EVENT, + SAHPI_CRITICAL_INTERRUPT, + SAHPI_BUTTON, + SAHPI_MODULE_BOARD, + SAHPI_MICROCONTROLLER_COPROCESSOR, + SAHPI_ADDIN_CARD, + SAHPI_CHASSIS, + SAHPI_CHIP_SET, + SAHPI_OTHER_FRU, + SAHPI_CABLE_INTERCONNECT, + SAHPI_TERMINATOR, + SAHPI_SYSTEM_BOOT_INITIATED, + SAHPI_BOOT_ERROR, + SAHPI_OS_BOOT, + SAHPI_OS_CRITICAL_STOP, + SAHPI_SLOT_CONNECTOR, + SAHPI_SYSTEM_ACPI_POWER_STATE, + SAHPI_RESERVED2, + SAHPI_PLATFORM_ALERT, + SAHPI_ENTITY_PRESENCE, + SAHPI_MONITOR_ASIC_IC, + SAHPI_LAN, + SAHPI_MANAGEMENT_SUBSYSTEM_HEALTH, + SAHPI_BATTERY, + SAHPI_OPERATIONAL = 0xA0, + SAHPI_OEM_SENSOR=0xC0 +} SaHpiSensorTypeT; + +/* +** Interpreted Sensor Reading Type +** +** These definitions list the available data types that can be +** used for interpreted sensor readings. Interpreted sensor readings are provided +** because typically sensors measure their associated entities in a way that is +** not human readable/understandable. For example a fan sensor may measure the +** number of ticks that it takes a fan blade to move passed a sensor. The human +** readable reading type would be revolutions per minute (RPM). +*/ + +#define SAHPI_SENSOR_BUFFER_LENGTH 32 + +typedef enum { + SAHPI_SENSOR_INTERPRETED_TYPE_UINT8, + SAHPI_SENSOR_INTERPRETED_TYPE_UINT16, + SAHPI_SENSOR_INTERPRETED_TYPE_UINT32, + SAHPI_SENSOR_INTERPRETED_TYPE_INT8, + SAHPI_SENSOR_INTERPRETED_TYPE_INT16, + SAHPI_SENSOR_INTERPRETED_TYPE_INT32, + SAHPI_SENSOR_INTERPRETED_TYPE_FLOAT32, + SAHPI_SENSOR_INTERPRETED_TYPE_BUFFER /* 32 byte array */ +} SaHpiSensorInterpretedTypeT; + +typedef union { + SaHpiUint8T SensorUint8; + SaHpiUint16T SensorUint16; + SaHpiUint32T SensorUint32; + SaHpiInt8T SensorInt8; + SaHpiInt16T SensorInt16; + SaHpiInt32T SensorInt32; + SaHpiFloat32T SensorFloat32; + SaHpiUint8T SensorBuffer[SAHPI_SENSOR_BUFFER_LENGTH]; +} SaHpiSensorInterpretedUnionT; + +typedef struct { + SaHpiSensorInterpretedTypeT Type; + SaHpiSensorInterpretedUnionT Value; +} SaHpiSensorInterpretedT; + +/* +** Sensor Status +** +** The sensor status structure is used to determine if sensor scanning is +** enabled and if events are enabled. If events are enabled, the structure will +** have valid data for the outstanding sensor event states. +*/ +typedef SaHpiUint8T SaHpiSensorStatusT; +#define SAHPI_SENSTAT_EVENTS_ENABLED (SaHpiSensorStatusT)0x80 +#define SAHPI_SENSTAT_SCAN_ENABLED (SaHpiSensorStatusT)0x40 +#define SAHPI_SENSTAT_BUSY (SaHpiSensorStatusT)0x20 + +typedef struct { + SaHpiSensorStatusT SensorStatus; + SaHpiEventStateT EventStatus; +} SaHpiSensorEvtStatusT; + +/* Sensor Event Enables */ +typedef struct { + SaHpiSensorStatusT SensorStatus; + SaHpiEventStateT AssertEvents; + SaHpiEventStateT DeassertEvents; +} SaHpiSensorEvtEnablesT; + +/* +** Sensor Reading +** +** The sensor reading type is the data structure returned from a call to get +** sensor reading. The structure is also used when setting and getting sensor +** threshold values and reporting sensor ranges. +** Each sensor may support one or more of raw, interpreted, or event status +** representations of the sensor data. For analog sensors the raw value is the +** raw value from the sensor (such as ticks per fan blade) and the interpreted +** value is the raw value converted in to a usable format (such as RPM). The +** interpreted value can be calculated by the HPI implementation using the +** sensor factors or by another OEM means. +*/ +typedef SaHpiUint8T SaHpiSensorReadingFormatsT; +#define SAHPI_SRF_RAW (SaHpiSensorReadingFormatsT)0x01 +#define SAHPI_SRF_INTERPRETED (SaHpiSensorReadingFormatsT)0x02 +#define SAHPI_SRF_EVENT_STATE (SaHpiSensorReadingFormatsT)0x04 + +typedef struct { + SaHpiSensorReadingFormatsT ValuesPresent; + SaHpiUint32T Raw; + SaHpiSensorInterpretedT Interpreted; + SaHpiSensorEvtStatusT EventStatus; +} SaHpiSensorReadingT; + +/* +** Threshold Values +** This structure encompasses all of the thresholds that can be set. +*/ +typedef struct { + SaHpiSensorReadingT LowCritical; /* Lower Critical Threshold */ + SaHpiSensorReadingT LowMajor; /* Lower Major Threshold */ + SaHpiSensorReadingT LowMinor; /* Lower Minor Threshold */ + SaHpiSensorReadingT UpCritical; /* Upper critical Threshold */ + SaHpiSensorReadingT UpMajor; /* Upper major Threshold */ + SaHpiSensorReadingT UpMinor; /* Upper minor Threshold */ + SaHpiSensorReadingT PosThdHysteresis; /* Positive Threshold Hysteresis */ + SaHpiSensorReadingT NegThdHysteresis; /* Negative Threshold Hysteresis */ +}SaHpiSensorThresholdsT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Sensor Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** Sensor Factors +** +** The sensor factors structure defines the conversion factors for linear and +** linearized sensors. +** The SaHpiSensorLinearizationT enumeration coupled with the various other +** sensor factors define a formula that can be applied to raw sensor data to +** convert it to appropriate engineering units. If linearization is +** SAHPI_SL_NONLINEAR, SAHPI_SL_UNSPECIFIED, or SAHPI_SL_OEM then there is no +** predefined conversion from raw to interpreted and the sensor factors may or +** may not be meaningful depending on the implementation. +** For other linearization values, raw readings may be converted to interpreted +** values using the formula: +**Interpreted = L [( M*raw + B*10^ExpB )*10^ExpR ] +**where "L[x]" is the indicated linearization function +** (for SAHPI_SL_LINEAR, L[x]=x). +** The Tolerance Factor is given as +/- 1/2 raw counts, so tolerance in +** interpreted values can be calculated as: +** L[ M * ToleranceFactor/2 * 10^ExpR ] +** The Accuracy Factor is given as 1/100 of a percent, scaled up by ExpA. Thus +** the accuracy is: +**( ( AccuracyFactor/100 ) / 10^ExpA )% +*/ +typedef enum { + SAHPI_SL_LINEAR = 0, /* Already linear */ + SAHPI_SL_LN, + SAHPI_SL_LOG10, + SAHPI_SL_LOG2, + SAHPI_SL_E, + SAHPI_SL_EXP10, + SAHPI_SL_EXP2, + SAHPI_SL_1OVERX, + SAHPI_SL_SQRX, + SAHPI_SL_CUBEX, + SAHPI_SL_SQRTX, + SAHPI_SL_CUBERTX, + SAHPI_SL_NONLINEAR = 0x70, /* Cannot be linearized with a predefind formula*/ + SAHPI_SL_OEM, + SAHPI_SL_UNSPECIFIED = 0xFF +} SaHpiSensorLinearizationT; + +typedef struct { + SaHpiInt16T M_Factor; /* M Factor */ + SaHpiInt16T B_Factor; /* B Factor */ + SaHpiUint16T AccuracyFactor; /* Accuracy */ + SaHpiUint8T ToleranceFactor; /* Tolerance */ + SaHpiUint8T ExpA; /* Accuracy Exp */ + SaHpiInt8T ExpR; /* Result Exp */ + SaHpiInt8T ExpB; /* B Exp */ + SaHpiSensorLinearizationT Linearization; +} SaHpiSensorFactorsT; + +/* +** Sensor Range +** Sensor range values can include minimum, maximum, normal minimum, normal +** maximum, and nominal values. +*/ +typedef SaHpiUint8T SaHpiSensorRangeFlagsT; +#define SAHPI_SRF_MIN (SaHpiSensorRangeFlagsT)0x10 +#define SAHPI_SRF_MAX (SaHpiSensorRangeFlagsT)0x08 +#define SAHPI_SRF_NORMAL_MIN (SaHpiSensorRangeFlagsT)0x04 +#define SAHPI_SRF_NORMAL_MAX (SaHpiSensorRangeFlagsT)0x02 +#define SAHPI_SRF_NOMINAL (SaHpiSensorRangeFlagsT)0x01 + +typedef struct { + SaHpiSensorRangeFlagsT Flags; + SaHpiSensorReadingT Max; + SaHpiSensorReadingT Min; + SaHpiSensorReadingT Nominal; + SaHpiSensorReadingT NormalMax; + SaHpiSensorReadingT NormalMin; +} SaHpiSensorRangeT; + +/* +** Sensor Units +** This is a list of all the sensor units supported by HPI. +*/ +typedef enum { + SAHPI_SU_UNSPECIFIED = 0, SAHPI_SU_DEGREES_C, SAHPI_SU_DEGREES_F, + SAHPI_SU_DEGREES_K, SAHPI_SU_VOLTS, SAHPI_SU_AMPS, + SAHPI_SU_WATTS, SAHPI_SU_JOULES, SAHPI_SU_COULOMBS, + SAHPI_SU_VA, SAHPI_SU_NITS, SAHPI_SU_LUMEN, + SAHPI_SU_LUX, SAHPI_SU_CANDELA, SAHPI_SU_KPA, + SAHPI_SU_PSI, SAHPI_SU_NEWTON, SAHPI_SU_CFM, + SAHPI_SU_RPM, SAHPI_SU_HZ, SAHPI_SU_MICROSECOND, + SAHPI_SU_MILLISECOND, SAHPI_SU_SECOND, SAHPI_SU_MINUTE, + SAHPI_SU_HOUR, SAHPI_SU_DAY, SAHPI_SU_WEEK, + SAHPI_SU_MIL, SAHPI_SU_INCHES, SAHPI_SU_FEET, + SAHPI_SU_CU_IN, SAHPI_SU_CU_FEET, SAHPI_SU_MM, + SAHPI_SU_CM, SAHPI_SU_M, SAHPI_SU_CU_CM, + SAHPI_SU_CU_M, SAHPI_SU_LITERS, SAHPI_SU_FLUID_OUNCE, + SAHPI_SU_RADIANS, SAHPI_SU_STERADIANS, SAHPI_SU_REVOLUTIONS, + SAHPI_SU_CYCLES, SAHPI_SU_GRAVITIES, SAHPI_SU_OUNCE, + SAHPI_SU_POUND, SAHPI_SU_FT_LB, SAHPI_SU_OZ_IN, + SAHPI_SU_GAUSS, SAHPI_SU_GILBERTS, SAHPI_SU_HENRY, + SAHPI_SU_MILLIHENRY, SAHPI_SU_FARAD, SAHPI_SU_MICROFARAD, + SAHPI_SU_OHMS, SAHPI_SU_SIEMENS, SAHPI_SU_MOLE, + SAHPI_SU_BECQUEREL, SAHPI_SU_PPM, SAHPI_SU_RESERVED, + SAHPI_SU_DECIBELS, SAHPI_SU_DBA, SAHPI_SU_DBC, + SAHPI_SU_GRAY, SAHPI_SU_SIEVERT, SAHPI_SU_COLOR_TEMP_DEG_K, + SAHPI_SU_BIT, SAHPI_SU_KILOBIT, SAHPI_SU_MEGABIT, + SAHPI_SU_GIGABIT, SAHPI_SU_BYTE, SAHPI_SU_KILOBYTE, + SAHPI_SU_MEGABYTE, SAHPI_SU_GIGABYTE, SAHPI_SU_WORD, + SAHPI_SU_DWORD, SAHPI_SU_QWORD, SAHPI_SU_LINE, + SAHPI_SU_HIT, SAHPI_SU_MISS, SAHPI_SU_RETRY, + SAHPI_SU_RESET, SAHPI_SU_OVERRUN, SAHPI_SU_UNDERRUN, + SAHPI_SU_COLLISION, SAHPI_SU_PACKETS, SAHPI_SU_MESSAGES, + SAHPI_SU_CHARACTERS, SAHPI_SU_ERRORS, SAHPI_SU_CORRECTABLE_ERRORS, + SAHPI_SU_UNCORRECTABLE_ERRORS +} SaHpiSensorUnitsT; + +/* +** Modifier Unit Use +** This type defines how the modifier unit is used. For example: base unit == +** meter, modifier unit == seconds, and modifier unit use == +** SAHPI_SMUU_BASIC_OVER_MODIFIER. The resulting unit would be meters per second. +*/ +typedef enum { + SAHPI_SMUU_NONE = 0, + SAHPI_SMUU_BASIC_OVER_MODIFIER, /* Basic Unit / Modifier Unit */ + SAHPI_SMUU_BASIC_TIMES_MODIFIER /* Basic Unit * Modifier Unit */ +} SaHpiSensorModUnitUseT; + +/* +** Sign Format +** This type defines what the sign format of the sensor's raw value is (1's +** complement, unsigned, etc.). +*/ +typedef enum { + SAHPI_SDF_UNSIGNED = 0, + SAHPI_SDF_1S_COMPLEMENT, + SAHPI_SDF_2S_COMPLEMENT +} SaHpiSensorSignFormatT; + +/* +** Data Format +** This structure encapsulates all of the various types that make up the +** definition of sensor data. +*/ +typedef struct { + SaHpiSensorReadingFormatsT ReadingFormats; /* Indicates if sensor supports + readings in raw, interpreted, + and/or event status formats */ + SaHpiBoolT IsNumeric; /* If FALSE, rest of this + structure is not + meaningful */ + SaHpiSensorSignFormatT SignFormat; /* Signed format */ + SaHpiSensorUnitsT BaseUnits; /* Base units (meters, etc.) */ + SaHpiSensorUnitsT ModifierUnits; /* Modifier unit (second, etc.) */ + SaHpiSensorModUnitUseT ModifierUse; /* Modifier use(m/sec, etc.) */ + SaHpiBoolT FactorsStatic; /* True if the sensor factors + are static. If false + factors vary over sensor + range, and are not + accessible through HPI */ + SaHpiSensorFactorsT Factors; + SaHpiBoolT Percentage; /* Is value a percentage */ + SaHpiSensorRangeT Range; /* Valid range of sensor */ +} SaHpiSensorDataFormatT; + +/* +** Threshold Support +** +** These types define what threshold values are readable, writable, and fixed. +** It also defines how the threshold values are read and written. +*/ +typedef SaHpiUint8T SaHpiSensorThdMaskT; +#define SAHPI_STM_LOW_MINOR (SaHpiSensorThdMaskT)0x01 +#define SAHPI_STM_LOW_MAJOR (SaHpiSensorThdMaskT)0x02 +#define SAHPI_STM_LOW_CRIT (SaHpiSensorThdMaskT)0x04 +#define SAHPI_STM_UP_MINOR (SaHpiSensorThdMaskT)0x08 +#define SAHPI_STM_UP_MAJOR (SaHpiSensorThdMaskT)0x10 +#define SAHPI_STM_UP_CRIT (SaHpiSensorThdMaskT)0x20 +#define SAHPI_STM_UP_HYSTERESIS (SaHpiSensorThdMaskT)0x40 +#define SAHPI_STM_LOW_HYSTERESIS (SaHpiSensorThdMaskT)0x80 + +typedef SaHpiUint8T SaHpiSensorThdCapT; +#define SAHPI_STC_RAW (SaHpiSensorThdMaskT)0x01 /* read/write as + raw counts */ +#define SAHPI_STC_INTERPRETED (SaHpiSensorThdMaskT)0x02 /* read/write as + interpreted */ + +typedef struct { + SaHpiBoolT IsThreshold; /* True if the sensor + supports thresholds. If false, + rest of structure is not + meaningful. */ + SaHpiSensorThdCapT TholdCapabilities; + SaHpiSensorThdMaskT ReadThold; /* Readable thresholds */ + SaHpiSensorThdMaskT WriteThold; /* Writable thresholds */ + SaHpiSensorThdMaskT FixedThold; /* Fixed thresholds */ +} SaHpiSensorThdDefnT; + +/* +** Event Control +** +** This type defines how sensor event messages can be controlled (can be turned +** off and on for each type of event, etc.). +*/ +typedef enum { + SAHPI_SEC_PER_EVENT = 0, /* Event message control per event */ + SAHPI_SEC_ENTIRE_SENSOR, /* Control for entire sensor only */ + SAHPI_SEC_GLOBAL_DISABLE, /* Global disable of events only */ + SAHPI_SEC_NO_EVENTS /* Events not supported */ +} SaHpiSensorEventCtrlT; + +/* +** Record +** +** This is the sensor resource data record which describes all of the static +** data associated with a sensor. +*/ +typedef struct { + SaHpiSensorNumT Num; /* Sensor Number/Index */ + SaHpiSensorTypeT Type; /* General Sensor Type */ + SaHpiEventCategoryT Category; /* Event category */ + SaHpiSensorEventCtrlT EventCtrl; /* How events can be controlled */ + SaHpiEventStateT Events; /* Bit mask of event states + supported */ + SaHpiBoolT Ignore; /* Ignore sensor (entity not + present, disabled, etc.) */ + SaHpiSensorDataFormatT DataFormat; /* Format of the data */ + SaHpiSensorThdDefnT ThresholdDefn; /* Threshold Definition */ + SaHpiUint32T Oem; /* Reserved for OEM use */ +} SaHpiSensorRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Aggregate Status ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* These are the default sensor numbers for aggregate status. */ +#define SAHPI_DEFAGSENS_OPER (SaHpiSensorNumT)0xFE +#define SAHPI_DEFAGSENS_PWR (SaHpiSensorNumT)0xFD +#define SAHPI_DEFAGSENS_TEMP (SaHpiSensorNumT)0xFC + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Controls ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Control Number */ +typedef SaHpiUint8T SaHpiCtrlNumT; + +/* +** Type of Control +** +** This enumerated type defines the different types of generic controls. +*/ +typedef enum { + SAHPI_CTRL_TYPE_DIGITAL = 0x00, + SAHPI_CTRL_TYPE_DISCRETE, + SAHPI_CTRL_TYPE_ANALOG, + SAHPI_CTRL_TYPE_STREAM, + SAHPI_CTRL_TYPE_TEXT, + SAHPI_CTRL_TYPE_OEM = 0xC0 +} SaHpiCtrlTypeT; + +/* +** Control State Type Definitions +** +** Defines the types of control states. +*/ +typedef enum { + SAHPI_CTRL_STATE_OFF = 0, + SAHPI_CTRL_STATE_ON, + SAHPI_CTRL_STATE_PULSE_OFF, + SAHPI_CTRL_STATE_PULSE_ON, + SAHPI_CTRL_STATE_AUTO = 0xFF +} SaHpiCtrlStateDigitalT; + +typedef SaHpiUint32T SaHpiCtrlStateDiscreteT; + +typedef SaHpiInt32T SaHpiCtrlStateAnalogT; + +#define SAHPI_CTRL_MAX_STREAM_LENGTH 4 +typedef struct { + SaHpiBoolT Repeat; /* Repeat flag */ + SaHpiUint32T StreamLength; /* Length of the data, in bytes, + ** stored in the stream. */ + SaHpiUint8T Stream[SAHPI_CTRL_MAX_STREAM_LENGTH]; +} SaHpiCtrlStateStreamT; + +typedef SaHpiUint8T SaHpiTxtLineNumT; + +/* Reserved number for sending output to all lines */ +#define SAHPI_TLN_ALL_LINES (SaHpiTxtLineNumT)0xFF + +typedef struct { + SaHpiTxtLineNumT Line; /* Operate on line # */ + SaHpiTextBufferT Text; /* Text to display */ +} SaHpiCtrlStateTextT; + +#define SAHPI_CTRL_MAX_OEM_BODY_LENGTH 255 +typedef struct { + SaHpiManufacturerIdT MId; + SaHpiUint8T BodyLength; + SaHpiUint8T Body[SAHPI_CTRL_MAX_OEM_BODY_LENGTH]; /* OEM Specific */ +} SaHpiCtrlStateOemT; + +typedef union { + SaHpiCtrlStateDigitalT Digital; + SaHpiCtrlStateDiscreteT Discrete; + SaHpiCtrlStateAnalogT Analog; + SaHpiCtrlStateStreamT Stream; + SaHpiCtrlStateTextT Text; + SaHpiCtrlStateOemT Oem; +} SaHpiCtrlStateUnionT; + +typedef struct { + SaHpiCtrlTypeT Type; /* Type of control */ + SaHpiCtrlStateUnionT StateUnion; /* Data for control type */ +} SaHpiCtrlStateT; + + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Control Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** Output Type +** +** This enumeration defines the what the control's output will be. +*/ +typedef enum { + SAHPI_CTRL_GENERIC = 0, + SAHPI_CTRL_LED, + SAHPI_CTRL_FAN_SPEED, + SAHPI_CTRL_DRY_CONTACT_CLOSURE, + SAHPI_CTRL_POWER_SUPPLY_INHIBIT, + SAHPI_CTRL_AUDIBLE, + SAHPI_CTRL_FRONT_PANEL_LOCKOUT, + SAHPI_CTRL_POWER_INTERLOCK, + SAHPI_CTRL_POWER_STATE, + SAHPI_CTRL_LCD_DISPLAY, + SAHPI_CTRL_OEM +} SaHpiCtrlOutputTypeT; + +/* +** Specific Record Types +** These types represent the specific types of control resource data records. +*/ +typedef struct { + SaHpiCtrlStateDigitalT Default; +} SaHpiCtrlRecDigitalT; + +typedef struct { + SaHpiCtrlStateDiscreteT Default; +} SaHpiCtrlRecDiscreteT; + +typedef struct { + SaHpiCtrlStateAnalogT Min; /* Minimum Value */ + SaHpiCtrlStateAnalogT Max; /* Maximum Value */ + SaHpiCtrlStateAnalogT Default; +} SaHpiCtrlRecAnalogT; + +typedef struct { + SaHpiCtrlStateStreamT Default; +} SaHpiCtrlRecStreamT; + +typedef struct { + SaHpiUint8T MaxChars; /* Maximum chars per line */ + SaHpiUint8T MaxLines; /* Maximum # of lines */ + SaHpiLanguageT Language; /* Language Code */ + SaHpiTextTypeT DataType; /* Permitted Data */ + SaHpiCtrlStateTextT Default; +} SaHpiCtrlRecTextT; + +#define SAHPI_CTRL_OEM_CONFIG_LENGTH 10 +typedef struct { + SaHpiManufacturerIdT MId; + SaHpiUint8T ConfigData[SAHPI_CTRL_OEM_CONFIG_LENGTH]; + SaHpiCtrlStateOemT Default; +} SaHpiCtrlRecOemT; + +typedef union { + SaHpiCtrlRecDigitalT Digital; + SaHpiCtrlRecDiscreteT Discrete; + SaHpiCtrlRecAnalogT Analog; + SaHpiCtrlRecStreamT Stream; + SaHpiCtrlRecTextT Text; + SaHpiCtrlRecOemT Oem; +} SaHpiCtrlRecUnionT; + +/* +** Record Definition +** Definition of the control resource data record. +*/ +typedef struct { + SaHpiCtrlNumT Num; /* Control Number/Index */ + SaHpiBoolT Ignore; /* Ignore control (entity + not present, disabled, etc.) */ + SaHpiCtrlOutputTypeT OutputType; + SaHpiCtrlTypeT Type; /* Type of control */ + SaHpiCtrlRecUnionT TypeUnion; /* Specific control record */ + SaHpiUint32T Oem; /* Reserved for OEM use */ +} SaHpiCtrlRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Entity Inventory Data ********** +********** ********** +******************************************************************************** +*******************************************************************************/ +/* +** These structures are used to read and write inventory data to entity inventory +** repositories within a resource. +*/ +/* +** Entity Inventory Repository ID +** Identifier for an entity inventory repository. +*/ +typedef SaHpiUint8T SaHpiEirIdT; +#define SAHPI_DEFAULT_INVENTORY_ID (SaHpiEirIdT)0x00 + +/* Data Validity */ +typedef enum { + SAHPI_INVENT_DATA_VALID, + SAHPI_INVENT_DATA_INVALID, + SAHPI_INVENT_DATA_OVERFLOW +} SaHpiInventDataValidityT; + +/* Inventory Record definitions */ +typedef enum { + SAHPI_INVENT_RECTYPE_INTERNAL_USE = 0xB0, + SAHPI_INVENT_RECTYPE_CHASSIS_INFO, + SAHPI_INVENT_RECTYPE_BOARD_INFO, + SAHPI_INVENT_RECTYPE_PRODUCT_INFO, + SAHPI_INVENT_RECTYPE_OEM = 0xC0 +} SaHpiInventDataRecordTypeT; + +typedef enum { + SAHPI_INVENT_CTYP_OTHER = 1, + SAHPI_INVENT_CTYP_UNKNOWN, + SAHPI_INVENT_CTYP_DESKTOP, + SAHPI_INVENT_CTYP_LOW_PROFILE_DESKTOP, + SAHPI_INVENT_CTYP_PIZZA_BOX, + SAHPI_INVENT_CTYP_MINI_TOWER, + SAHPI_INVENT_CTYP_TOWER, + SAHPI_INVENT_CTYP_PORTABLE, + SAHPI_INVENT_CTYP_LAPTOP, + SAHPI_INVENT_CTYP_NOTEBOOK, + SAHPI_INVENT_CTYP_HANDHELD, + SAHPI_INVENT_CTYP_DOCKING_STATION, + SAHPI_INVENT_CTYP_ALLINONE, + SAHPI_INVENT_CTYP_SUBNOTEBOOK, + SAHPI_INVENT_CTYP_SPACE_SAVING, + SAHPI_INVENT_CTYP_LUNCH_BOX, + SAHPI_INVENT_CTYP_MAIN_SERVER, + SAHPI_INVENT_CTYP_EXPANSION, + SAHPI_INVENT_CTYP_SUBCHASSIS, + SAHPI_INVENT_CTYP_BUS_EXPANSION_CHASSIS, + SAHPI_INVENT_CTYP_PERIPHERAL_CHASSIS, + SAHPI_INVENT_CTYP_RAID_CHASSIS, + SAHPI_INVENT_CTYP_RACKMOUNT +} SaHpiInventChassisTypeT; + +typedef struct { + SaHpiUint8T Data[1]; /* Variable length opaque data */ +} SaHpiInventInternalUseDataT; + +typedef struct { + SaHpiTimeT MfgDateTime; /* May be set to + SAHPI_TIME_UNSPECIFIED + if manufacturing + date/time not available */ + SaHpiTextBufferT *Manufacturer; + SaHpiTextBufferT *ProductName; + SaHpiTextBufferT *ProductVersion; + SaHpiTextBufferT *ModelNumber; + SaHpiTextBufferT *SerialNumber; + SaHpiTextBufferT *PartNumber; + SaHpiTextBufferT *FileId; + SaHpiTextBufferT *AssetTag; + SaHpiTextBufferT *CustomField[1]; /* Variable number of fields, + last is NULL */ +} SaHpiInventGeneralDataT; + +typedef struct { + SaHpiInventChassisTypeT Type; /* Type of chassis */ + SaHpiInventGeneralDataT GeneralData; +} SaHpiInventChassisDataT; + +typedef struct { + SaHpiManufacturerIdT MId;/* OEM Manuf. ID */ + SaHpiUint8T Data[1]; /* Variable length data, defined by OEM, + Length derived from DataLength in + SaHpiInventDataRecordT structure: + DataLength - 4(because DataLength + includes the MId) */ +} SaHpiInventOemDataT; + +typedef union { + SaHpiInventInternalUseDataT InternalUse; + SaHpiInventChassisDataT ChassisInfo; + SaHpiInventGeneralDataT BoardInfo; + SaHpiInventGeneralDataT ProductInfo; + SaHpiInventOemDataT OemData; +} SaHpiInventDataUnionT; + +typedef struct { + SaHpiInventDataRecordTypeT RecordType; + SaHpiUint32T DataLength; /* Length of Data field for + this record */ + SaHpiInventDataUnionT RecordData; /* Variable length data */ +} SaHpiInventDataRecordT; + +typedef struct { + SaHpiInventDataValidityT Validity; /* Indication as to whether data + Returned by + saHpiEntityInventoryDataRead() is + complete and valid. Unless this + flag indicates valid data, + saHpiEntityInventoryDataWrite() will + not take any actions except to + return an error.*/ + SaHpiInventDataRecordT *DataRecords[1]; /* Array of pointers to inventory + Data Records. Variable + number of entries. Last + entry is NULL. */ +} SaHpiInventoryDataT; + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Inventory Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** All inventory data contained in an entity inventory repository +** must be represented in the RDR repository +** with an SaHpiInventoryRecT. +*/ +typedef struct { + SaHpiEirIdT EirId; + SaHpiUint32T Oem; +} SaHpiInventoryRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Watchdogs ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** This section defines all of the data types associated with watchdog timers. +*/ + +/* Watchdog Number - Identifier for a watchdog timer. */ +typedef SaHpiUint8T SaHpiWatchdogNumT; +#define SAHPI_DEFAULT_WATCHDOG_NUM (SaHpiWatchdogNumT)0x00 + +/* +** Watchdog Timer Action +** +** These enumerations represent the possible actions to be taken upon watchdog +** timer timeout and the events that are generated for watchdog actions. +*/ +typedef enum { + SAHPI_WA_NO_ACTION = 0, + SAHPI_WA_RESET, + SAHPI_WA_POWER_DOWN, + SAHPI_WA_POWER_CYCLE +} SaHpiWatchdogActionT; + +typedef enum { + SAHPI_WAE_NO_ACTION = 0, + SAHPI_WAE_RESET, + SAHPI_WAE_POWER_DOWN, + SAHPI_WAE_POWER_CYCLE, + SAHPI_WAE_TIMER_INT=0x08 /* Used if Timer Preinterrupt only */ +} SaHpiWatchdogActionEventT; + +/* +** Watchdog Pre-timer Interrupt +** +** These enumerations represent the possible types of interrupts that may be +** triggered by a watchdog pre-timer event. The actual meaning of these +** operations may differ depending on the hardware architecture. +*/ +typedef enum { + SAHPI_WPI_NONE = 0, + SAHPI_WPI_SMI, + SAHPI_WPI_NMI, + SAHPI_WPI_MESSAGE_INTERRUPT, + SAHPI_WPI_OEM = 0x0F +} SaHpiWatchdogPretimerInterruptT; + +/* +** Watchdog Timer Use +** +** These enumerations represent the possible watchdog users that may have caused +** the watchdog to expire. For instance, if watchdog is being used during power +** on self test (POST), and it expires, the SAHPI_WTU_BIOS_POST expiration type +** will be set. Most specific uses for Watchdog timer by users of HPI should +** indicate SAHPI_WTU_SMS_OS if the use is to provide an OS-healthy heartbeat, +** or SAHPI_WTU_OEM if it is used for some other purpose. +*/ +typedef enum { + SAHPI_WTU_NONE = 0, + SAHPI_WTU_BIOS_FRB2, + SAHPI_WTU_BIOS_POST, + SAHPI_WTU_OS_LOAD, + SAHPI_WTU_SMS_OS, /* System Management System providing + heartbeat for OS */ + SAHPI_WTU_OEM, + SAHPI_WTU_UNSPECIFIED = 0x0F +} SaHpiWatchdogTimerUseT; + +/* +** Timer Use Expiration Flags +** These values are used for the Watchdog Timer Use Expiration flags in the +** SaHpiWatchdogT structure. +*/ +typedef SaHpiUint8T SaHpiWatchdogExpFlagsT; +#define SAHPI_WATCHDOG_EXP_BIOS_FRB2 (SaHpiWatchdogExpFlagsT)0x02 +#define SAHPI_WATCHDOG_EXP_BIOS_POST (SaHpiWatchdogExpFlagsT)0x04 +#define SAHPI_WATCHDOG_EXP_OS_LOAD (SaHpiWatchdogExpFlagsT)0x08 +#define SAHPI_WATCHDOG_EXP_SMS_OS (SaHpiWatchdogExpFlagsT)0x10 +#define SAHPI_WATCHDOG_EXP_OEM (SaHpiWatchdogExpFlagsT)0x20 + +/* +** Watchdog Structure +** +** This structure is used by the saHpiWatchdogTimerGet() and +** saHpiWatchdogTimerSet() functions. The use of the structure varies slightly by +** each function. +** +** For saHpiWatchdogTimerGet() : +** +** Log - indicates whether or not the Watchdog is configured to +** issue an event when it next times out. TRUE=event will +** be issued on timeout. +** Running - indicates whether or not the Watchdog is currently +** running or stopped. TRUE=Watchdog is running. +** TimerUse - indicates the current use of the timer; one of five +** preset uses which was included on the last +** saHpiWatchdogTimerSet() function call, or through some +** other implementation-dependent means to start the +** Watchdog timer. +** TimerAction - indicates what action will be taken when the Watchdog +** times out. +** PretimerInterrupt - indicates which action will be taken +** "PreTimeoutInterval" seconds prior to Watchdog timer +** expiration. +** PreTimeoutInterval - indicates how many milliseconds prior to timer time +** out the PretimerInterrupt action will be taken. If +** "PreTimeoutInterval" = 0, the PretimerInterrupt action +** will occur concurrently with "TimerAction." HPI +** implementations may not be able to support millisecond +** resolution and may have a maximum value restriction. +** These restrictions should be documented by the +** provider of the HPI interface. +** TimerUseExpFlags - set of five bit flags which indicate that a Watchdog +** timer timeout has occurred while the corresponding +** TimerUse value was set. Once set, these flags stay +** set until specifically cleared with a +** saHpiWatchdogTimerSet() call, or by some other +** implementation-dependent means. +** InitialCount - The time, in milliseconds, before the timer will time +** out after a saHpiWatchdogTimerReset() function call is +** made, or some other implementation-dependent strobe is +** sent to the Watchdog. HPI implementations may not be +** able to support millisecond resolution and may have a +** maximum value restriction. These restrictions should +** be documented by the provider of the HPI interface. +** PresentCount - The remaining time in milliseconds before the timer +** will time out unless a saHpiWatchdogTimerReset() +** function call is made, or some other implementation- +** dependent strobe is sent to the Watchdog. +** HPI implementations may not be able to support +** millisecond resolution on watchdog timers, but will +** return the number of clock ticks remaining times the +** number of milliseconds between each tick. +** +** For saHpiWatchdogTimerSet(): +** +** Log - indicates whether or not the Watchdog should issue +** an event when it next times out. TRUE=event will be +** issued on timeout. +** Running - indicates whether or not the Watchdog should be +** stopped before updating. +** TRUE = Watchdog is not stopped. If it is already +** stopped, it will remain stopped, but if it is +** running, it will continue to run, with the +** countdown timer reset to the new InitialCount. +** Note that there is a race condition possible +** with this setting, so it should be used with +** care. +** FALSE = Watchdog is stopped. After +** saHpiWatchdogTimerSet() is called, a subsequent +** call to saHpiWatchdogTimerReset() is required to +** start the timer. +** TimerUse - indicates the current use of the timer. Will control +** which TimerUseExpFlag is set if the timer expires. +** TimerAction - indicates what action will be taken when the Watchdog +** times out. +** PretimerInterrupt - indicates which action will be taken +** "PreTimeoutInterval" seconds prior to Watchdog timer +** expiration. +** PreTimeoutInterval - indicates how many milliseconds prior to timer time +** out the PretimerInterrupt action will be taken. If +** "PreTimeoutInterval" = 0, the PretimerInterrupt action +** will occur concurrently with "TimerAction." HPI +** implementations may not be able to support millisecond +** resolution and may have a maximum value restriction. +** These restrictions should be documented by the +** provider of the HPI interface. +** TimerUseExpFlags - Set of five bit flags corresponding to the five +** TimerUse values. For each bit set, the corresponding +** Timer Use Expiration Flag will be CLEARED. Generally, +** a program should only clear the Timer Use Expiration +** Flag corresponding to its own TimerUse, so that other +** software, which may have used the timer for another +** purpose in the past can still read its TimerUseExpFlag +** to determine whether or not the timer expired during +** that use. +** InitialCount - The time, in milliseconds, before the timer will time +** out after a saHpiWatchdogTimerReset() function call is +** made, or some other implementation-dependent strobe is +** sent to the Watchdog. HPI implementations may not be +** able to support millisecond resolution and may have a +** maximum value restriction. These restrictions should +** be documented by the provider of the HPI interface. +** PresentCount - Not used on saHpiWatchdogTimerSet() function. Ignored. +** +*/ + +typedef struct { + SaHpiBoolT Log; + SaHpiBoolT Running; + SaHpiWatchdogTimerUseT TimerUse; + SaHpiWatchdogActionT TimerAction; + SaHpiWatchdogPretimerInterruptT PretimerInterrupt; + SaHpiUint32T PreTimeoutInterval; + SaHpiWatchdogExpFlagsT TimerUseExpFlags; + SaHpiUint32T InitialCount; + SaHpiUint32T PresentCount; +} SaHpiWatchdogT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Watchdog Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** When the "Watchdog" capability is set in a resource, a watchdog with an +** identifier of SAHPI_DEFAULT_WATCHDOG_NUM is required. All watchdogs must be +** represented in the RDR repository with an SaHpiWatchdogRecT, including the +** watchdog with an identifier of SAHPI_DEFAULT_WATCHDOG_NUM. +*/ +typedef struct { + SaHpiWatchdogNumT WatchdogNum; + SaHpiUint32T Oem; +} SaHpiWatchdogRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Resource Data Record ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** The following describes the different types of records that exist within a +** RDR repository and the RDR super-structure to all of the specific RDR types +** (sensor, inventory data, watchdog, etc.). +*/ +typedef enum { + SAHPI_NO_RECORD, + SAHPI_CTRL_RDR, + SAHPI_SENSOR_RDR, + SAHPI_INVENTORY_RDR, + SAHPI_WATCHDOG_RDR +} SaHpiRdrTypeT; + +typedef union { + SaHpiCtrlRecT CtrlRec; + SaHpiSensorRecT SensorRec; + SaHpiInventoryRecT InventoryRec; + SaHpiWatchdogRecT WatchdogRec; +} SaHpiRdrTypeUnionT; + +typedef struct { + SaHpiEntryIdT RecordId; + SaHpiRdrTypeT RdrType; + SaHpiEntityPathT Entity; /* Entity to which this RDR relates. */ + SaHpiRdrTypeUnionT RdrTypeUnion; + SaHpiTextBufferT IdString; +} SaHpiRdrT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Hot Swap ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Power State */ +typedef enum { + SAHPI_HS_POWER_OFF = 0, + SAHPI_HS_POWER_ON, + SAHPI_HS_POWER_CYCLE +} SaHpiHsPowerStateT; + +/* Hot Swap Indicator State */ +typedef enum { + SAHPI_HS_INDICATOR_OFF = 0, + SAHPI_HS_INDICATOR_ON +} SaHpiHsIndicatorStateT; + +/* Hot Swap Action */ +typedef enum { + SAHPI_HS_ACTION_INSERTION = 0, + SAHPI_HS_ACTION_EXTRACTION +} SaHpiHsActionT; + +/* Hot Swap State */ +typedef enum { + SAHPI_HS_STATE_INACTIVE = 0, + SAHPI_HS_STATE_INSERTION_PENDING, + SAHPI_HS_STATE_ACTIVE_HEALTHY, + SAHPI_HS_STATE_ACTIVE_UNHEALTHY, + SAHPI_HS_STATE_EXTRACTION_PENDING, + SAHPI_HS_STATE_NOT_PRESENT +} SaHpiHsStateT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Events, Part 2 ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Event Data Structures */ + +/* +** Sensor Optional Data +** +** Sensor events may contain optional data items passed and stored with the +** event. If these optional data items are present, they will be included with +** the event data returned in response to a saHpiEventGet() or +** saHpiEventLogEntryGet() function call. Also, the optional data items may be +** included with the event data passed to the saHpiEventLogEntryAdd() function. +** +** Specific implementations of HPI may have restrictions on how much data may +** be passed to saHpiEventLogEntryAdd(). These restrictions should be documented +** by the provider of the HPI interface. +*/ +typedef enum { + SAHPI_CRITICAL = 0, + SAHPI_MAJOR, + SAHPI_MINOR, + SAHPI_INFORMATIONAL, + SAHPI_OK, + SAHPI_DEBUG = 0xF0 +} SaHpiSeverityT; + +typedef SaHpiUint8T SaHpiSensorOptionalDataT; + +#define SAHPI_SOD_TRIGGER_READING (SaHpiSensorOptionalDataT)0x01 +#define SAHPI_SOD_TRIGGER_THRESHOLD (SaHpiSensorOptionalDataT)0x02 +#define SAHPI_SOD_OEM (SaHpiSensorOptionalDataT)0x04 +#define SAHPI_SOD_PREVIOUS_STATE (SaHpiSensorOptionalDataT)0x08 +#define SAHPI_SOD_SENSOR_SPECIFIC (SaHpiSensorOptionalDataT)0x10 + +typedef struct { + SaHpiSensorNumT SensorNum; + SaHpiSensorTypeT SensorType; + SaHpiEventCategoryT EventCategory; + SaHpiBoolT Assertion; /* TRUE = Event State asserted + FALSE = deasserted */ + SaHpiEventStateT EventState; /* State being asserted + deasserted */ + SaHpiSensorOptionalDataT OptionalDataPresent; + SaHpiSensorReadingT TriggerReading; /* Reading that triggered + the event */ + SaHpiSensorReadingT TriggerThreshold; + SaHpiEventStateT PreviousState; + SaHpiUint32T Oem; + SaHpiUint32T SensorSpecific; +} SaHpiSensorEventT; + +typedef struct { + SaHpiHsStateT HotSwapState; + SaHpiHsStateT PreviousHotSwapState; +} SaHpiHotSwapEventT; + +typedef struct { + SaHpiWatchdogNumT WatchdogNum; + SaHpiWatchdogActionEventT WatchdogAction; + SaHpiWatchdogPretimerInterruptT WatchdogPreTimerAction; + SaHpiWatchdogTimerUseT WatchdogUse; +} SaHpiWatchdogEventT; + +#define SAHPI_OEM_EVENT_DATA_SIZE 32 +typedef struct { + SaHpiManufacturerIdT MId; + SaHpiUint8T OemEventData[SAHPI_OEM_EVENT_DATA_SIZE]; +} SaHpiOemEventT; + +/* +** User events may be used for storing custom events created by the application / middleware; +** eg. when injecting events into the event log using saHpiEventLogEntryAdd(). +*/ +#define SAHPI_USER_EVENT_DATA_SIZE 32 +typedef struct { + SaHpiUint8T UserEventData[SAHPI_USER_EVENT_DATA_SIZE]; +} SaHpiUserEventT; + +typedef enum { + SAHPI_ET_SENSOR, + SAHPI_ET_HOTSWAP, + SAHPI_ET_WATCHDOG, + SAHPI_ET_OEM, + SAHPI_ET_USER +} SaHpiEventTypeT; + +typedef union { + SaHpiSensorEventT SensorEvent; + SaHpiHotSwapEventT HotSwapEvent; + SaHpiWatchdogEventT WatchdogEvent; + SaHpiOemEventT OemEvent; + SaHpiUserEventT UserEvent; +} SaHpiEventUnionT; + +typedef struct { + SaHpiResourceIdT Source; + SaHpiEventTypeT EventType; + SaHpiTimeT Timestamp; + SaHpiSeverityT Severity; + SaHpiEventUnionT EventDataUnion; +} SaHpiEventT; + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Parameter Control ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +typedef enum { + SAHPI_DEFAULT_PARM = 0, + SAHPI_SAVE_PARM, + SAHPI_RESTORE_PARM +} SaHpiParmActionT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Reset ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +typedef enum { + SAHPI_COLD_RESET = 0, + SAHPI_WARM_RESET, + SAHPI_RESET_ASSERT, + SAHPI_RESET_DEASSERT +} SaHpiResetActionT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Resource Presence Table ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* This section defines the types associated with the RPT. */ + +typedef struct { + SaHpiUint32T UpdateCount; /* This count is incremented any time the table + is changed. It rolls over to zero when the + maximum value is reached */ + SaHpiTimeT UpdateTimestamp; /* This time is set any time the table is + changed. If the implementation cannot + supply an absolute timestamp, then it may + supply a timestamp relative to some system- + defined epoch, such as system boot. The + value SAHPI_TIME_UNSPECIFIED indicates that + the time of the update cannot be determined. + Otherwise, If the value is less than or + equal to SAHPI_TIME_MAX_RELATIVE, then it + is relative; if it is greater than + SAHPI_TIME_MAX_RELATIVE, then it is absolute. */ +} SaHpiRptInfoT; + +/* +** Resource Info Type Definitions +** +** +** SaHpiResourceInfoT contains static configuration data concerning the +** management controller associated with the resource, or the resource itself. +** Note this information is used to describe the resource; that is, the piece of +** infrastructure which manages an entity (or multiple entities) - NOT the entities +** for which the resource provides management. The purpose of the +** SaHpiResourceInfoT structure is to provide information that the HPI user may +** need in order to interact correctly with the resource (e.g., recognize a +** specific management controller which may have defined OEM fields in sensors, +** OEM controls, etc.). +** +** All of the fields in the following structure may or may not be used by a +** given resource. +*/ +typedef struct { + SaHpiUint8T ResourceRev; + SaHpiUint8T SpecificVer; + SaHpiUint8T DeviceSupport; + SaHpiManufacturerIdT ManufacturerId; + SaHpiUint16T ProductId; + SaHpiUint8T FirmwareMajorRev; + SaHpiUint8T FirmwareMinorRev; + SaHpiUint8T AuxFirmwareRev; +} SaHpiResourceInfoT; + +/* +** Resource Capabilities +** +** This definition defines the capabilities of a given resource. One resource +** may support any number of capabilities using the bit mask. Every resource +** must set at least one of these capabilities; ie. zero is not a valid value +** for a resource's capabilities. +** +** SAHPI_CAPABILITY_DOMAIN +** SAHPI_CAPABILITY_RESOURCE +** SAHPI_CAPABILITY_EVT_DEASSERTS +** Indicates that all sensors on the resource have the property that their +** Assertion and Deassertion event enable flags are the same. That is, +** for all event states whose assertion triggers an event, it is +** guaranteed that the deassertion of that event will also +** trigger an event. Thus, the user may track the state of sensors on the +** resource by monitoring events rather than polling for state changes. +** SAHPI_CAPABILITY_AGGREGATE_STATUS +** SAHPI_CAPABILITY_CONFIGURATION +** SAHPI_CAPABILITY_MANAGED_HOTSWAP +** Indicates that the resource supports managed hotswap. Since hotswap only +** makes sense for field-replaceable units, the SAHPI_CAPABILITY_FRU +** capability bit must also be set for this resource. +** SAHPI_CAPABILITY_WATCHDOG +** SAHPI_CAPABILITY_CONTROL +** SAHPI_CAPABILITY_FRU +** Indicates that the resource is a field-replaceable unit; i.e., it is +** capable of being removed and replaced in a live system. This does not +** necessarily imply that the resource supports managed hotswap. +** SAHPI_CAPABILITY_INVENTORY_DATA +** SAHPI_CAPABILITY_SEL +** SAHPI_CAPABILITY_RDR +** Indicates that a resource data record (RDR) repository is supplied +** by the resource. Since the existence of an RDR is mandatory, this +** capability must be asserted. +** SAHPI_CAPABILITY_SENSOR +*/ + +typedef SaHpiUint32T SaHpiCapabilitiesT; +#define SAHPI_CAPABILITY_DOMAIN (SaHpiCapabilitiesT)0x80000000 +#define SAHPI_CAPABILITY_RESOURCE (SaHpiCapabilitiesT)0X40000000 +#define SAHPI_CAPABILITY_EVT_DEASSERTS (SaHpiCapabilitiesT)0x00008000 +#define SAHPI_CAPABILITY_AGGREGATE_STATUS (SaHpiCapabilitiesT)0x00002000 +#define SAHPI_CAPABILITY_CONFIGURATION (SaHpiCapabilitiesT)0x00001000 +#define SAHPI_CAPABILITY_MANAGED_HOTSWAP (SaHpiCapabilitiesT)0x00000800 +#define SAHPI_CAPABILITY_WATCHDOG (SaHpiCapabilitiesT)0x00000400 +#define SAHPI_CAPABILITY_CONTROL (SaHpiCapabilitiesT)0x00000200 +#define SAHPI_CAPABILITY_FRU (SaHpiCapabilitiesT)0x00000100 +#define SAHPI_CAPABILITY_INVENTORY_DATA (SaHpiCapabilitiesT)0x00000008 +#define SAHPI_CAPABILITY_SEL (SaHpiCapabilitiesT)0x00000004 +#define SAHPI_CAPABILITY_RDR (SaHpiCapabilitiesT)0x00000002 +#define SAHPI_CAPABILITY_SENSOR (SaHpiCapabilitiesT)0x00000001 + +/* +** RPT Entry +** +** This structure is used to store the RPT entry information. +** +** The ResourceCapabilities field definies the capabilities of the resource. +** This field must be non-zero for all valid resources. +** +** The ResourceTag field is an informational value that supplies the caller with naming +** information for the resource. This should be set to the "user-visible" name for a +** resource, which can be used to identify the resource in messages to a human operator. +** For example, it could be set to match a physical printed label attached to the primary +** entity which the resource manages. See section 5.2.6, saHpiResourceTagSet(), on page 33. +*/ +typedef struct { + SaHpiEntryIdT EntryId; + SaHpiResourceIdT ResourceId; + SaHpiResourceInfoT ResourceInfo; + SaHpiEntityPathT ResourceEntity; /* If resource manages a FRU, entity path of the FRU */ + /* If resource manages a single entity, entity path of + that entity. */ + /* If resource manages multiple entities, the + entity path of the "primary" entity managed by the + resource */ + /* Must be set to the same value in every domain which + contains this resource */ + SaHpiCapabilitiesT ResourceCapabilities; /* Must be non-0. */ + SaHpiSeverityT ResourceSeverity; /* Indicates the criticality that + should be raised when the resource + is not responding */ + SaHpiDomainIdT DomainId; /* The Domain ID is used when the resource + is also a domain. */ + SaHpiTextBufferT ResourceTag; +} SaHpiRptEntryT; + + + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** System Event Log ********** +********** ********** +******************************************************************************** +*******************************************************************************/ +/* This section defines the types associated with the SEL. */ +/* +** Event Log Information +** +** The Entries entry denotes the number of active entries contained in the log. +** The Size entry denotes the total number of entries the log is able to hold. +** The UpdateTimestamp entry denotes the timestamp of the last addition, +** deletion or log clear operation. +** The CurrentTime entry denotes the log's idea of the current time; i.e the +** timestamp that would be placed on an entry if it was added now. +** The Enabled entry indicates whether the log is enabled. If the event log +** is "disabled" no events generated within the HPI implementation will be +** added to the event log. Events may still be added to the event log with +** the saHpiEventLogEntryAdd() function. When the event log is "enabled" +** events may be automatically added to the event log as they are generated +** in a resource or a domain, however, it is implementation-specific which +** events are automatically added to any event log. +** The OverflowFlag entry indicates the log has overflowed. Events have been +** dropped or overwritten due to a table overflow. +** The OverflowAction entry indicates the behavior of the SEL when an overflow +** occurs. +** The DeleteEntrySupported indicates whether the delete command is supported for +** event log entries. Note that clearing an entire log is valid even if this +** flag is not set. +*/ +typedef enum { + SAHPI_SEL_OVERFLOW_DROP, /* New entries are dropped when log is full*/ + SAHPI_SEL_OVERFLOW_WRAP, /* Log wraps when log is full */ + SAHPI_SEL_OVERFLOW_WRITELAST /* Last entry overwritten when log is full */ +} SaHpiSelOverflowActionT; + +typedef struct { + SaHpiUint32T Entries; + SaHpiUint32T Size; + SaHpiTimeT UpdateTimestamp; + SaHpiTimeT CurrentTime; + SaHpiBoolT Enabled; + SaHpiBoolT OverflowFlag; + SaHpiSelOverflowActionT OverflowAction; + SaHpiBoolT DeleteEntrySupported; +} SaHpiSelInfoT; +/* +** Event Log Entry +** These types define the event log entry. +*/ +typedef SaHpiUint32T SaHpiSelEntryIdT; +/* Reserved values for event log entry IDs */ +#define SAHPI_OLDEST_ENTRY (SaHpiSelEntryIdT)0x00000000 +#define SAHPI_NEWEST_ENTRY (SaHpiSelEntryIdT)0xFFFFFFFF +#define SAHPI_NO_MORE_ENTRIES (SaHpiSelEntryIdT)0xFFFFFFFE + + + +typedef struct { + SaHpiSelEntryIdT EntryId; /* Entry ID for record */ + SaHpiTimeT Timestamp; /* Time at which the event was placed + in the event log. The value + SAHPI_TIME_UNSPECIFIED indicates that + the time of the event cannot be + determined; otherwise, if less than + or equal to SAHPI_TIME_MAX_RELATIVE, + then it relative; if it is greater than + SAHPI_TIME_MAX_RELATIVE, then it is absolute. */ + SaHpiEventT Event; /* Logged Event */ +} SaHpiSelEntryT; + + + + + +/******************************************************************************* +** +** Name: saHpiInitialize +** +** Description: +** This function allows the management service an opportunity to perform +** platform-specific initialization. saHpiInitialize() must be called +** before any other functions are called. +** +** Parameters: +** HpiImplVersion - [out] Pointer to the version of the HPI +** implementation. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_DUPLICATE is returned when the HPI has already +** been initialized. Once one saHpiInitialize() call has been made, +** another one cannot be made until after a saHpiFinalize() call is made. +** +** +** Remarks: +** This function returns the version of the HPI implementation. Note: If +** the HPI interface version is needed it can be retrieved from the +** SAHPI_INTERFACE_VERSION definition. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiInitialize( + SAHPI_OUT SaHpiVersionT *HpiImplVersion +); + + +/******************************************************************************* +** +** Name: saHpiFinalize +** +** Description: +** This function allows the management service an opportunity to perform +** platform-specific cleanup. All sessions should be closed (see +** saHpiSessionClose()), before this function is executed. All open +** sessions will be forcibly closed upon execution of this command. +** +** Parameters: +** None. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. 5 Domains +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiFinalize ( +); + + +/******************************************************************************* +** +** Name: saHpiSessionOpen +** +** Description: +** This function opens a HPI session for a given domain and set of +** security characteristics (future). This function call assumes that a +** pre-arranged agreement between caller and the HPI implementation +** identifies the resources within the specified domain. As a future +** roadmap item, functions for discovery of domains and allocation of +** resources within domains may be developed. +** +** Parameters: +** DomainId - [in] Domain ID to be controlled by middleware/application. +** A domain ID of SAHPI_DEFAULT_DOMAIN_ID indicates the default domain. +** SessionId - [out] Pointer to a location to store a handle to the newly +** opened session. This handle is used for subsequent access to domain +** resources and events. +** SecurityParams - [in] Pointer to security and permissions data +** structure. This parameter is reserved for future use, and must be set +** to NULL. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_INVALID_DOMAIN is returned if no domain +** matching the specified domain ID exists. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSessionOpen ( + SAHPI_IN SaHpiDomainIdT DomainId, + SAHPI_OUT SaHpiSessionIdT *SessionId, + SAHPI_IN void *SecurityParams +); + + +/******************************************************************************* +** +** Name: saHpiSessionClose +** +** Description: +** This function closes a HPI session. After closing a session, the +** session ID will no longer be valid. +** +** Parameters: +** SessionId - [in] Session handle previously obtained using +** saHpiSessionOpen(). +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSessionClose ( + SAHPI_IN SaHpiSessionIdT SessionId +); + + +/******************************************************************************* +** +** Name: saHpiResourcesDiscover +** +** Description: +** This function requests the underlying management service to discover +** information about the resources it controls for the domain associated +** with the open session. This function may be called during operation to +** regenerate the RPT table. For those FRUs that must be discovered by +** polling, latency between FRU insertion and actual addition of the +** resource associated with that FRU to the RPT exists. To overcome this +** latency, a discovery of all present resources may be forced by calling +** saHpiResourcesDiscover (). +** +** Parameters: +** SessionId - [in] Handle to session context. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourcesDiscover ( + SAHPI_IN SaHpiSessionIdT SessionId +); + + +/******************************************************************************* +** +** Name: saHpiRptInfoGet +** +** Description: +** This function is used for requesting information about the resource +** presence table (RPT) such as an update counter and timestamp. This is +** particularly useful when using saHpiRptEntryGet() (see page 31). +** +** Parameters: +** SessionId - [in] Handle to session context. +** RptInfo - [out] Pointer to the information describing the resource +** presence table. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRptInfoGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiRptInfoT *RptInfo +); + + +/******************************************************************************* +** +** Name: saHpiRptEntryGet +** +** Description: +** This function retrieves resource information for the specified entry +** of the resource presence table. This function allows the caller to +** read the RPT entry-by-entry. If the EntryID parameter is set to +** SAHPI_FIRST_ENTRY, the first entry in the RPT will be returned. When +** an entry is successfully retrieved, *NextEntryID will be set to the +** ID of the next valid entry; however, when the last entry has been +** retrieved, *NextEntryID will be set to SAHPI_LAST_ENTRY. To retrieve +** an entire list of entries, call this function first with an EntryID of +** SAHPI_FIRST_ENTRY and then use the returned NextEntryID in the next +** call. Proceed until the NextEntryID returned is SAHPI_LAST_ENTRY. At +** initialization, the user may not wish to turn on eventing, since the +** context of the events, as provided by the RPT, is not known. In this +** instance, if a FRU is inserted into the system while the RPT is being +** read entry by entry, the resource associated with that FRU may be +** missed. (Keep in mind that there is no specified ordering for the RPT +** entries.) The update counter provides a means for insuring that no +** resources are missed when stepping through the RPT. In order to use +** this feature, the user should invoke saHpiRptInfoGet(), and get the +** update counter value before retrieving the first RPT entry. After +** reading the last entry, the user should again invoke the +** saHpiRptInfoGet() to get the update counter value. If the update +** counter has not been incremented, no new records have been added. +** +** Parameters: +** SessionId - [in] Handle to session context. +** EntryId - [in] Handle of the entry to retrieve from the RPT. Reserved +** entry ID values: SAHPI_FIRST_ENTRY Get first entry SAHPI_LAST_ENTRY +** Reserved as delimiter for end of list. Not a valid entry identifier. +** +** NextEntryId - [out] Pointer to location to store the record ID of next +** entry in RPT. +** RptEntry - [out] Pointer to the structure to hold the returned RPT +** entry. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRptEntryGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiEntryIdT EntryId, + SAHPI_OUT SaHpiEntryIdT *NextEntryId, + SAHPI_OUT SaHpiRptEntryT *RptEntry +); + + +/******************************************************************************* +** +** Name: saHpiRptEntryGetByResourceId +** +** Description: +** This function retrieves resource information from the resource +** presence table for the specified resource using its resource ID. +** Typically at start-up, the RPT is read entry-by-entry, using +** saHpiRptEntryGet(). From this, the caller can establish the set of +** resource IDs to use for future calls to the HPI functions. However, +** there may be other ways of learning resource IDs without first reading +** the RPT. For example, resources may be added to the domain while the +** system is running in response to a hot-swap action. When a resource is +** added, the application will receive a hot-swap event containing the +** resource ID of the new resource. The application may then want to +** search the RPT for more detailed information on the newly added +** resource. In this case, the resource ID can be used to locate the +** applicable RPT entry information. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource whose RPT entry should +** be returned. +** RptEntry - [out] Pointer to structure to hold the returned RPT entry. +** +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRptEntryGetByResourceId ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiRptEntryT *RptEntry +); + + +/******************************************************************************* +** +** Name: saHpiResourceSeveritySet +** +** Description: +** This function allows the caller to set the severity level applied to +** an event issued if a resource unexpectedly becomes unavailable to the +** HPI. A resource may become unavailable for several reasons including: +** ? The FRU associated with the resource is no longer present in the +** system (a surprise extraction has occurred) ? A catastrophic failure +** has occurred Typically, the HPI implementation will provide an +** appropriate default value for this parameter, which may vary by +** resource; management software can override this default value by use +** of this function ? If a resource is removed from, then re-added to the +** RPT (e.g., because of a hot-swap action), the HPI implementation may +** reset the value of this parameter. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource for which the severity +** level will be set. +** Severity - [in] Severity level of event issued when the resource +** unexpectedly becomes unavailable to the HPI. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceSeveritySet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSeverityT Severity +); + + +/******************************************************************************* +** +** Name: saHpiResourceTagSet +** +** Description: +** This function allows the caller to set the resource tag for a +** particular resource. The resource tag is an informational value that +** supplies the caller with naming information for the resource. This +** should be set to the "user-visible" name for a resource, which can be +** used to identify the resource in messages to a human operator. For +** example, it could be set to match a physical, printed label attached +** to the entity associated with the resource. Typically, the HPI +** implementation will provide an appropriate default value for this +** parameter; this function is provided so that management software can +** override the default, if desired. The value of the resource tag may be +** retrieved from the resource's RPT entry. Note: If a resource is +** removed from, then re-added to the RPT (e.g., because of a hot-swap +** action), the HPI implementation may reset the value of this parameter. +** +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource for which the resource +** tag should be set. +** ResourceTag - [in] Pointer to string representing the resource tag. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceTagSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiTextBufferT *ResourceTag +); + + +/******************************************************************************* +** +** Name: saHpiResourceIdGet +** +** Description: +** This function returns the resource ID of the resource associated with +** the entity upon which the caller is running. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [out] Pointer to location to hold the returned resource +** ID. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_NOT_PRESENT is returned if the entity the +** caller is running on is not manageable in the addressed domain. +** SA_ERR_HPI_UNKNOWN is returned if the domain controller cannot +** determine an appropriate response. That is, there may be an +** appropriate resource ID in the domain to return, but it cannot be +** determined. +** +** Remarks: +** This function must be issued within a session to a domain that +** includes a resource associated with the entity upon which the caller +** is running, or the SA_ERR_HPI_NOT_PRESENT return will be issued. Since +** entities are contained within other entities, there may be multiple +** possible resources that could be returned to this call. For example, +** if there is a resource ID associated with a particular compute blade +** upon which the caller is running, and another associated with the +** chassis which contains the compute blade, either could logically be +** returned as an indication of a resource associated with the entity +** upon which the caller was running. The function should return the +** resource ID of the "smallest" resource that is associated with the +** caller. So, in the example above, the function should return the +** resource ID of the compute blade. Once the function has returned the +** resourceID, the caller may issue further HPI calls using that +** resourceID to learn the type of resource that been identified. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceIdGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiResourceIdT *ResourceId +); + + +/******************************************************************************* +** +** Name: saHpiEntitySchemaGet +** +** Description: +** This function returns the identifier of the Entity Schema for the HPI +** implementation. This schema defines valid Entity Paths that may be +** returned by the HPI implementation. +** +** Parameters: +** SessionId - [in] Handle to session context. +** SchemaId - [out] Pointer to the ID of the schema in use; zero +** indicates that a custom schema is in use. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** This function may be issued on any session opened to any domain in the +** system, and will return the same identifier. The identifier returned +** should either be zero, indicating that the HPI implementation uses a +** custom schema; or one of the schema identifiers defined in Appendix A, +** "Pre-Defined Entity Schemas," page 107. In the case of a custom +** schema, the HPI implementation may use arbitrary entity paths to +** describe resources in the system; in the case of a pre-defined schema, +** all entity paths should conform to the schema. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEntitySchemaGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiUint32T *SchemaId +); + + +/******************************************************************************* +** +** Name: saHpiEventLogInfoGet +** +** Description: +** This function retrieves the number of entries in the system event log, +** total size of the event log, timestamp for the most recent entry, the +** log's idea of the current time (i.e., timestamp that would be placed +** on an entry at this moment), enabled/disabled status of the log (see +** saHpiEventLogStateSet()), the overflow flag, the overflow action, and +** whether the log supports deletion of individual entries. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the system +** event log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the domain system event log. +** Info - [out] Pointer to the returned SEL information. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogInfoGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiSelInfoT *Info +); + + +/******************************************************************************* +** +** Name: saHpiEventLogEntryGet +** +** Description: +** This function retrieves an event log entry from a system event log. +** The special entry IDs SAHPI_OLDEST_ENTRY and SAHPI_NEWEST_ENTRY are +** used to select the oldest and newest entries, respectively, in the log +** being read. A returned NextEntryID of SAHPI_NO_MORE_ENTRIES indicates +** that the newest entry has been returned; there are no more entries +** going forward (time-wise) in the log. A returned PrevEntryID of +** SAHPI_NO_MORE_ENTRIES indicates that the oldest entry has been +** returned. To retrieve an entire list of entries going forward (oldest +** entry to newest entry) in the log, call this function first with an +** EntryID of SAHPI_OLDEST_ENTRY and then use the returned NextEntryID as +** the EntryID in the next call. Proceed until the NextEntryID returned +** is SAHPI_NO_MORE_ENTRIES. To retrieve an entire list of entries going +** backward (newest entry to oldest entry) in the log, call this function +** first with an EntryID of SAHPI_NEWEST_ENTRY and then use the returned +** PrevEntryID as the EntryID in the next call. Proceed until the +** PrevEntryID returned is SAHPI_NO_MORE_ENTRIES. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the system +** event log to be read. Set to SAHPI_DOMAIN_CONTROLLER_ID to address the +** domain system event log. +** EntryId - [in] Handle of the entry to retrieve from the SEL. Reserved +** event log entry ID values: SAHPI_OLDEST_ENTRY Oldest entry in the +** log. SAHPI_NEWEST_ENTRY Newest entry in the log. +** SAHPI_NO_MORE_ENTRIES Not valid for this parameter. Used only when +** retrieving the next and previous entry IDs. +** PrevEntryId - [out] Handle of previous (older adjacent) entry in event +** log. Reserved event log entry ID values: SAHPI_OLDEST_ENTRY Not valid +** for this parameter. Used only for the EntryID parameter. +** SAHPI_NEWEST_ENTRY Not valid for this parameter. Used only for the +** EntryID parameter. SAHPI_NO_MORE_ENTRIES No more entries in the log +** before the one referenced by the EntryId parameter. +** NextEntryId - [out] Handle of next (newer adjacent) entry in event +** log. Reserved event log entry ID values: SAHPI_OLDEST_ENTRY Not valid +** for this parameter. Used only for the EntryID parameter. +** SAHPI_NEWEST_ENTRY Not valid for this parameter. Used only for the +** EntryID parameter. SAHPI_NO_MORE_ENTRIES No more entries in the log +** after the one referenced by the EntryId parameter. +** EventLogEntry - [out] Pointer to retrieved event log entry. +** Rdr - [in/out] Pointer to structure to receive resource data record +** associated with the event, if available. If NULL, no RDR data will be +** returned. +** RptEntry - [in/out] Pointer to structure to receive RPT Entry +** associated with the event, if available. If NULL, no RPT entry data +** will be returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Event logs may include RPT entries and resource data records +** associated with the resource and sensor issuing an event along with +** the basic event data in the log. Because the system may be +** reconfigured after the event was entered in the log, this stored +** information may be important to interpret the event. If the event log +** includes logged RPT Entries and/or RDRs, and if the caller provides a +** pointer to a structure to receive this information, it will be +** returned along with the event log entry. If the caller provides a +** pointer for an RPT entry, but the event log does not include a logged +** RPT entry for the event being returned, RptEntry->ResourceCapabilities +** will be set to zero. No valid RPTEntry will have a zero value here. If +** the caller provides a pointer for an RDR, but the event log does not +** include a logged RDR for the event being returned, Rdr->RdrType will +** be set to SAHPI_NO_RECORD. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogEntryGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSelEntryIdT EntryId, + SAHPI_OUT SaHpiSelEntryIdT *PrevEntryId, + SAHPI_OUT SaHpiSelEntryIdT *NextEntryId, + SAHPI_OUT SaHpiSelEntryT *EventLogEntry, + SAHPI_INOUT SaHpiRdrT *Rdr, + SAHPI_INOUT SaHpiRptEntryT *RptEntry +); + + +/******************************************************************************* +** +** Name: saHpiEventLogEntryAdd +** +** Description: +** This function enables system management software to add entries to the +** system event log. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the system +** event log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the Domain System Event Log. +** EvtEntry - [in] Pointer to event log entry data to write to the system +** event log. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** This function forces a write of the event to the addressed event log. +** Nothing else is done with the event. Specific implementations of HPI +** may have restrictions on how much data may be passed to the +** saHpiEventLogEntryAdd() function. These restrictions should be +** documented by the provider of the HPI interface. If more event log +** data is provided than can be written, an error will be returned. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogEntryAdd ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSelEntryT *EvtEntry +); + + +/******************************************************************************* +** +** Name: saHpiEventLogEntryDelete +** +** Description: +** This function deletes an event log entry. This operation is only valid +** if so indicated by saHpiEventLogInfoGet(), via the +** DeleteEntrySupported field in the SaHpiSelInfoT structure. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] ResourceID of the resource that contains the system +** event log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the domain system event log. +** EntryId - [in] Entry ID on the event log entry to delete. Reserved +** event log entry ID values: SAHPI_OLDEST_ENTRY - Oldest entry in the +** log. SAHPI_NEWEST_ENTRY - Newest entry in the log. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_INVALID_CMD is returned if this log does not +** support this operation. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogEntryDelete ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSelEntryIdT EntryId +); + + +/******************************************************************************* +** +** Name: saHpiEventLogClear +** +** Description: +** This function erases the contents of the specified system event log. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] ResourceID of the resource that contains the system +** event log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the domain system event log. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Note that all event logs must support the "clear" operation, +** regardless of the setting of the DeleteEntrySupported field in the +** SaHpiSelInfoT structure returned by saHpiEventLogInfoGet(). +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogClear ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + + +/******************************************************************************* +** +** Name: saHpiEventLogTimeGet +** +** Description: +** This function retrieves the current time from the event log's own time +** clock. The value of this clock is used to timestamp log entries +** written into the log. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] ResourceID of the resource that contains the System +** Event Log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the Domain System Event Log. +** Time - [out] Pointer to the returned SEL current time. If the +** implementation cannot supply an absolute time value, then it may +** supply a time relative to some system-defined epoch, such as system +** boot. If the time value is less than or equal to +** SAHPI_TIME_MAX_RELATIVE, but not SAHPI_TIME_UNSPECIFIED, then it is +** relative; if it is greater than SAHPI_TIME_MAX_RELATIVE, then it is +** absolute. The value SAHPI_TIME_UNSPECIFIED indicates that the time is +** not set, or cannot be determined. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogTimeGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiTimeT *Time +); + + +/******************************************************************************* +** +** Name: saHpiEventLogTimeSet +** +** Description: +** This function sets the event log's time clock, which is used to +** timestamp events written into the log. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the system +** event log to be managed. set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the domain system event log. +** Time - [in] time to set the SEL clock to. If the implementation cannot +** supply an absolute time, then it may supply a time relative to some +** system-defined epoch, such as system boot. If the timestamp value is +** less than or equal to SAHPI_TIME_MAX_RELATIVE, but not +** SAHPI_TIME_UNSPECIFIED, then it is relative; if it is greater than +** SAHPI_TIME_MAX_RELATIVE, then it is absolute. The value +** SAHPI_TIME_UNSPECIFIED indicates that the time of the event cannot be +** determined. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogTimeSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiTimeT Time +); + + +/******************************************************************************* +** +** Name: saHpiEventLogStateGet +** +** Description: +** This function enables system management software to get the event log +** state. If the event log is "disabled" no events generated within the +** HPI implementation will be added to the event log. Events may still be +** added to the event log with the saHpiEventLogEntryAdd() function. When +** the event log is "enabled" events may be automatically added to the +** event log as they are generated in a resource or a domain, however, it +** is implementation-specific which events are automatically added to any +** event log. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] ResourceID of the resource that contains the System +** Event Log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the Domain System Event Log. +** Enable - [out] Pointer to the current SEL state. True indicates that +** the SEL is enabled; false indicates that it is disabled. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiBoolT *Enable +); + + +/******************************************************************************* +** +** Name: saHpiEventLogStateSet +** +** Description: +** This function enables system management software to set the event log +** enabled state. If the event log is "disabled" no events generated +** within the HPI implementation will be added to the event log. Events +** may still be added to the event log using the saHpiEventLogEntryAdd() +** function. When the event log is "enabled" events may be automatically +** added to the event log as they are generated in a resource or a +** domain. The actual set of events that are automatically added to any +** event log is implementation-specific. Typically, the HPI +** implementation will provide an appropriate default value for this +** parameter, which may vary by resource. This function is provided so +** that management software can override the default, if desired. Note: +** If a resource hosting an event log is re-initialized (e.g., because of +** a hot-swap action), the HPI implementation may reset the value of this +** parameter. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the system +** event log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the domain system event log. +** Enable - [in] SEL state to be set. True indicates that the SEL is to +** be enabled; false indicates that it is to be disabled. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiBoolT Enable +); + + +/******************************************************************************* +** +** Name: saHpiSubscribe +** +** Description: +** This function allows the caller to subscribe for session events. This +** single call provides subscription to all session events, regardless of +** event type or event severity. Only one subscription is allowed per +** session, and additional subscribers will receive an appropriate error +** code. No event filtering will be done by the underlying management +** service. +** +** Parameters: +** SessionId - [in] Session for which event subscription will be opened. +** ProvideActiveAlarms - [in] Indicates whether or not alarms which are +** active at the time of subscription should be queued for future +** retrieval via the saHpiEventGet() function. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_DUPLICATE is returned when a subscription is +** already in place for this session. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSubscribe ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiBoolT ProvideActiveAlarms +); + + +/******************************************************************************* +** +** Name: saHpiUnsubscribe +** +** Description: +** This function removes the event subscription for the session. After +** removal of a subscription, additional saHpiEventGet() calls will not +** be allowed unless the caller re-subscribes for events first. Any +** events that are still in the event queue when this function is called +** will be cleared from it. +** +** Parameters: +** SessionId - [in] Session for which event subscription will be closed. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_INVALID_REQUEST is returned if the caller is +** not currently subscribed for events in this session. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiUnsubscribe ( + SAHPI_IN SaHpiSessionIdT SessionId +); + + +/******************************************************************************* +** +** Name: saHpiEventGet +** +** Description: +** This function allows the caller to get an event. This call is only +** valid within a session, which has subscribed for events. If the +** ProvideActiveAlarms parameter was set in the subscription, the first +** events retrieved will reflect the state of currently active alarms for +** the resources belonging to the domain. After all active alarms are +** retrieved this function will begin returning newly generated events as +** the domain controller receives them. If there are one or more events +** on the event queue when this function is called, it will immediately +** return the next event on the queue. Otherwise, if the Timeout +** parameter is SAHPI_TIMEOUT_IMMEDIATE, it will return +** SA_ERR_HPI_TIMEOUT immediately. Otherwise, it will block for a time +** specified by the timeout parameter; if an event is added to the queue +** within that time, it will be returned immediately; if not, +** saHpiEventGet() will return SA_ERR_HPI_TIMEOUT. If the Timeout +** parameter is SAHPI_TIMEOUT_BLOCK, then saHpiEventGet() will block +** indefinitely, until an event becomes available, and then return that +** event. This provides for notification of events as they occur. +** +** Parameters: +** SessionId - [in] Session for which events are retrieved. +** Timeout - [in] The number of nanoseconds to wait for an event to +** arrive. Reserved time out values: SAHPI_TIMEOUT_IMMEDIATE Time out +** immediately if there are no events available (non-blocking call). +** SAHPI_TIMEOUT_BLOCK Call should not return until an event is +** retrieved. +** Event - [out] Pointer to the next available event. +** Rdr - [in/out] Pointer to structure to receive the resource data +** associated with the event. If NULL, no RDR will be returned. +** RptEntry - [in/out] Pointer to structure to receive the RPT entry +** associated with the resource that generated the event. If NULL, no RPT +** entry will be returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_TIMEOUT is returned if no event is available +** to return within the timeout period. If SAHPI_TIMEOUT_IMMEDIATE is +** passed in the Timeout parameter, this error return will be used if +** there is no event queued when the function is called. +** +** Remarks: +** If the caller provides a pointer for an RPT entry, but the event does +** not include a valid resource ID for a resource in the domain (possible +** on OEM or USER type event), then the ResourceCapabilities field in +** *RptEntry will be set to zero. No valid RPT entry will have a zero +** value here. If the caller provides a pointer for an RDR, but there is +** no valid RDR associated with the event being returned (e.g., returned +** event is not a sensor event), Rdr->RdrType will be set to +** SAHPI_NO_RECORD. The timestamp reported in the returned event +** structure is the best approximation an implementation has to when the +** event actually occurred. The implementation may need to make an +** approximation (such as the time the event was placed on the event +** queue) because it may not have access to the actual time the event +** occurred. The value SAHPI_TIME_UNSPECIFIED indicates that the time of +** the event cannot be determined. If the implementation cannot supply an +** absolute timestamp, then it may supply a timestamp relative to some +** system-defined epoch, such as system boot. If the timestamp value is +** less than or equal to SAHPI_TIME_MAX_RELATIVE, but not +** SAHPI_TIME_UNSPECIFIED, then it is relative; if it is greater than +** SAHPI_TIME_MAX_RELATIVE, then it is absolute. 6 Resource Functions +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiTimeoutT Timeout, + SAHPI_OUT SaHpiEventT *Event, + SAHPI_INOUT SaHpiRdrT *Rdr, + SAHPI_INOUT SaHpiRptEntryT *RptEntry +); + + +/******************************************************************************* +** +** Name: saHpiRdrGet +** +** Description: +** This function returns a resource data record from the addressed +** resource. Submitting an EntryId of SAHPI_FIRST_ENTRY results in the +** first RDR being read. A returned NextEntryID of SAHPI_LAST_ENTRY +** indicates the last RDR has been returned. A successful retrieval will +** include the next valid EntryId. To retrieve the entire list of RDRs, +** call this function first with an EntryId of SAHPI_FIRST_ENTRY and then +** use the returned NextEntryId in the next call. Proceed until the +** NextEntryId returned is SAHPI_LAST_ENTRY. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** EntryId - [in] Handle of the RDR to retrieve. Reserved entry ID +** values: SAHPI_FIRST_ENTRY Get first entry SAHPI_LAST_ENTRY Reserved as +** delimiter for end of list. Not a valid entry identifier. +** NextEntryId - [out] Pointer to location to store Entry ID of next +** entry in RDR repository. +** Rdr - [out] Pointer to the structure to receive the requested resource +** data record. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** A resource's RDR repository is static over the lifetime of the +** resource; therefore no precautions are required against changes to the +** content of the RDR repository while it is being accessed. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRdrGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiEntryIdT EntryId, + SAHPI_OUT SaHpiEntryIdT *NextEntryId, + SAHPI_OUT SaHpiRdrT *Rdr +); + + +/******************************************************************************* +** +** Name: saHpiSensorReadingGet +** +** Description: +** This function is used to retrieve a sensor reading. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which the sensor reading is being +** retrieved. +** Reading - [out] Pointer to a structure to receive sensor reading +** values. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorReadingGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiSensorReadingT *Reading +); + + +/******************************************************************************* +** +** Name: saHpiSensorReadingConvert +** +** Description: +** This function converts between raw and interpreted sensor reading +** values. The type of conversion done depends on the passed-in +** ReadingInput parameter. If it contains only a raw value, then this is +** converted to an interpreted value in ConvertedReading; if it contains +** only an interpreted value, then this is converted to a raw value in +** ConvertedReading. If it contains neither type of value, or both, then +** an error is returned. The ReadingInput parameter is not altered in any +** case. If the sensor does not use raw values - i.e., it directly +** returns interpreted values - then this routine returns an error. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which reading is associated. +** ReadingInput - [in] Pointer to the structure that contains raw or +** interpreted reading to be converted. +** ConvertedReading - [out] Pointer to structure to hold converted +** reading. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_INVALID_PARAMS is returned if the ReadingInput +** parameter is invalid; e.g. if it contains neither a raw nor an +** interpreted value; or if it contains both; or if it contains an +** invalid value. SA_ERR_HPI_INVALID_DATA is returned if the sensor does +** not support raw readings. SA_ERR_HPI_NOT_PRESENT is returned if the +** sensor is not present. +** +** Remarks: +** The EventStatus field in ReadingInput is not used by this function. To +** make conversions, sensor-specific data may be required. Thus, the +** function references a particular sensor in the system through the +** SessionID/ResourceID/SensorNum parameters. If this sensor is not +** present, and sensor- specific information is required, the conversion +** will fail and SA_ERR_HPI_NOT_PRESENT will be returned. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorReadingConvert ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_IN SaHpiSensorReadingT *ReadingInput, + SAHPI_OUT SaHpiSensorReadingT *ConvertedReading +); + + +/******************************************************************************* +** +** Name: saHpiSensorThresholdsGet +** +** Description: +** This function retrieves the thresholds for the given sensor. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which threshold values are being +** retrieved. +** SensorThresholds - [out] Pointer to returned sensor thresholds. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorThresholdsGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiSensorThresholdsT *SensorThresholds +); + + +/******************************************************************************* +** +** Name: saHpiSensorThresholdsSet +** +** Description: +** This function sets the specified thresholds for the given sensor. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of addressed resource. +** SensorNum - [in] Sensor number for which threshold values are being +** set. +** SensorThresholds - [in] Pointer to the sensor thresholds values being +** set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** For each threshold or hysteresis value to be set, the corresponding +** sensor reading structure must indicate whether a raw or interpreted +** value is present. If neither are present, then that threshold or +** hysteresis value will not be set. Each sensor may require settings to +** be done with raw, or interpreted values, or may permit either; this is +** defined by the field ThresholdDefn.TholdCapabilities in the sensor's +** RDR (saHpiSensorRecT). If the interpreted value and raw value are both +** provided, and both are legal for the sensor, the interpreted value +** will be ignored and the raw value will be used. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorThresholdsSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_IN SaHpiSensorThresholdsT *SensorThresholds +); + + +/******************************************************************************* +** +** Name: saHpiSensorTypeGet +** +** Description: +** This function retrieves the sensor type and event category for the +** specified sensor. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which the type is being retrieved +** Type - [out] Pointer to returned enumerated sensor type for the +** specified sensor. +** Category - [out] Pointer to location to receive the returned sensor +** event category. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorTypeGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiSensorTypeT *Type, + SAHPI_OUT SaHpiEventCategoryT *Category +); + + +/******************************************************************************* +** +** Name: saHpiSensorEventEnablesGet +** +** Description: +** This function provides the ability to get the disable or enable event +** message generation status for individual sensor events. The sensor +** event states are relative to the event category specified by the +** sensor. See the SaHpiEventCategoryT definition in section 7.3, +** "Events, Part 1," on page 83 for more information. Within the +** structure returned, there are two elements that contain bit flags; one +** for assertion events and one for de-assertion events. A bit set to '1' +** in the "AssertEvents" element in the structure indicates that an event +** will be generated when the corresponding event state changes from +** de-asserted to asserted on that sensor. A bit set to '1' in the +** "DeassertEvents" element in the structure indicates that an event will +** be generated when the corresponding event state changes from asserted +** to de-asserted on that sensor. The saHpiSensorEventEnablesGet() +** function also returns the general sensor status - whether the sensor +** is completely disabled, or event generation is completely disabled. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which the event enable +** configuration is being requested +** Enables - [out] Pointer to the structure for returning sensor status +** and event enable information. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Disabling events means that events are disabled for all sessions, not +** just the session referenced by the SessionId parameter. For sensors +** hosted by resources that have the "SAHPI_CAPABILITY_EVT_DEASSERTS" +** flag set in its RPT entry, the "AssertEvents" element and the +** "DeassertsEvents" element will always have same value. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorEventEnablesGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiSensorEvtEnablesT *Enables +); + + +/******************************************************************************* +** +** Name: saHpiSensorEventEnablesSet +** +** Description: +** This function provides the ability to set the disable or enable event +** message generation status for individual sensor events. The sensor +** event states are relative to the event category specified by the +** sensor. See the SaHpiEventCategoryT definition for more information. +** Within the structure passed, there are two elements, which contain bit +** flags; one for assertion events and one for de-assertion events. +** However, the use of these two elements depends on whether the resource +** addressed has the "SAHPI_CAPABILITY_EVT_DEASSERTS" flag set in its RPT +** entry. This capability, if set, advertises that all sensors hosted by +** the resource will always send a "de-assert" event when any state is +** de-asserted whose assertion generates an "assert" event. Thus, for +** sensors hosted by resources that advertise this behavior, it is not +** meaningful to control assert events and de-assert events separately. +** For sensors on resources that do not have the +** "SAHPI_CAPABILITY_EVT_DEASSERTS" flag set, a bit set to '1' in the +** "AssertEvents" element in the structure indicates that an event will +** be generated when the corresponding event state changes from +** de-asserted to asserted on that sensor., and a bit set to '1' in the +** "DeassertEvents" element in the structure indicates that an event will +** be generated when the corresponding event state changes from asserted +** to de-asserted on that sensor. For sensors on resources, which do have +** the "SAHPI_CAPABILITY_EVT_DEASSERTS" flag set, the "DeassertEvents" +** element is not used. For sensors on these resources, a bit set to '1' +** in the "AssertEvents" element in the structure indicates that an event +** will be generated when the corresponding event state changes in either +** direction (de-asserted to asserted or asserted to de-asserted). The +** saHpiSensorEventEnablesSet() function also allows setting of general +** sensor status - whether the sensor is completely disabled, or event +** generation is completely disabled. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which the event enables are being +** set. +** Enables - [in] Pointer to the structure containing the enabled status +** for each event. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Disabling events means that events are disabled for all sessions, not +** just the session referenced by the SessionId parameter. +** saHpiSensorEventEnablesGet () will return the values which were last +** set by saHpiSensorEventEnablesSet() for the "AssertEvents" and +** "DeassertEvents" elements in the passed data structures. However, for +** sensors hosted by any resource that has the +** SAHPI_CAPABILITY_EVT_DEASSERTS flag set in its RPT entry, the passed +** "AssertEvents" element on the saHpiSensorEventEnablesSet () function +** is used for both assertion and de-assertion event enable flags. In +** this case, this value will be returned in both the "AssertEvents" and +** "DeassertEvents" elements on a subsequent saHpiSensorEventEnablesGet +** () call. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorEventEnablesSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_IN SaHpiSensorEvtEnablesT *Enables +); + + +/******************************************************************************* +** +** Name: saHpiControlTypeGet +** +** Description: +** This function retrieves the control type of a control object. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** CtrlNum - [in] Control number +** Type - [out] Pointer to SaHpiCtrlTypeT variable to receive the +** enumerated control type for the specified control. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** The Type parameter must point to a variable of type SaHpiCtrlTypeT. +** Upon successful completion, the enumerated control type is returned in +** the variable pointed to by Type. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiControlTypeGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiCtrlNumT CtrlNum, + SAHPI_OUT SaHpiCtrlTypeT *Type +); + + +/******************************************************************************* +** +** Name: saHpiControlStateGet +** +** Description: +** This function retrieves the current state (generally the last state +** set) of a control object. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of addressed resource. +** CtrlNum - [in] Number of the control for which the state is being +** retrieved. +** CtrlState - [in/out] Pointer to a control data structure into which +** the current control state will be placed. For text controls, the line +** number to read is passed in via CtrlState->StateUnion.Text.Line. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Note that Text controls are unique in that they have a state +** associated with each line of the control - the state being the text on +** that line. The line number to be read is passed in to +** sahpiControlStateGet()via CtrlState- >StateUnion.Text.Line; the +** contents of that line of the control will be returned in CtrlState- +** >StateUnion.Text.Text. If the line number passed in is +** SAHPI_TLN_ALL_LINES, then sahpiControlStateGet() will return the +** entire text of the control, or as much of it as will fit in a single +** SaHpiTextBufferT, in CtrlState- >StateUnion.Text.Text. This value will +** consist of the text of all the lines concatenated, using the maximum +** number of characters for each line (no trimming of trailing blanks). +** Note that depending on the data type and language, the text may be +** encoded in 2-byte Unicode, which requires two bytes of data per +** character. Note that the number of lines and columns in a text control +** can be obtained from the control's Resource Data Record. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiControlStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiCtrlNumT CtrlNum, + SAHPI_INOUT SaHpiCtrlStateT *CtrlState +); + + +/******************************************************************************* +** +** Name: saHpiControlStateSet +** +** Description: +** This function is used for setting the state of the specified control +** object. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** CtrlNum - [in] Number of the control for which the state is being set. +** +** CtrlState - [in] Pointer to a control state data structure holding the +** state to be set +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** The CtrlState parameter must be of the correct type for the specified +** control. Text controls include a line number and a line of text in the +** CtrlState parameter, allowing update of just a single line of a text +** control. If less than a full line of data is written, the control will +** clear all spaces beyond those written on the line. Thus writing a +** zero-length string will clear the addressed line. It is also possible +** to include more characters in the text passed in the CtrlState +** structure than will fit on one line; in this case, the control will +** "wrap" to the next line (still clearing the trailing characters on the +** last line written). Thus, there are two ways to write multiple lines +** to a text control: (a) call saHpiControlStateSet() repeatedly for each +** line, or (b) call saHpiControlStateSet() once and send more characters +** than will fit on one line. The caller should not assume any "cursor +** positioning" characters are available to use, but rather should always +** write full lines and allow "wrapping" to occur. When calling +** saHpiControlStateSet() for a text control, the caller may set the line +** number to SAHPI_TLN_ALL_LINES; in this case, the entire control will +** be cleared, and the data will be written starting on line 0. (This is +** different from simply writing at line 0, which only alters the lines +** written to.) This feature may be used to clear the entire control, +** which can be accomplished by setting: CtrlState->StateUnion.Text.Line +** = SAHPI_TLN_ALL_LINES; CtrlState->StateUnion.Text.Text.DataLength = 0; +** Note that the number of lines and columns in a text control can be +** obtained from the control's Resource Data Record. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiControlStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiCtrlNumT CtrlNum, + SAHPI_IN SaHpiCtrlStateT *CtrlState +); + + +/******************************************************************************* +** +** Name: saHpiEntityInventoryDataRead +** +** Description: +** This function returns inventory data for a particular entity +** associated with a resource. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** EirId - [in] Identifier for the entity inventory repository. +** BufferSize - [in] Size of the InventData buffer passed in. +** InventData - [out] Pointer to the buffer for the returned data. +** ActualSize - [out] Pointer to size of the actual amount of data +** returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_INVENT_DATA_TRUNCATED is returned if the buffer +** passed in the InventData structure is not large enough (as indicated +** by the "BufferSize" parameter) to hold the entire InventData +** structure. +** +** Remarks: +** Before calling saHpiEntityInventoryDataRead() the caller should +** allocate a sufficiently large buffer to hold the data, and pass the +** size of the buffer in the "BufferSize" parameter. The +** saHpiEntityInventoryDataRead() function will return, at the location +** pointed to by the ActualSize parameter, the actual space used in the +** buffer to hold the returned data. If the data will not fit in the +** buffer, as much as will fit will be returned, *ActualSize will be set +** to indicated a suggested buffer size for the entire inventory data, +** the "Validity" field in the InventData buffer will be set to +** "SAHPI_INVENT_DATA_OVERFLOW," and an error return will be made. Since +** it is impossible to know how large the inventory data may be without +** actually reading and processing it from the entity inventory +** repository, it may be advisable to err on the large side in allocating +** the buffer. Note that the data includes many pointers to +** SaHpiTextBufferT structures. The implementation of +** saHpiEntityInventoryDataRead() may not reserve space for the maximum +** size of each of these structures when formatting the data in the +** returned buffer. Thus, if a user wishes to lengthen the data in one of +** these structures, a new SaHpiTextBufferT structure should be +** allocated, and the appropriate pointer reset to point to this new +** structure in memory. See the description of the SaHpiInventoryDataT +** structure in section 7.9, "Entity Inventory Data," on page 94, for +** details on the format of the returned data. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEntityInventoryDataRead ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiEirIdT EirId, + SAHPI_IN SaHpiUint32T BufferSize, + SAHPI_OUT SaHpiInventoryDataT *InventData, + SAHPI_OUT SaHpiUint32T *ActualSize +); + + +/******************************************************************************* +** +** Name: saHpiEntityInventoryDataWrite +** +** Description: +** This function writes the specified data to the inventory information +** area. Note: If the resource hosting the inventory data is +** re-initialized, or if the entity itself is removed and reinserted, the +** inventory data may be reset to its default settings, losing data +** written to the repository with this function. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** EirId - [in] Identifier for the entity inventory repository. +** InventData - [in] Pointer to data to write to the repository. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** The SaHpiInventoryDataT structure consists of a Validity field and +** then a set of pointers to record structures. It is not required that +** all pointers point to data within a single contiguous buffer. The +** "Validity" field in the SaHpiInventoryDataT structure must be set to +** "SAHPI_INVENT_DATA_VALID," or else the saHpiEntityInventoryDataWrite() +** function will take no action and return an error. This is to help +** prevent invalid data returned by a saHpiEntityInventoryDataRead() +** function from being inadvertently written to the resource. For this +** protection to work, the caller should not change the value of the +** "Validity" field in the SaHpiInventoryDataT structure unless building +** an entire Inventory Data set from scratch. Some implementations may +** impose limitations on the languages of the strings passed in within +** the InventData parameter. Implementation-specific documentation +** should identify these restrictions. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEntityInventoryDataWrite ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiEirIdT EirId, + SAHPI_IN SaHpiInventoryDataT *InventData +); + + +/******************************************************************************* +** +** Name: saHpiWatchdogTimerGet +** +** Description: +** This function retrieves the current watchdog timer settings and +** configuration. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource, which contains the +** watchdog timer being addressed. +** WatchdogNum - [in] The watchdog number that specifies the watchdog +** timer on a resource. +** Watchdog - [out] Pointer to watchdog data structure. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** See the description of the SaHpiWatchdogT structure in 7.11, +** "Watchdogs" on page 96 for details on what information is returned by +** this function. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiWatchdogTimerGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiWatchdogNumT WatchdogNum, + SAHPI_OUT SaHpiWatchdogT *Watchdog +); + + +/******************************************************************************* +** +** Name: saHpiWatchdogTimerSet +** +** Description: +** This function provides a method for initializing the watchdog timer +** configuration. Once the appropriate configuration has be set using +** saHpiWatchdogTimerSet(), the user must then call +** saHpiWatchdogTimerReset() to initially start the watchdog timer. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the +** watchdog timer being addressed. +** WatchdogNum - [in] The watchdog number specifying the specific +** watchdog timer on a resource. +** Watchdog - [in] Pointer to watchdog data structure. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** If the initial counter value in the SaHpiWatchdogT structure is set to +** 0, the Watchdog will immediately time out and take the pre-timeout and +** timeout actions, as well as log an event. This provides a mechanism +** for software to force an immediate recovery action should that be +** dependent on a Watchdog timeout occurring. See the description of the +** SaHpiWatchdogT structure for more details on the effects of this +** command related to specific data passed in that structure. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiWatchdogTimerSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiWatchdogNumT WatchdogNum, + SAHPI_IN SaHpiWatchdogT *Watchdog +); + + +/******************************************************************************* +** +** Name: saHpiWatchdogTimerReset +** +** Description: +** This function provides a method to start or restart the watchdog timer +** from the initial countdown value. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID for the resource that contains the +** watchdog timer being addressed. +** WatchdogNum - [in] The watchdog number specifying the specific +** watchdog timer on a resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** If the Watchdog has been configured to issue a Pre-Timeout interrupt, +** and that interrupt has already occurred, the saHpiWatchdogTimerReset() +** function will not reset the watchdog counter. The only way to stop a +** Watchdog from timing out once a Pre-Timeout interrupt has occurred is +** to use the saHpiWatchdogTimerSet() function to reset and/or stop the +** timer. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiWatchdogTimerReset ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiWatchdogNumT WatchdogNum +); + + +/******************************************************************************* +** +** Name: saHpiHotSwapControlRequest +** +** Description: +** A resource supporting hot swap typically supports default policies for +** insertion and extraction. On insertion, the default policy may be for +** the resource to turn the associated FRU's local power on and to +** de-assert reset. On extraction, the default policy may be for the +** resource to immediately power off the FRU and turn on a hot swap +** indicator. This function allows a caller, after receiving a hot swap +** event with HotSwapState equal to SAHPI_HS_STATE_INSERTION_PENDING or +** SAHPI_HS_STATE_EXTRACTION_PENDING, to request control of the hot swap +** policy and prevent the default policy from being invoked. Because a +** resource that supports the simplified hot swap model will never +** transition into Insertion Pending or Extraction Pending states, this +** function is not applicable to those resources. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapControlRequest ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + + +/******************************************************************************* +** +** Name: saHpiResourceActiveSet +** +** Description: +** During insertion, a resource supporting hot swap will generate an +** event to indicate that it is in the INSERTION PENDING state. If the +** management middleware or other user software calls +** saHpiHotSwapControlRequest() before the resource begins an auto-insert +** operation, then the resource will remain in INSERTION PENDING state +** while the user acts on the resource to integrate it into the system. +** During this state, the user can instruct the resource to power on the +** associated FRU, to de-assert reset, or to turn off its hot swap +** indicator using the saHpiResourcePowerStateSet(), +** saHpiResourceResetStateSet(), or saHpiHotSwapIndicatorStateSet() +** functions, respectively. Once the user has completed with the +** integration of the FRU, this function must be called to signal that +** the resource should now transition into ACTIVE/HEALTHY or +** ACTIVE/UNHEALTHY state (depending on whether or not there are active +** faults). The user may also use this function to request a resource to +** return to the ACTIVE/HEALTHY or ACTIVE/UNHEALTHY state from the +** EXTRACTION PENDING state in order to reject an extraction request. +** Because a resource that supports the simplified hot swap model will +** never transition into Insertion Pending or Extraction Pending states, +** this function is not applicable to those resources. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Only valid if resource is in INSERTION PENDING or EXTRACTION PENDING +** state and an auto-insert or auto-extract policy action has not been +** initiated. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceActiveSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + + +/******************************************************************************* +** +** Name: saHpiResourceInactiveSet +** +** Description: +** During extraction, a resource supporting hot swap will generate an +** event to indicate that it is in the EXTRACTION PENDING state. If the +** management middleware or other user software calls +** saHpiHotSwapControlRequest() before the resource begins an +** auto-extract operation, then the resource will remain in EXTRACTION +** PENDING state while the user acts on the resource to isolate the +** associated FRU from the system. During this state, the user can +** instruct the resource to power off the FRU, to assert reset, or to +** turn on its hot swap indicator using the saHpiResourcePowerStateSet(), +** saHpiResourceResetStateSet(), or saHpiHotSwapIndicatorStateSet() +** functions, respectively. Once the user has completed the shutdown of +** the FRU, this function must be called to signal that the resource +** should now transition into INACTIVE state. The user may also use this +** function to request a resource to return to the INACTIVE state from +** the INSERTION PENDING state to abort a hot-swap insertion action. +** Because a resource that supports the simplified hot swap model will +** never transition into Insertion Pending or Extraction Pending states, +** this function is not applicable to those resources. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Only valid if resource is in EXTRACTION PENDING or INSERTION PENDING +** state and an auto-extract or auto-insert policy action has not been +** initiated. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceInactiveSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + + +/******************************************************************************* +** +** Name: saHpiAutoInsertTimeoutGet +** +** Description: +** This function allows the caller to request the auto-insert timeout +** value. This value indicates how long the HPI implementation will wait +** before the default auto-insertion policy is invoked. Further +** information on the auto-insert timeout can be found in the function +** saHpiAutoInsertTimeoutSet(). +** +** Parameters: +** SessionId - [in] Handle to session context. +** Timeout - [out] Pointer to location to store the number of nanoseconds +** to wait before autonomous handling of the hotswap event. Reserved time +** out values: SAHPI_TIMEOUT_IMMEDIATE indicates autonomous handling is +** immediate. SAHPI_TIMEOUT_BLOCK indicates autonomous handling does not +** occur. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoInsertTimeoutGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiTimeoutT *Timeout +); + + +/******************************************************************************* +** +** Name: saHpiAutoInsertTimeoutSet +** +** Description: +** This function allows the caller to configure a timeout for how long to +** wait before the default auto-insertion policy is invoked. This +** function accepts a parameter instructing the implementation to impose +** a delay before a resource will perform its default hot swap policy for +** auto-insertion. The parameter may be set to SAHPI_TIMEOUT_IMMEDIATE to +** direct resources to proceed immediately to auto-insertion, or to +** SAHPI_TIMEOUT_BLOCK to prevent auto-insertion from ever occurring. If +** the parameter is set to another value, then it defines the number of +** nanoseconds between the time a hot swap event with HotSwapState = +** SAHPI_HS_STATE_INSERTION_PENDING is generated, and the time that the +** auto-insertion policy will be invoked for that resource. If, during +** this time period, a saHpiHotSwapControlRequest() function is +** processed, the timer will be stopped, and the auto-insertion policy +** will not be invoked. Once the auto-insertion process begins, the user +** software will not be allowed to take control of the insertion process; +** hence, the timeout should be set appropriately to allow for this +** condition. Note that the timeout period begins when the hot swap event +** with HotSwapState = SAHPI_HS_STATE_INSERTION_PENDING is initially +** generated; not when it is received by a caller with a saHpiEventGet() +** function call, or even when it is placed in a session event queue. +** +** Parameters: +** SessionId - [in] Handle to session context. +** Timeout - [in] The number of nanoseconds to wait before autonomous +** handling of the hotswap event. Reserved time out values: +** SAHPI_TIMEOUT_IMMEDIATE indicates proceed immediately to autonomous +** handling. SAHPI_TIMEOUT_BLOCK indicates prevent autonomous handling. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoInsertTimeoutSet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiTimeoutT Timeout +); + + +/******************************************************************************* +** +** Name: saHpiAutoExtractTimeoutGet +** +** Description: +** This function allows the caller to request the timeout for how long +** the implementation will wait before the default auto-extraction policy +** is invoked. Further information on auto-extract time outs is detailed +** in saHpiAutoExtractTimeoutSet(). +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** Timeout - [out] Pointer to location to store the number of nanoseconds +** to wait before autonomous handling of the hotswap event. Reserved time +** out values: SAHPI_TIMEOUT_IMMEDIATE indicates autonomous handling is +** immediate. SAHPI_TIMEOUT_BLOCK indicates autonomous handling does not +** occur. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoExtractTimeoutGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiTimeoutT *Timeout +); + + +/******************************************************************************* +** +** Name: saHpiAutoExtractTimeoutSet +** +** Description: +** This function allows the caller to configure a timeout for how long to +** wait before the default auto-extraction policy is invoked. This +** function accepts a parameter instructing the implementation to impose +** a delay before a resource will perform its default hot swap policy for +** auto-extraction. The parameter may be set to SAHPI_TIMEOUT_IMMEDIATE +** to direct the resource to proceed immediately to auto-extraction, or +** to SAHPI_TIMEOUT_BLOCK to prevent auto-extraction from ever occurring +** on a resource. If the parameter is set to another value, then it +** defines the number of nanoseconds between the time a hot swap event +** with HotSwapState = SAHPI_HS_STATE_EXTRACTION_PENDING is generated, +** and the time that the auto- extraction policy will be invoked for the +** resource. If, during this time period, a saHpiHotSwapControlRequest() +** function is processed, the timer will be stopped, and the +** auto-extraction policy will not be invoked. Once the auto-extraction +** process begins, the user software will not be allowed to take control +** of the extraction process; hence, the timeout should be set +** appropriately to allow for this condition. Note that the timeout +** period begins when the hot swap event with HotSwapState = +** SAHPI_HS_STATE_EXTRACTION_PENDING is initially generated; not when it +** is received by a caller with a saHpiEventGet() function call, or even +** when it is placed in a session event queue. The auto-extraction policy +** is set at the resource level and is only supported by resources +** supporting the "Managed Hot Swap" capability. After discovering that a +** newly inserted resource supports "Managed Hot Swap," middleware or +** other user software may use this function to change the default +** auto-extraction policy for that resource. If a resource supports the +** simplified hot-swap model, setting this timer has no effect since the +** resource will transition directly to "Not Present" state on an +** extraction. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** Timeout - [in] The number of nanoseconds to wait before autonomous +** handling of the hotswap event. Reserved time out values: +** SAHPI_TIMEOUT_IMMEDIATE indicates proceed immediately to autonomous +** handling. SAHPI_TIMEOUT_BLOCK indicates prevent autonomous handling. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoExtractTimeoutSet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiTimeoutT Timeout +); + + +/******************************************************************************* +** +** Name: saHpiHotSwapStateGet +** +** Description: +** This function allows the caller to retrieve the current hot swap state +** of a resource. The returned state will be one of the following five +** states: ? SAHPI_HS_STATE_INSERTION_PENDING ? +** SAHPI_HS_STATE_ACTIVE_HEALTHY ? SAHPI_HS_STATE_ACTIVE_UNHEALTHY ? +** SAHPI_HS_STATE_EXTRACTION_PENDING ? SAHPI_HS_STATE_INACTIVE The state +** SAHPI_HS_STATE_NOT_PRESENT will never be returned, because a resource +** that is not present cannot be addressed by this function in the first +** place. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** State - [out] Pointer to location to store returned state information. +** +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiHsStateT *State +); + + +/******************************************************************************* +** +** Name: saHpiHotSwapActionRequest +** +** Description: +** A resource supporting hot swap typically requires a physical action on +** the associated FRU to invoke an insertion or extraction process. An +** insertion process is invoked by physically inserting the FRU into a +** chassis. Physically opening an ejector latch or pressing a button +** invokes the extraction process. This function allows the caller to +** invoke an insertion or extraction process via software. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** Action - [in] Requested action: SAHPI_HS_ACTION_INSERTION or +** SAHPI_HS_ACTION_EXTRACTION +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** There may be limitations on when saHpiHotSwapActionRequest() may be +** called, and what value may be used for the "Action" parameter +** depending on what state the resource is currently in. At the least, +** this function may be called: ? To request an Insertion action when the +** resource is in INACTIVE state ? To request an Extraction action when +** the resource is in the ACTIVE/HEALTHY or ACTIVE/ UNHEALTHY state. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapActionRequest ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiHsActionT Action +); + + +/******************************************************************************* +** +** Name: saHpiResourcePowerStateGet +** +** Description: +** A typical resource supporting hot swap will have the ability to +** control local power on the FRU associated with the resource. During +** insertion, the FRU can be instructed to power on. During extraction +** the FRU can be requested to power off. This function allows the caller +** to retrieve the current power state of the FRU associated with the +** specified resource. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** State - [out] The current power state of the resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** This function returns the actual low-level power state of the FRU, +** regardless of what hot-swap state the resource is in. Not all +** resources supporting managed hot swap will necessarily support this +** function. In particular, resources that use the simplified hot swap +** model may not have the ability to control FRU power. An appropriate +** error code will be returned if the resource does not support power +** control on the FRU. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourcePowerStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiHsPowerStateT *State +); + + +/******************************************************************************* +** +** Name: saHpiResourcePowerStateSet +** +** Description: +** A typical resource supporting hot swap will have to ability to control +** local power on the FRU associated with the resource. During insertion, +** the FRU can be instructed to power on. During extraction the FRU can +** be requested to power off. This function allows the caller to set the +** current power state of the FRU associated with the specified resource. +** +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** State - [in] the new power state that the specified resource will be +** set to. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** This function controls the hardware power on the FRU of what hot-swap +** state the resource is in. For example, it is legal (and may be +** desirable) to cycle power on the FRU even while it is in ACTIVE state +** in order to attempt to clear a fault condition. Similarly, a resource +** could be instructed to power on a FRU even while it is in INACTIVE +** state, for example, in order to run off-line diagnostics. Not all +** resources supporting managed hot swap will necessarily support this +** function. In particular, resources that use the simplified hot swap +** model may not have the ability to control FRU power. An appropriate +** error code will be returned if the resource does not support power +** control on the FRU. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourcePowerStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiHsPowerStateT State +); + + +/******************************************************************************* +** +** Name: saHpiHotSwapIndicatorStateGet +** +** Description: +** A FRU associated with a hot-swappable resource may include a hot swap +** indicator such as a blue LED. This indicator signifies that the FRU is +** ready for removal.. This function allows the caller to retrieve the +** state of this indicator. The returned state is either +** SAHPI_HS_INDICATOR_OFF or SAHPI_HS_INDICATOR_ON. This function will +** return the state of the indicator, regardless of what hot swap state +** the resource is in. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** State - [out] Pointer to location to store state of hot swap +** indicator. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Not all resources supporting managed hot swap will necessarily support +** this function. In particular, resources that use the simplified hot +** swap model may not have the ability to control a FRU hot swap +** indicator (it is likely that none exists). An appropriate error code +** will be returned if the resource does not support control of a hot +** swap indicator on the FRU. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapIndicatorStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiHsIndicatorStateT *State +); + + +/******************************************************************************* +** +** Name: saHpiHotSwapIndicatorStateSet +** +** Description: +** A FRU associated with a hot-swappable resource may include a hot swap +** indicator such as a blue LED. This indicator signifies that the FRU is +** ready for removal. This function allows the caller to set the state of +** this indicator. Valid states include SAHPI_HS_INDICATOR_OFF or +** SAHPI_HS_INDICATOR_ON. This function will set the indicator regardless +** of what hot swap state the resource is in, though it is recommended +** that this function be used only in conjunction with moving the +** resource to the appropriate hot swap state. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource +** State - [in] State of hot swap indicator to be set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Not all resources supporting managed hot swap will necessarily support +** this function. In particular, resources that use the simplified hot +** swap model may not have the ability to control a FRU hot swap +** indicator (it is likely that none exists). An appropriate error code +** will be returned if the resource does not support control of a hot +** swap indicator on the FRU. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapIndicatorStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiHsIndicatorStateT State +); + + +/******************************************************************************* +** +** Name: saHpiParmControl +** +** Description: +** This function allows the user to save and restore parameters +** associated with a specific resource. Valid actions for this function +** include: SAHPI_DEFAULT_PARM Restores the factory default settings for +** a specific resource. Factory defaults include sensor thresholds and +** configurations, and resource- specific configuration parameters. +** SAHPI_SAVE_PARM Stores the resource configuration parameters in +** non-volatile storage. Resource configuration parameters stored in +** non-volatile storage will survive power cycles and resource resets. +** SAHPI_RESTORE_PARM Restores resource configuration parameters from +** non-volatile storage. Resource configuration parameters include sensor +** thresholds and sensor configurations, as well as resource-specific +** parameters. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** Action - [in] Action to perform on resource parameters. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Resource-specific parameters should be documented in an implementation +** guide for the HPI implementation. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiParmControl ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiParmActionT Action +); + + +/******************************************************************************* +** +** Name: saHpiResourceResetStateGet +** +** Description: +** This function gets the reset state of an entity, allowing the user to +** determine if the entity is being held with its reset asserted. If a +** resource manages multiple entities, this function will address the +** entity which is identified in the RPT entry for the resource. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** ResetAction - [out] The current reset state of the entity. Valid reset +** states are: SAHPI_RESET_ASSERT: The entity's reset is asserted, e.g., +** for hot swap insertion/extraction purposes SAHPI_RESET_DEASSERT: The +** entity's reset is not asserted +** +** Return Value: +** SA_OK is returned if the resource has reset control, and the reset +** state has successfully been determined; otherwise, an error code is +** returned. SA_ERR_HPI_INVALID_CMD is returned if the resource has no +** reset control. +** +** Remarks: +** SAHPI_RESET_COLD and SAHPI_RESET_WARM are pulsed resets, and are not +** valid return values for ResetAction. If the entity is not being held +** in reset (using SAHPI_RESET_ASSERT), the appropriate return value is +** SAHPI_RESET_DEASSERT. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceResetStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiResetActionT *ResetAction +); + + +/******************************************************************************* +** +** Name: saHpiResourceResetStateSet +** +** Description: +** This function directs the resource to perform the specified reset type +** on the entity that it manages. If a resource manages multiple +** entities, this function addresses the entity that is identified in the +** RPT entry for the resource. Entities may be reset for a variety of +** reasons. A misbehaving entity may be reset to bring it to a known +** state. In these cases, either a warm reset or a cold reset may be +** performed. A warm reset preserves entity state, whereas a cold reset +** does not. Both of these reset types are pulsed asserted and then +** de-asserted by the HPI implementation. This allows the HPI +** implementation to hold the reset asserted for the appropriate length +** of time, as needed by each entity. saHpiResourceResetStateSet() can +** also be used for insertion and extraction scenarios. A typical +** resource supporting hot swap will have to ability to control local +** reset within the FRU. During insertion, a resource can be instructed +** to assert reset, while the FRU powers on. During extraction a resource +** can be requested to assert reset before the FRU is powered off. This +** function allows the caller to set the reset state of the specified +** FRU. SAHPI_RESET_ASSERT is used to hold the resource in reset; the FRU +** is brought out of the reset state by using either SAHPI_COLD_RESET or +** SAHPI_WARM_RESET. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** ResetAction - [in] Type of reset to perform on the entity. Valid reset +** actions are: SAHPI_COLD_RESET: Perform a 'Cold Reset' on the entity +** (pulse), leaving reset de-asserted SAHPI_WARM_RESET: Perform a 'Warm +** Reset' on the entity (pulse), leaving reset de-asserted +** SAHPI_RESET_ASSERT: Put the entity into reset state and hold reset +** asserted, e.g., for hot swap insertion/extraction purposes +** +** Return Value: +** SA_OK is returned if the resource has reset control, and the requested +** reset action has succeeded; otherwise, an error code is returned. +** SA_ERR_HPI_INVALID_CMD is returned if the resource has no reset +** control, or if the requested reset action is not supported by the +** resource. +** +** Remarks: +** Some resources may not support reset, or may only support a subset of +** the defined reset action types. Also, on some resources, cold and warm +** resets may be equivalent. 7 Data Type Definitions +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceResetStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiResetActionT ResetAction +); + + + +#endif + diff --git a/hpiutil/SaHpi.h-A b/hpiutil/SaHpi.h-A new file mode 100644 index 0000000..6efd5e9 --- /dev/null +++ b/hpiutil/SaHpi.h-A @@ -0,0 +1,4509 @@ +/******************************************************************************* +** +** FILE: +** SaHpi.h +** +** DESCRIPTION: +** This file provides the C language binding for the Service +** Availability(TM) Forum Platform Interface. It contains all of +** the prototypes and type definitions. Note, this file was +** generated from the Platform Interface specification document. +** +** SPECIFICATION VERSION: +** SAI-HPI-A.01.01 +** +** DATE: +** Thu Oct 3 14:48:41 2002 +** +** LEGAL: +** OWNERSHIP OF SPECIFICATION AND COPYRIGHTS. +** The Specification and all worldwide copyrights therein are +** the exclusive property of Licensor. You may not remove, obscure, or +** alter any copyright or other proprietary rights notices that are in or +** on the copy of the Specification you download. You must reproduce all +** such notices on all copies of the Specification you make. Licensor +** may make changes to the Specification, or to items referenced therein, +** at any time without notice. Licensor is not obligated to support or +** update the Specification. +** +** Copyright(c) 2002, Service Availability(TM) Forum. All rights +** reserved. +** +*******************************************************************************/ + +#ifndef __SAHPI_H +#define __SAHPI_H + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Basic Data Types and Values ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* General Types - need to be specified correctly for the host architecture */ +typedef unsigned char SaHpiUint8T; +typedef unsigned short SaHpiUint16T; +typedef unsigned int SaHpiUint32T; +typedef char SaHpiInt8T; +typedef short SaHpiInt16T; +typedef int SaHpiInt32T; +typedef long long SaHpiInt64T; +typedef float SaHpiFloat32T; +typedef double SaHpiFloat64T; + +typedef SaHpiUint8T SaHpiBoolT; +#define SAHPI_TRUE 1 +#define SAHPI_FALSE 0 + +/* Platform, O/S, or Vendor dependent */ +#define SAHPI_API +#define SAHPI_IN +#define SAHPI_OUT +#define SAHPI_INOUT + +/* +** Identifier for the manufacturer +** +** This is the IANA-assigned private enterprise number for the +** manufacturer of the resource or FRU, or of the manufacturer +** defining an OEM control or event type. A list of current +** IANA-assigned private enterprise numbers may be obtained at +** +** http://www.iana.org/assignments/enterprise-numbers +** +** If a manufacturer does not currently have an assigned number, one +** may be obtained by following the instructions located at +** +** http://www.iana.org/cgi-bin/enterprise.pl +*/ +typedef SaHpiUint32T SaHpiManufacturerIdT; +#define SAHPI_MANUFACTURER_ID_UNSPECIFIED (SaHpiManufacturerIdT)0 + +/* Version Types */ +typedef SaHpiUint32T SaHpiVersionT; + +/* +** Interface Version +** +** The interface version is the version of the actual interface and not the +** version of the implementation. It is a 24 bit value where +** the most significant 8 bits represent the compatibility level +** (with letters represented as the corresponding numbers); +** the next 8 bits represent the major version number; and +** the least significant 8 bits represent the minor version number. +*/ +#define SAHPI_INTERFACE_VERSION (SaHpiVersionT)0x010101 /* A.01.01 */ + +/* +** Return Codes +** +** SaErrorT is defined in the HPI specification. In the future a +** common SAF types definition may be created to contain this type. At +** that time, this typedef should be removed. +*/ +typedef SaHpiInt32T SaErrorT; /* Return code */ + +/* +** SA_OK: This code indicates that a command completed successfully. +*/ +#define SA_OK (SaErrorT)0x0000 + +/* This value is the base for all HPI-specific error codes. */ +#define SA_HPI_ERR_BASE -1000 + +/* +** SA_ERR_HPI_ERROR: An unspecified error occurred. This code should +** be returned only as a last resort; eg. if the cause of an error +** cannot be determined. +*/ +#define SA_ERR_HPI_ERROR (SaErrorT)(SA_HPI_ERR_BASE - 1) + +/* +** SA_ERR_HPI_UNSUPPORTED_API: The HPI implementation does not support +** this API. This code is appropriate, for example, if invoking the +** Hot Swap functions on an HPI implementation which has no hot swap +** support. Note that such an implementation would not report any hot +** swap capabilities via its RDRs. +*/ +#define SA_ERR_HPI_UNSUPPORTED_API (SaErrorT)(SA_HPI_ERR_BASE - 2) + +/* +** SA_ERR_HPI_BUSY: The command cannot be performed because the +** targeted device is busy. +*/ +#define SA_ERR_HPI_BUSY (SaErrorT)(SA_HPI_ERR_BASE - 3) + +/* +** SA_ERR_HPI_INVALID: The request is fundamentally invalid. +*/ +#define SA_ERR_HPI_INVALID (SaErrorT)(SA_HPI_ERR_BASE - 4) + +/* +** SA_ERR_HPI_INVALID_CMD: The specific object to which a command was +** directed does not support that command (which was otherwise valid). +*/ +#define SA_ERR_HPI_INVALID_CMD (SaErrorT)(SA_HPI_ERR_BASE - 5) + +/* +** SA_ERR_HPI_TIMEOUT: The requested operation, which had a timeout +** value specified, timed out. For example, when reading input with a +** timeout value, if no input arrives within the timeout interval, +** this code should be returned. This should only be returned in +** cases where a timeout is anticipated as a valid consequence of the +** operation; if the addressed entity is not responding due to a +** fault, use SA_ERR_HPI_NO_RESPONSE (qv). +*/ +#define SA_ERR_HPI_TIMEOUT (SaErrorT)(SA_HPI_ERR_BASE - 6) + +/* +** SA_ERR_HPI_OUT_OF_SPACE: The requested command failed due to +** resource limits. +*/ +#define SA_ERR_HPI_OUT_OF_SPACE (SaErrorT)(SA_HPI_ERR_BASE - 7) + +/* +** SA_ERR_HPI_DATA_TRUNCATED: The returned data was truncated. For +** example, when reading data into a fixed-size buffer, if the data is +** larger than the buffer, this code should be returned. +*/ +#define SA_ERR_HPI_DATA_TRUNCATED (SaErrorT)(SA_HPI_ERR_BASE - 8) + +/* +** SA_ERR_HPI_DATA_LEN_INVALID: The specified data length is invalid. +*/ +#define SA_ERR_HPI_DATA_LEN_INVALID (SaErrorT)(SA_HPI_ERR_BASE - 9) + +/* +** SA_ERR_HPI_DATA_EX_LIMITS: The supplied data exceeds limits. +*/ +#define SA_ERR_HPI_DATA_EX_LIMITS (SaErrorT)(SA_HPI_ERR_BASE - 10) + +/* +** SA_ERR_HPI_INVALID_PARAMS: One or more parameters to the command +** were invalid. +*/ +#define SA_ERR_HPI_INVALID_PARAMS (SaErrorT)(SA_HPI_ERR_BASE - 11) + +/* +** SA_ERR_HPI_INVALID_DATA: Cannot return requested data; eg. the +** specific object to which a command was directed does not support +** the data required by the command. +*/ +#define SA_ERR_HPI_INVALID_DATA (SaErrorT)(SA_HPI_ERR_BASE - 12) + +/* +** SA_ERR_HPI_NOT_PRESENT: The requested object was not present. For +** example, this code would be returned when attempting to access an +** entry in a RPT or RDR which is not present. As another example, this +** code would also be returned when accessing an invalid management +** instrument on a valid resource. +*/ +#define SA_ERR_HPI_NOT_PRESENT (SaErrorT)(SA_HPI_ERR_BASE - 13) + +/* +** SA_ERR_HPI_INVALID_DATA_FIELD: Invalid data field. +*/ +#define SA_ERR_HPI_INVALID_DATA_FIELD (SaErrorT)(SA_HPI_ERR_BASE - 14) + +/* +** SA_ERR_HPI_INVALID_SENSOR_CMD: Invalid sensor command. +*/ +#define SA_ERR_HPI_INVALID_SENSOR_CMD (SaErrorT)(SA_HPI_ERR_BASE - 15) + +/* +** SA_ERR_HPI_NO_RESPONSE: There was no response from the domain or +** object targeted by the command, due to some fault. This code +** indicates an un-anticipated failure to respond; compare with +** SA_ERR_HPI_TIMEOUT. +*/ +#define SA_ERR_HPI_NO_RESPONSE (SaErrorT)(SA_HPI_ERR_BASE - 16) + +/* +** SA_ERR_HPI_DUPLICATE: Duplicate request -- such as attempting to +** initialize something which has already been initialized (and which +** cannot be initialized twice). +*/ +#define SA_ERR_HPI_DUPLICATE (SaErrorT)(SA_HPI_ERR_BASE - 17) + +/* +** SA_ERR_HPI_UPDATING: The command could not be completed because +** the targeted object is in update mode. +*/ +#define SA_ERR_HPI_UPDATING (SaErrorT)(SA_HPI_ERR_BASE - 18) + +/* +** SA_ERR_HPI_INITIALIZING: The command could not be completed because +** the targeted object is initializing. +*/ +#define SA_ERR_HPI_INITIALIZING (SaErrorT)(SA_HPI_ERR_BASE - 19) + +/* +** SA_ERR_HPI_UNKNOWN: This code should be returned if, for some +** reason, the HPI implementation cannot determine the proper response +** to a command. For example, there may be a proper value to return +** for a given call, but the implementation may be unable to determine +** which one it is. +*/ +#define SA_ERR_HPI_UNKNOWN (SaErrorT)(SA_HPI_ERR_BASE - 20) + +/* +** SA_ERR_HPI_INVALID_SESSION: An invalid session ID was specified in +** the command. +*/ +#define SA_ERR_HPI_INVALID_SESSION (SaErrorT)(SA_HPI_ERR_BASE - 21) + +/* +** SA_ERR_HPI_INVALID_DOMAIN: Invalid domain ID specified -- ie. a +** domain ID which does not correspond to any real domain was +** specified in the command. +*/ +#define SA_ERR_HPI_INVALID_DOMAIN (SaErrorT)(SA_HPI_ERR_BASE - 22) + +/* +** SA_ERR_HPI_INVALID_RESOURCE: Invalid resource ID specified -- ie. a +** resource ID which does not correspond to a resource in the addressed +** domain was specified in the command. +*/ +#define SA_ERR_HPI_INVALID_RESOURCE (SaErrorT)(SA_HPI_ERR_BASE - 23) + +/* +** SA_ERR_HPI_INVALID_REQUEST: The request is invalid in the current +** context. An example would be attempting to unsubscribe for events, +** when the caller has not subscribed to events. +*/ +#define SA_ERR_HPI_INVALID_REQUEST (SaErrorT)(SA_HPI_ERR_BASE - 24) + +/* +** SA_ERR_HPI_ENTITY_NOT_PRESENT: The addressed management instrument is not active +** because the entity with which it is associated is not present. This +** condition could occur, for instance, when an alarm module is managing a +** fan tray FRU. The alarm module would contain management instruments (sensors, +** etc) for the fan tray. The fan tray may be removed, even though the +** management instruments are still represented in the alarm module. In this +** case, SA_ERR_HPI_ENTITY_NOT_PRESENT would be returned if a management instrument +** associated with a removed entity is accessed. +*/ +#define SA_ERR_HPI_ENTITY_NOT_PRESENT (SaErrorT)(SA_HPI_ERR_BASE - 25) + +/* +** SA_ERR_HPI_UNINITIALIZED: This code is returned when a request is +** made, and the HPI has not, yet, been initialized via saHpiInitialize(). +*/ +#define SA_ERR_HPI_UNINITIALIZED (SaErrorT)(SA_HPI_ERR_BASE - 26) + + +/* +** Domain, Session and Resource Type Definitions +*/ + +/* Domain ID. */ +typedef SaHpiUint32T SaHpiDomainIdT; +#define SAHPI_DEFAULT_DOMAIN_ID (SaHpiDomainIdT)0 + +/* The SAHPI_UNSPECIFIED_DOMAIN_ID value may be used by an implementation +** when populating the ResourceId value for an RPT entry that is a +** domain only. +*/ +#define SAHPI_UNSPECIFIED_DOMAIN_ID (SaHpiDomainIdT) 0xFFFFFFFF + +/* Session ID. */ +typedef SaHpiUint32T SaHpiSessionIdT; + +/* Resource identifier. */ +typedef SaHpiUint32T SaHpiResourceIdT; + +/* The SAHPI_UNSPECIFIED_RESOURCE_ID value may be used by an implementation +** when populating the DomainId value for an RPT entry that is a +** resource only. Note that this reserved value (0xFFFFFFFF) is also used +** to designate the domain controller, for domain-based event log access. +*/ +#define SAHPI_UNSPECIFIED_RESOURCE_ID (SaHpiResourceIdT) 0xFFFFFFFF + +/* The SAHPI_DOMAIN_CONTROLLER_ID value is a reserved resource ID +** value which is used to select the domain controller's event log +** (as opposed to a real resource's event log) when accessing logs. +** This value must not be used as the ID of any real resource. +*/ +#define SAHPI_DOMAIN_CONTROLLER_ID (SaHpiResourceIdT) 0xFFFFFFFE + +/* Table Related Type Definitions */ +typedef SaHpiUint32T SaHpiEntryIdT; +#define SAHPI_FIRST_ENTRY (SaHpiEntryIdT)0x00000000 +#define SAHPI_LAST_ENTRY (SaHpiEntryIdT)0xFFFFFFFF + +/* +** Time Related Type Definitions +** +** An HPI time value represents the local time as the number of nanoseconds +** from 00:00:00, January 1, 1970, in a 64-bit signed integer. This format +** is sufficient to represent times with nano-second resolution from the +** year 1678 to 2262. Every API which deals with time values must define +** the timezone used. +** +** It should be noted that although nano-second resolution is supported +** in the data type, the actual resolution provided by an implementation +** may be more limited than this. +** +** The value -2**63, which is 0x8000000000000000, is used to indicate +** "unknown/unspecified time". +** +** Conversion to/from POSIX and other common time representations is +** relatively straightforward. The following code framgment converts +** between SaHpiTimeT and time_t: +** +** time_t tt1, tt2; +** SaHpiTimeT saHpiTime; +** +** time(&tt1); +** saHpiTime = (SaHpiTimeT) tt1 * 1000000000; +** tt2 = saHpiTime / 1000000000; +** +** The following fragment converts between SaHpiTimeT and a struct timeval: +** +** struct timeval tv1, tv2; +** SaHpiTimeT saHpiTime; +** +** gettimeofday(&tv1, NULL); +** saHpiTime = (SaHpiTimeT) tv1.tv_sec * 1000000000 + tv1.tv_usec * 1000; +** tv2.tv_sec = saHpiTime / 1000000000; +** tv2.tv_usec = saHpiTime % 1000000000 / 1000; +** +** The following fragment converts between SaHpiTimeT and a struct timespec: +** +** struct timespec ts1, ts2; +** SaHpiTimeT saHpiTime; +** +** clock_gettime(CLOCK_REALTIME, &ts1); +** saHpiTime = (SaHpiTimeT) ts1.tv_sec * 1000000000 + ts1.tv_nsec; +** ts2.tv_sec = saHpiTime / 1000000000; +** ts2.tv_nsec = saHpiTime % 1000000000; +** +** Note, however, that since time_t is (effectively) universally 32 bits, +** all of these conversions will cease to work on January 18, 2038. +** +** Some subsystems may need the flexibility to report either absolute or +** relative (eg. to system boot) times. This will typically be in the +** case of a board which may or may not, depending on the system setup, +** have an idea of absolute time. For example, some boards may have +** "time of day" clocks which start at zero, and never get set to the +** time of day. +** +** In these cases, times which represent "current" time (in events, for +** example) can be reported based on the clock value, whether it has been +** set to the actual date/time, or whether it represents the elapsed time +** since boot. If it is the time since boot, the value will be (for 27 +** years) less than 0x0C00000000000000, which is Mon May 26 16:58:48 1997. +** If the value is greater than this, then it can be assumed to be an +** absolute time. +** +** Every API which can report either absolute or relative times must +** state this rule clearly in its interface specification. +*/ +typedef SaHpiInt64T SaHpiTimeT; /* Time in nanoseconds */ + +/* Unspecified or unknown time */ +#define SAHPI_TIME_UNSPECIFIED (SaHpiTimeT) 0x8000000000000000 + +/* Maximum time that can be specified as relative */ +#define SAHPI_TIME_MAX_RELATIVE (SaHpiTimeT) 0x0C00000000000000 +typedef SaHpiInt64T SaHpiTimeoutT; /* Timeout in nanoseconds */ + +/* Non-blocking call */ +#define SAHPI_TIMEOUT_IMMEDIATE (SaHpiTimeoutT) 0x0000000000000000 + +/* Blocking call, wait indefinitely for call to complete */ +#define SAHPI_TIMEOUT_BLOCK (SaHpiTimeoutT) -1 + +/* +** Language +** +** This enumeration lists all of the languages that can be associated with text. +** +** SAHPI_LANG_UNDEF indicates that the language is unspecified or +** unknown. +*/ +typedef enum { + SAHPI_LANG_UNDEF = 0, SAHPI_LANG_AFAR, SAHPI_LANG_ABKHAZIAN, + SAHPI_LANG_AFRIKAANS, SAHPI_LANG_AMHARIC, SAHPI_LANG_ARABIC, + SAHPI_LANG_ASSAMESE, SAHPI_LANG_AYMARA, SAHPI_LANG_AZERBAIJANI, + SAHPI_LANG_BASHKIR, SAHPI_LANG_BYELORUSSIAN, SAHPI_LANG_BULGARIAN, + SAHPI_LANG_BIHARI, SAHPI_LANG_BISLAMA, SAHPI_LANG_BENGALI, + SAHPI_LANG_TIBETAN, SAHPI_LANG_BRETON, SAHPI_LANG_CATALAN, + SAHPI_LANG_CORSICAN, SAHPI_LANG_CZECH, SAHPI_LANG_WELSH, + SAHPI_LANG_DANISH, SAHPI_LANG_GERMAN, SAHPI_LANG_BHUTANI, + SAHPI_LANG_GREEK, SAHPI_LANG_ENGLISH, SAHPI_LANG_ESPERANTO, + SAHPI_LANG_SPANISH, SAHPI_LANG_ESTONIAN, SAHPI_LANG_BASQUE, + SAHPI_LANG_PERSIAN, SAHPI_LANG_FINNISH, SAHPI_LANG_FIJI, + SAHPI_LANG_FAEROESE, SAHPI_LANG_FRENCH, SAHPI_LANG_FRISIAN, + SAHPI_LANG_IRISH, SAHPI_LANG_SCOTSGAELIC, SAHPI_LANG_GALICIAN, + SAHPI_LANG_GUARANI, SAHPI_LANG_GUJARATI, SAHPI_LANG_HAUSA, + SAHPI_LANG_HINDI, SAHPI_LANG_CROATIAN, SAHPI_LANG_HUNGARIAN, + SAHPI_LANG_ARMENIAN, SAHPI_LANG_INTERLINGUA, SAHPI_LANG_INTERLINGUE, + SAHPI_LANG_INUPIAK, SAHPI_LANG_INDONESIAN, SAHPI_LANG_ICELANDIC, + SAHPI_LANG_ITALIAN, SAHPI_LANG_HEBREW, SAHPI_LANG_JAPANESE, + SAHPI_LANG_YIDDISH, SAHPI_LANG_JAVANESE, SAHPI_LANG_GEORGIAN, + SAHPI_LANG_KAZAKH, SAHPI_LANG_GREENLANDIC, SAHPI_LANG_CAMBODIAN, + SAHPI_LANG_KANNADA, SAHPI_LANG_KOREAN, SAHPI_LANG_KASHMIRI, + SAHPI_LANG_KURDISH, SAHPI_LANG_KIRGHIZ, SAHPI_LANG_LATIN, + SAHPI_LANG_LINGALA, SAHPI_LANG_LAOTHIAN, SAHPI_LANG_LITHUANIAN, + SAHPI_LANG_LATVIANLETTISH, SAHPI_LANG_MALAGASY, SAHPI_LANG_MAORI, + SAHPI_LANG_MACEDONIAN, SAHPI_LANG_MALAYALAM, SAHPI_LANG_MONGOLIAN, + SAHPI_LANG_MOLDAVIAN, SAHPI_LANG_MARATHI, SAHPI_LANG_MALAY, + SAHPI_LANG_MALTESE, SAHPI_LANG_BURMESE, SAHPI_LANG_NAURU, + SAHPI_LANG_NEPALI, SAHPI_LANG_DUTCH, SAHPI_LANG_NORWEGIAN, + SAHPI_LANG_OCCITAN, SAHPI_LANG_AFANOROMO, SAHPI_LANG_ORIYA, + SAHPI_LANG_PUNJABI, SAHPI_LANG_POLISH, SAHPI_LANG_PASHTOPUSHTO, + SAHPI_LANG_PORTUGUESE, SAHPI_LANG_QUECHUA, SAHPI_LANG_RHAETOROMANCE, + SAHPI_LANG_KIRUNDI, SAHPI_LANG_ROMANIAN, SAHPI_LANG_RUSSIAN, + SAHPI_LANG_KINYARWANDA, SAHPI_LANG_SANSKRIT, SAHPI_LANG_SINDHI, + SAHPI_LANG_SANGRO, SAHPI_LANG_SERBOCROATIAN, SAHPI_LANG_SINGHALESE, + SAHPI_LANG_SLOVAK, SAHPI_LANG_SLOVENIAN, SAHPI_LANG_SAMOAN, + SAHPI_LANG_SHONA, SAHPI_LANG_SOMALI, SAHPI_LANG_ALBANIAN, + SAHPI_LANG_SERBIAN, SAHPI_LANG_SISWATI, SAHPI_LANG_SESOTHO, + SAHPI_LANG_SUDANESE, SAHPI_LANG_SWEDISH, SAHPI_LANG_SWAHILI, + SAHPI_LANG_TAMIL, SAHPI_LANG_TELUGU, SAHPI_LANG_TAJIK, + SAHPI_LANG_THAI, SAHPI_LANG_TIGRINYA, SAHPI_LANG_TURKMEN, + SAHPI_LANG_TAGALOG, SAHPI_LANG_SETSWANA, SAHPI_LANG_TONGA, + SAHPI_LANG_TURKISH, SAHPI_LANG_TSONGA, SAHPI_LANG_TATAR, + SAHPI_LANG_TWI, SAHPI_LANG_UKRAINIAN, SAHPI_LANG_URDU, + SAHPI_LANG_UZBEK, SAHPI_LANG_VIETNAMESE, SAHPI_LANG_VOLAPUK, + SAHPI_LANG_WOLOF, SAHPI_LANG_XHOSA, SAHPI_LANG_YORUBA, + SAHPI_LANG_CHINESE, SAHPI_LANG_ZULU +} SaHpiLanguageT; + +/* +** Text Buffers +** +** These structures are used for defining the type of data in the text buffer +** and the length of the buffer. Text buffers are used in the inventory data, +** RDR, RPT, etc. for variable length strings of data. +*/ + +#define SAHPI_MAX_TEXT_BUFFER_LENGTH 255 + +typedef enum { + SAHPI_TL_TYPE_BINARY = 0, /* String of bytes, any values legal */ + SAHPI_TL_TYPE_BCDPLUS, /* String of 0-9, space, dash, period ONLY */ + SAHPI_TL_TYPE_ASCII6, /* Reduced ASCII character set: 0x20-0x5F + ONLY */ + SAHPI_TL_TYPE_LANGUAGE /* ASCII or UNICODE depending on language */ +} SaHpiTextTypeT; + +typedef struct { + SaHpiTextTypeT DataType; + SaHpiLanguageT Language; /* Language the text is in. */ + SaHpiUint8T DataLength; /* Bytes used in Data buffer */ + SaHpiUint8T Data[SAHPI_MAX_TEXT_BUFFER_LENGTH]; /* Data buffer */ +} SaHpiTextBufferT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Entities ********** +********** ********** +******************************************************************************** +*******************************************************************************/ +/* +** Entity Types +** +** Entities are used to associate specific hardware components with sensors, +** controls, watchdogs, or resources. Entities are defined with an entity +** type enumeration, and an entity instance number (to distinguish between +** multiple instances of a particular type of entity; e.g., multiple power +** supplies in a system). +** +** Entities are uniquely identified in a system with an ordered series of +** Entity Type / Entity Instance pairs called an "Entity Path". Each subsequent +** Entity Type/Entity Instance in the path is the next higher "containing" +** entity. The "root" of the Entity Path (the outermost level of containment) +** is designated with an Entity Type of SAHPI_ENT_ROOT if the entire Entity Path +** is fewer than SAHPI_MAX_ENTITY_PATH entries in length. +** +** Enumerated Entity Types include those types enumerated by the IPMI Consortium +** for IPMI-managed entities, as well as additional types defined by the +** HPI specification. Room is left in the enumeration for the inclusion of +** Entity Types taken from other lists, if needed in the future. +*/ +/* Base values for entity types from various sources. */ +#define SAHPI_ENT_IPMI_GROUP 0 +#define SAHPI_ENT_SAFHPI_GROUP 0x10000 +#define SAHPI_ENT_ROOT_VALUE 0xFFFF +typedef enum +{ + SAHPI_ENT_UNSPECIFIED = SAHPI_ENT_IPMI_GROUP, + SAHPI_ENT_OTHER, + SAHPI_ENT_UNKNOWN, + SAHPI_ENT_PROCESSOR, + SAHPI_ENT_DISK_BAY, /* Disk or disk bay */ + SAHPI_ENT_PERIPHERAL_BAY, + SAHPI_ENT_SYS_MGMNT_MODULE, /* System management module */ + SAHPI_ENT_SYSTEM_BOARD, /* Main system board, may also be + processor board and/or internal + expansion board */ + SAHPI_ENT_MEMORY_MODULE, /* Board holding memory devices */ + SAHPI_ENT_PROCESSOR_MODULE, /* Holds processors, use this + designation when processors are not + mounted on system board */ + SAHPI_ENT_POWER_SUPPLY, /* Main power supply (supplies) for the + system */ + SAHPI_ENT_ADD_IN_CARD, + SAHPI_ENT_FRONT_PANEL_BOARD, /* Control panel */ + SAHPI_ENT_BACK_PANEL_BOARD, + SAHPI_ENT_POWER_SYSTEM_BOARD, + SAHPI_ENT_DRIVE_BACKPLANE, + SAHPI_ENT_SYS_EXPANSION_BOARD, /* System internal expansion board + (contains expansion slots). */ + SAHPI_ENT_OTHER_SYSTEM_BOARD, /* Part of board set */ + SAHPI_ENT_PROCESSOR_BOARD, /* Holds 1 or more processors. Includes + boards that hold SECC modules) */ + SAHPI_ENT_POWER_UNIT, /* Power unit / power domain (typically + used as a pre-defined logical entity + for grouping power supplies)*/ + SAHPI_ENT_POWER_MODULE, /* Power module / DC-to-DC converter. + Use this value for internal + converters. Note: You should use + entity ID (power supply) for the + main power supply even if the main + supply is a DC-to-DC converter */ + SAHPI_ENT_POWER_MGMNT, /* Power management/distribution + board */ + SAHPI_ENT_CHASSIS_BACK_PANEL_BOARD, + SAHPI_ENT_SYSTEM_CHASSIS, + SAHPI_ENT_SUB_CHASSIS, + SAHPI_ENT_OTHER_CHASSIS_BOARD, + SAHPI_ENT_DISK_DRIVE_BAY, + SAHPI_ENT_PERIPHERAL_BAY_2, + SAHPI_ENT_DEVICE_BAY, + SAHPI_ENT_COOLING_DEVICE, /* Fan/cooling device */ + SAHPI_ENT_COOLING_UNIT, /* Can be used as a pre-defined logical + entity for grouping fans or other + cooling devices. */ + SAHPI_ENT_INTERCONNECT, /* Cable / interconnect */ + SAHPI_ENT_MEMORY_DEVICE, /* This Entity ID should be used for + replaceable memory devices, e.g. + DIMM/SIMM. It is recommended that + Entity IDs not be used for + individual non-replaceable memory + devices. Rather, monitoring and + error reporting should be associated + with the FRU [e.g. memory card] + holding the memory. */ + SAHPI_ENT_SYS_MGMNT_SOFTWARE, /* System Management Software */ + SAHPI_ENT_BIOS, + SAHPI_ENT_OPERATING_SYSTEM, + SAHPI_ENT_SYSTEM_BUS, + SAHPI_ENT_GROUP, /* This is a logical entity for use with + Entity Association records. It is + provided to allow a sensor data + record to point to an entity- + association record when there is no + appropriate pre-defined logical + entity for the entity grouping. + This Entity should not be used as a + physical entity. */ + SAHPI_ENT_REMOTE, /* Out of band management communication + device */ + SAHPI_ENT_EXTERNAL_ENVIRONMENT, + SAHPI_ENT_BATTERY, + SAHPI_ENT_CHASSIS_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0x90, + SAHPI_ENT_BOARD_SET_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0xB0, + SAHPI_ENT_OEM_SYSINT_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0xD0, + SAHPI_ENT_ROOT = SAHPI_ENT_ROOT_VALUE, + SAHPI_ENT_RACK = SAHPI_ENT_SAFHPI_GROUP, + SAHPI_ENT_SUBRACK, + SAHPI_ENT_COMPACTPCI_CHASSIS, + SAHPI_ENT_ADVANCEDTCA_CHASSIS, + SAHPI_ENT_SYSTEM_SLOT, + SAHPI_ENT_SBC_BLADE, + SAHPI_ENT_IO_BLADE, + SAHPI_ENT_DISK_BLADE, + SAHPI_ENT_DISK_DRIVE, + SAHPI_ENT_FAN, + SAHPI_ENT_POWER_DISTRIBUTION_UNIT, + SAHPI_ENT_SPEC_PROC_BLADE, /* Special Processing Blade, + including DSP */ + SAHPI_ENT_IO_SUBBOARD, /* I/O Sub-Board, including + PMC I/O board */ + SAHPI_ENT_SBC_SUBBOARD, /* SBC Sub-Board, including PMC + SBC board */ + SAHPI_ENT_ALARM_MANAGER, /* Chassis alarm manager board */ + SAHPI_ENT_ALARM_MANAGER_BLADE, /* Blade-based alarm manager */ + SAHPI_ENT_SUBBOARD_CARRIER_BLADE /* Includes PMC Carrier Blade -- + Use only if "carrier" is only + function of blade. Else use + primary function (SBC_BLADE, + DSP_BLADE, etc.). */ + } SaHpiEntityTypeT; + +typedef SaHpiUint32T SaHpiEntityInstanceT; + +typedef struct { + SaHpiEntityTypeT EntityType; + SaHpiEntityInstanceT EntityInstance; +} SaHpiEntityT; + +#define SAHPI_MAX_ENTITY_PATH 16 + +typedef struct { + SaHpiEntityT Entry[SAHPI_MAX_ENTITY_PATH]; +} SaHpiEntityPathT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Events, part 1 ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** Category +** +** Sensor events contain an event category and event state. Depending on the +** event category, the event states take on different meanings for events +** generated by specific sensors. +** +** The SAHPI_EC_GENERIC category can be used for discrete sensors which have +** state meanings other than those identified with other event categories. +*/ +typedef SaHpiUint8T SaHpiEventCategoryT; + +#define SAHPI_EC_UNSPECIFIED (SaHpiEventCategoryT)0x00 /* Unspecified */ +#define SAHPI_EC_THRESHOLD (SaHpiEventCategoryT)0x01 /* Threshold + events */ +#define SAHPI_EC_USAGE (SaHpiEventCategoryT)0x02 /* Usage state + events */ +#define SAHPI_EC_STATE (SaHpiEventCategoryT)0x03 /* Generic state + events */ +#define SAHPI_EC_PRED_FAIL (SaHpiEventCategoryT)0x04 /* Predictive fail + events */ +#define SAHPI_EC_LIMIT (SaHpiEventCategoryT)0x05 /* Limit events */ +#define SAHPI_EC_PERFORMANCE (SaHpiEventCategoryT)0x06 /* Performance + events */ +#define SAHPI_EC_SEVERITY (SaHpiEventCategoryT)0x07 /* Severity + indicating + events */ +#define SAHPI_EC_PRESENCE (SaHpiEventCategoryT)0x08 /* Device presence + events */ +#define SAHPI_EC_ENABLE (SaHpiEventCategoryT)0x09 /* Device enabled + events */ +#define SAHPI_EC_AVAILABILITY (SaHpiEventCategoryT)0x0A /* Availability + state events */ + +#define SAHPI_EC_REDUNDANCY (SaHpiEventCategoryT)0x0B /* Redundancy + state events */ +#define SAHPI_EC_USER (SaHpiEventCategoryT)0x7E /* User defined + events */ +#define SAHPI_EC_GENERIC (SaHpiEventCategoryT)0x7F /* OEM defined + events */ + +/* +** Event States +** +** The following event states are specified relative to the categories listed +** above. The event types are only valid for their given category. Each set of +** events is labeled as to which category it belongs to. +** Each event will have only one event state associated with it. When retrieving +** the event status or event enabled status a bit mask of all applicable event +** states is used. Similarly, when setting the event enabled status a bit mask +** of all applicable event states is used. +*/ +typedef SaHpiUint16T SaHpiEventStateT; + +/* +** SaHpiEventCategoryT == +*/ +#define SAHPI_ES_UNSPECIFIED (SaHpiEventStateT)0x0000 + +/* +** SaHpiEventCategoryT == SAHPI_EC_THRESHOLD +** When using these event states, the event state should match +** the event severity (for example SAHPI_ES_LOWER_MINOR should have an +** event severity of SAHPI_MINOR). +*/ +#define SAHPI_ES_LOWER_MINOR (SaHpiEventStateT)0x0001 +#define SAHPI_ES_LOWER_MAJOR (SaHpiEventStateT)0x0002 +#define SAHPI_ES_LOWER_CRIT (SaHpiEventStateT)0x0004 +#define SAHPI_ES_UPPER_MINOR (SaHpiEventStateT)0x0008 +#define SAHPI_ES_UPPER_MAJOR (SaHpiEventStateT)0x0010 +#define SAHPI_ES_UPPER_CRIT (SaHpiEventStateT)0x0020 + +/* SaHpiEventCategoryT == SAHPI_EC_USAGE */ +#define SAHPI_ES_IDLE (SaHpiEventStateT)0x0001 +#define SAHPI_ES_ACTIVE (SaHpiEventStateT)0x0002 +#define SAHPI_ES_BUSY (SaHpiEventStateT)0x0004 + +/* SaHpiEventCategoryT == SAHPI_EC_STATE */ +#define SAHPI_ES_STATE_DEASSERTED (SaHpiEventStateT)0x0001 +#define SAHPI_ES_STATE_ASSERTED (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_PRED_FAIL */ +#define SAHPI_ES_PRED_FAILURE_DEASSERT (SaHpiEventStateT)0x0001 +#define SAHPI_ES_PRED_FAILURE_ASSERT (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_LIMIT */ +#define SAHPI_ES_LIMIT_NOT_EXCEEDED (SaHpiEventStateT)0x0001 +#define SAHPI_ES_LIMIT_EXCEEDED (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_PERFORMANCE */ +#define SAHPI_ES_PERFORMANCE_MET (SaHpiEventStateT)0x0001 +#define SAHPI_ES_PERFORMANCE_LAGS (SaHpiEventStateT)0x0002 + +/* +** SaHpiEventCategoryT == SAHPI_EC_SEVERITY +** When using these event states, the event state should match +** the event severity +*/ +#define SAHPI_ES_OK (SaHpiEventStateT)0x0001 +#define SAHPI_ES_MINOR_FROM_OK (SaHpiEventStateT)0x0002 +#define SAHPI_ES_MAJOR_FROM_LESS (SaHpiEventStateT)0x0004 +#define SAHPI_ES_CRITICAL_FROM_LESS (SaHpiEventStateT)0x0008 +#define SAHPI_ES_MINOR_FROM_MORE (SaHpiEventStateT)0x0010 +#define SAHPI_ES_MAJOR_FROM_CRITICAL (SaHpiEventStateT)0x0020 +#define SAHPI_ES_CRITICAL (SaHpiEventStateT)0x0040 +#define SAHPI_ES_MONITOR (SaHpiEventStateT)0x0080 +#define SAHPI_ES_INFORMATIONAL (SaHpiEventStateT)0x0100 + +/* SaHpiEventCategoryT == SAHPI_EC_PRESENCE */ +#define SAHPI_ES_ABSENT (SaHpiEventStateT)0x0001 +#define SAHPI_ES_PRESENT (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_ENABLE */ +#define SAHPI_ES_DISABLED (SaHpiEventStateT)0x0001 +#define SAHPI_ES_ENABLED (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_AVAILABILITY */ +#define SAHPI_ES_RUNNING (SaHpiEventStateT)0x0001 +#define SAHPI_ES_TEST (SaHpiEventStateT)0x0002 +#define SAHPI_ES_POWER_OFF (SaHpiEventStateT)0x0004 +#define SAHPI_ES_ON_LINE (SaHpiEventStateT)0x0008 +#define SAHPI_ES_OFF_LINE (SaHpiEventStateT)0x0010 +#define SAHPI_ES_OFF_DUTY (SaHpiEventStateT)0x0020 +#define SAHPI_ES_DEGRADED (SaHpiEventStateT)0x0040 +#define SAHPI_ES_POWER_SAVE (SaHpiEventStateT)0x0080 +#define SAHPI_ES_INSTALL_ERROR (SaHpiEventStateT)0x0100 + +/* SaHpiEventCategoryT == SAHPI_EC_REDUNDANCY */ +#define SAHPI_ES_FULLY_REDUNDANT (SaHpiEventStateT)0x0001 +#define SAHPI_ES_REDUNDANCY_LOST (SaHpiEventStateT)0x0002 +#define SAHPI_ES_REDUNDANCY_DEGRADED (SaHpiEventStateT)0x0004 +#define SAHPI_ES_REDUNDANCY_LOST_SUFFICIENT_RESOURCES \ + (SaHpiEventStateT)0x0008 +#define SAHPI_ES_NON_REDUNDANT_SUFFICIENT_RESOURCES \ + (SaHpiEventStateT)0x0010 +#define SAHPI_ES_NON_REDUNDANT_INSUFFICIENT_RESOURCES \ + (SaHpiEventStateT)0x0020 +#define SAHPI_ES_REDUNDANCY_DEGRADED_FROM_FULL (SaHpiEventStateT)0x0040 +#define SAHPI_ES_REDUNDANCY_DEGRADED_FROM_NON (SaHpiEventStateT)0x0080 + +/* +** SaHpiEventCategoryT == SAHPI_EC_GENERIC || SAHPI_EC_USER +** These event states are defined by the OEM or the user of the +** implementation. +*/ +#define SAHPI_ES_STATE_00 (SaHpiEventStateT)0x0001 +#define SAHPI_ES_STATE_01 (SaHpiEventStateT)0x0002 +#define SAHPI_ES_STATE_02 (SaHpiEventStateT)0x0004 +#define SAHPI_ES_STATE_03 (SaHpiEventStateT)0x0008 +#define SAHPI_ES_STATE_04 (SaHpiEventStateT)0x0010 +#define SAHPI_ES_STATE_05 (SaHpiEventStateT)0x0020 +#define SAHPI_ES_STATE_06 (SaHpiEventStateT)0x0040 +#define SAHPI_ES_STATE_07 (SaHpiEventStateT)0x0080 +#define SAHPI_ES_STATE_08 (SaHpiEventStateT)0x0100 +#define SAHPI_ES_STATE_09 (SaHpiEventStateT)0x0200 +#define SAHPI_ES_STATE_10 (SaHpiEventStateT)0x0400 +#define SAHPI_ES_STATE_11 (SaHpiEventStateT)0x0800 +#define SAHPI_ES_STATE_12 (SaHpiEventStateT)0x1000 +#define SAHPI_ES_STATE_13 (SaHpiEventStateT)0x2000 +#define SAHPI_ES_STATE_14 (SaHpiEventStateT)0x4000 + + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Sensors ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Sensor Number */ +typedef SaHpiUint8T SaHpiSensorNumT; + +/* Type of Sensor */ +typedef enum { + SAHPI_TEMPERATURE = 0x01, + SAHPI_VOLTAGE, + SAHPI_CURRENT, + SAHPI_FAN, + SAHPI_PHYSICAL_SECURITY, + SAHPI_PLATFORM_VIOLATION, + SAHPI_PROCESSOR, + SAHPI_POWER_SUPPLY, + SAHPI_POWER_UNIT, + SAHPI_COOLING_DEVICE, + SAHPI_OTHER_UNITS_BASED_SENSOR, + SAHPI_MEMORY, + SAHPI_DRIVE_SLOT, + SAHPI_POST_MEMORY_RESIZE, + SAHPI_SYSTEM_FW_PROGRESS, + SAHPI_EVENT_LOGGING_DISABLED, + SAHPI_RESERVED1, + SAHPI_SYSTEM_EVENT, + SAHPI_CRITICAL_INTERRUPT, + SAHPI_BUTTON, + SAHPI_MODULE_BOARD, + SAHPI_MICROCONTROLLER_COPROCESSOR, + SAHPI_ADDIN_CARD, + SAHPI_CHASSIS, + SAHPI_CHIP_SET, + SAHPI_OTHER_FRU, + SAHPI_CABLE_INTERCONNECT, + SAHPI_TERMINATOR, + SAHPI_SYSTEM_BOOT_INITIATED, + SAHPI_BOOT_ERROR, + SAHPI_OS_BOOT, + SAHPI_OS_CRITICAL_STOP, + SAHPI_SLOT_CONNECTOR, + SAHPI_SYSTEM_ACPI_POWER_STATE, + SAHPI_RESERVED2, + SAHPI_PLATFORM_ALERT, + SAHPI_ENTITY_PRESENCE, + SAHPI_MONITOR_ASIC_IC, + SAHPI_LAN, + SAHPI_MANAGEMENT_SUBSYSTEM_HEALTH, + SAHPI_BATTERY, + SAHPI_OPERATIONAL = 0xA0, + SAHPI_OEM_SENSOR=0xC0 +} SaHpiSensorTypeT; + +/* +** Interpreted Sensor Reading Type +** +** These definitions list the available data types that can be +** used for interpreted sensor readings. Interpreted sensor readings are provided +** because typically sensors measure their associated entities in a way that is +** not human readable/understandable. For example a fan sensor may measure the +** number of ticks that it takes a fan blade to move passed a sensor. The human +** readable reading type would be revolutions per minute (RPM). +*/ + +#define SAHPI_SENSOR_BUFFER_LENGTH 32 + +typedef enum { + SAHPI_SENSOR_INTERPRETED_TYPE_UINT8, + SAHPI_SENSOR_INTERPRETED_TYPE_UINT16, + SAHPI_SENSOR_INTERPRETED_TYPE_UINT32, + SAHPI_SENSOR_INTERPRETED_TYPE_INT8, + SAHPI_SENSOR_INTERPRETED_TYPE_INT16, + SAHPI_SENSOR_INTERPRETED_TYPE_INT32, + SAHPI_SENSOR_INTERPRETED_TYPE_FLOAT32, + SAHPI_SENSOR_INTERPRETED_TYPE_BUFFER /* 32 byte array */ +} SaHpiSensorInterpretedTypeT; + +typedef union { + SaHpiUint8T SensorUint8; + SaHpiUint16T SensorUint16; + SaHpiUint32T SensorUint32; + SaHpiInt8T SensorInt8; + SaHpiInt16T SensorInt16; + SaHpiInt32T SensorInt32; + SaHpiFloat32T SensorFloat32; + SaHpiUint8T SensorBuffer[SAHPI_SENSOR_BUFFER_LENGTH]; +} SaHpiSensorInterpretedUnionT; + +typedef struct { + SaHpiSensorInterpretedTypeT Type; + SaHpiSensorInterpretedUnionT Value; +} SaHpiSensorInterpretedT; + +/* +** Sensor Status +** +** The sensor status structure is used to determine if sensor scanning is +** enabled and if events are enabled. If events are enabled, the structure will +** have valid data for the outstanding sensor event states. +*/ +typedef SaHpiUint8T SaHpiSensorStatusT; +#define SAHPI_SENSTAT_EVENTS_ENABLED (SaHpiSensorStatusT)0x80 +#define SAHPI_SENSTAT_SCAN_ENABLED (SaHpiSensorStatusT)0x40 +#define SAHPI_SENSTAT_BUSY (SaHpiSensorStatusT)0x20 + +typedef struct { + SaHpiSensorStatusT SensorStatus; + SaHpiEventStateT EventStatus; +} SaHpiSensorEvtStatusT; + +/* Sensor Event Enables */ +typedef struct { + SaHpiSensorStatusT SensorStatus; + SaHpiEventStateT AssertEvents; + SaHpiEventStateT DeassertEvents; +} SaHpiSensorEvtEnablesT; + +/* +** Sensor Reading +** +** The sensor reading type is the data structure returned from a call to get +** sensor reading. The structure is also used when setting and getting sensor +** threshold values and reporting sensor ranges. +** Each sensor may support one or more of raw, interpreted, or event status +** representations of the sensor data. For analog sensors the raw value is the +** raw value from the sensor (such as ticks per fan blade) and the interpreted +** value is the raw value converted in to a usable format (such as RPM). The +** interpreted value can be calculated by the HPI implementation using the +** sensor factors or by another OEM means. +*/ +typedef SaHpiUint8T SaHpiSensorReadingFormatsT; +#define SAHPI_SRF_RAW (SaHpiSensorReadingFormatsT)0x01 +#define SAHPI_SRF_INTERPRETED (SaHpiSensorReadingFormatsT)0x02 +#define SAHPI_SRF_EVENT_STATE (SaHpiSensorReadingFormatsT)0x04 + +typedef struct { + SaHpiSensorReadingFormatsT ValuesPresent; + SaHpiUint32T Raw; + SaHpiSensorInterpretedT Interpreted; + SaHpiSensorEvtStatusT EventStatus; +} SaHpiSensorReadingT; + +/* +** Threshold Values +** This structure encompasses all of the thresholds that can be set. +*/ +typedef struct { + SaHpiSensorReadingT LowCritical; /* Lower Critical Threshold */ + SaHpiSensorReadingT LowMajor; /* Lower Major Threshold */ + SaHpiSensorReadingT LowMinor; /* Lower Minor Threshold */ + SaHpiSensorReadingT UpCritical; /* Upper critical Threshold */ + SaHpiSensorReadingT UpMajor; /* Upper major Threshold */ + SaHpiSensorReadingT UpMinor; /* Upper minor Threshold */ + SaHpiSensorReadingT PosThdHysteresis; /* Positive Threshold Hysteresis */ + SaHpiSensorReadingT NegThdHysteresis; /* Negative Threshold Hysteresis */ +}SaHpiSensorThresholdsT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Sensor Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** Sensor Factors +** +** The sensor factors structure defines the conversion factors for linear and +** linearized sensors. +** The SaHpiSensorLinearizationT enumeration coupled with the various other +** sensor factors define a formula that can be applied to raw sensor data to +** convert it to appropriate engineering units. If linearization is +** SAHPI_SL_NONLINEAR, SAHPI_SL_UNSPECIFIED, or SAHPI_SL_OEM then there is no +** predefined conversion from raw to interpreted and the sensor factors may or +** may not be meaningful depending on the implementation. +** For other linearization values, raw readings may be converted to interpreted +** values using the formula: +**Interpreted = L [( M*raw + B*10^ExpB )*10^ExpR ] +**where "L[x]" is the indicated linearization function +** (for SAHPI_SL_LINEAR, L[x]=x). +** The Tolerance Factor is given as +/- 1/2 raw counts, so tolerance in +** interpreted values can be calculated as: +** L[ M * ToleranceFactor/2 * 10^ExpR ] +** The Accuracy Factor is given as 1/100 of a percent, scaled up by ExpA. Thus +** the accuracy is: +**( ( AccuracyFactor/100 ) / 10^ExpA )% +*/ +typedef enum { + SAHPI_SL_LINEAR = 0, /* Already linear */ + SAHPI_SL_LN, + SAHPI_SL_LOG10, + SAHPI_SL_LOG2, + SAHPI_SL_E, + SAHPI_SL_EXP10, + SAHPI_SL_EXP2, + SAHPI_SL_1OVERX, + SAHPI_SL_SQRX, + SAHPI_SL_CUBEX, + SAHPI_SL_SQRTX, + SAHPI_SL_CUBERTX, + SAHPI_SL_NONLINEAR = 0x70, /* Cannot be linearized with a predefind formula*/ + SAHPI_SL_OEM, + SAHPI_SL_UNSPECIFIED = 0xFF +} SaHpiSensorLinearizationT; + +typedef struct { + SaHpiInt16T M_Factor; /* M Factor */ + SaHpiInt16T B_Factor; /* B Factor */ + SaHpiUint16T AccuracyFactor; /* Accuracy */ + SaHpiUint8T ToleranceFactor; /* Tolerance */ + SaHpiUint8T ExpA; /* Accuracy Exp */ + SaHpiInt8T ExpR; /* Result Exp */ + SaHpiInt8T ExpB; /* B Exp */ + SaHpiSensorLinearizationT Linearization; +} SaHpiSensorFactorsT; + +/* +** Sensor Range +** Sensor range values can include minimum, maximum, normal minimum, normal +** maximum, and nominal values. +*/ +typedef SaHpiUint8T SaHpiSensorRangeFlagsT; +#define SAHPI_SRF_MIN (SaHpiSensorRangeFlagsT)0x10 +#define SAHPI_SRF_MAX (SaHpiSensorRangeFlagsT)0x08 +#define SAHPI_SRF_NORMAL_MIN (SaHpiSensorRangeFlagsT)0x04 +#define SAHPI_SRF_NORMAL_MAX (SaHpiSensorRangeFlagsT)0x02 +#define SAHPI_SRF_NOMINAL (SaHpiSensorRangeFlagsT)0x01 + +typedef struct { + SaHpiSensorRangeFlagsT Flags; + SaHpiSensorReadingT Max; + SaHpiSensorReadingT Min; + SaHpiSensorReadingT Nominal; + SaHpiSensorReadingT NormalMax; + SaHpiSensorReadingT NormalMin; +} SaHpiSensorRangeT; + +/* +** Sensor Units +** This is a list of all the sensor units supported by HPI. +*/ +typedef enum { + SAHPI_SU_UNSPECIFIED = 0, SAHPI_SU_DEGREES_C, SAHPI_SU_DEGREES_F, + SAHPI_SU_DEGREES_K, SAHPI_SU_VOLTS, SAHPI_SU_AMPS, + SAHPI_SU_WATTS, SAHPI_SU_JOULES, SAHPI_SU_COULOMBS, + SAHPI_SU_VA, SAHPI_SU_NITS, SAHPI_SU_LUMEN, + SAHPI_SU_LUX, SAHPI_SU_CANDELA, SAHPI_SU_KPA, + SAHPI_SU_PSI, SAHPI_SU_NEWTON, SAHPI_SU_CFM, + SAHPI_SU_RPM, SAHPI_SU_HZ, SAHPI_SU_MICROSECOND, + SAHPI_SU_MILLISECOND, SAHPI_SU_SECOND, SAHPI_SU_MINUTE, + SAHPI_SU_HOUR, SAHPI_SU_DAY, SAHPI_SU_WEEK, + SAHPI_SU_MIL, SAHPI_SU_INCHES, SAHPI_SU_FEET, + SAHPI_SU_CU_IN, SAHPI_SU_CU_FEET, SAHPI_SU_MM, + SAHPI_SU_CM, SAHPI_SU_M, SAHPI_SU_CU_CM, + SAHPI_SU_CU_M, SAHPI_SU_LITERS, SAHPI_SU_FLUID_OUNCE, + SAHPI_SU_RADIANS, SAHPI_SU_STERADIANS, SAHPI_SU_REVOLUTIONS, + SAHPI_SU_CYCLES, SAHPI_SU_GRAVITIES, SAHPI_SU_OUNCE, + SAHPI_SU_POUND, SAHPI_SU_FT_LB, SAHPI_SU_OZ_IN, + SAHPI_SU_GAUSS, SAHPI_SU_GILBERTS, SAHPI_SU_HENRY, + SAHPI_SU_MILLIHENRY, SAHPI_SU_FARAD, SAHPI_SU_MICROFARAD, + SAHPI_SU_OHMS, SAHPI_SU_SIEMENS, SAHPI_SU_MOLE, + SAHPI_SU_BECQUEREL, SAHPI_SU_PPM, SAHPI_SU_RESERVED, + SAHPI_SU_DECIBELS, SAHPI_SU_DBA, SAHPI_SU_DBC, + SAHPI_SU_GRAY, SAHPI_SU_SIEVERT, SAHPI_SU_COLOR_TEMP_DEG_K, + SAHPI_SU_BIT, SAHPI_SU_KILOBIT, SAHPI_SU_MEGABIT, + SAHPI_SU_GIGABIT, SAHPI_SU_BYTE, SAHPI_SU_KILOBYTE, + SAHPI_SU_MEGABYTE, SAHPI_SU_GIGABYTE, SAHPI_SU_WORD, + SAHPI_SU_DWORD, SAHPI_SU_QWORD, SAHPI_SU_LINE, + SAHPI_SU_HIT, SAHPI_SU_MISS, SAHPI_SU_RETRY, + SAHPI_SU_RESET, SAHPI_SU_OVERRUN, SAHPI_SU_UNDERRUN, + SAHPI_SU_COLLISION, SAHPI_SU_PACKETS, SAHPI_SU_MESSAGES, + SAHPI_SU_CHARACTERS, SAHPI_SU_ERRORS, SAHPI_SU_CORRECTABLE_ERRORS, + SAHPI_SU_UNCORRECTABLE_ERRORS +} SaHpiSensorUnitsT; + +/* +** Modifier Unit Use +** This type defines how the modifier unit is used. For example: base unit == +** meter, modifier unit == seconds, and modifier unit use == +** SAHPI_SMUU_BASIC_OVER_MODIFIER. The resulting unit would be meters per second. +*/ +typedef enum { + SAHPI_SMUU_NONE = 0, + SAHPI_SMUU_BASIC_OVER_MODIFIER, /* Basic Unit / Modifier Unit */ + SAHPI_SMUU_BASIC_TIMES_MODIFIER /* Basic Unit * Modifier Unit */ +} SaHpiSensorModUnitUseT; + +/* +** Sign Format +** This type defines what the sign format of the sensor's raw value is (1's +** complement, unsigned, etc.). +*/ +typedef enum { + SAHPI_SDF_UNSIGNED = 0, + SAHPI_SDF_1S_COMPLEMENT, + SAHPI_SDF_2S_COMPLEMENT +} SaHpiSensorSignFormatT; + +/* +** Data Format +** This structure encapsulates all of the various types that make up the +** definition of sensor data. +*/ +typedef struct { + SaHpiSensorReadingFormatsT ReadingFormats; /* Indicates if sensor supports + readings in raw, interpreted, + and/or event status formats */ + SaHpiBoolT IsNumeric; /* If FALSE, rest of this + structure is not + meaningful */ + SaHpiSensorSignFormatT SignFormat; /* Signed format */ + SaHpiSensorUnitsT BaseUnits; /* Base units (meters, etc.) */ + SaHpiSensorUnitsT ModifierUnits; /* Modifier unit (second, etc.) */ + SaHpiSensorModUnitUseT ModifierUse; /* Modifier use(m/sec, etc.) */ + SaHpiBoolT FactorsStatic; /* True if the sensor factors + are static. If false + factors vary over sensor + range, and are not + accessible through HPI */ + SaHpiSensorFactorsT Factors; + SaHpiBoolT Percentage; /* Is value a percentage */ + SaHpiSensorRangeT Range; /* Valid range of sensor */ +} SaHpiSensorDataFormatT; + +/* +** Threshold Support +** +** These types define what threshold values are readable, writable, and fixed. +** It also defines how the threshold values are read and written. +*/ +typedef SaHpiUint8T SaHpiSensorThdMaskT; +#define SAHPI_STM_LOW_MINOR (SaHpiSensorThdMaskT)0x01 +#define SAHPI_STM_LOW_MAJOR (SaHpiSensorThdMaskT)0x02 +#define SAHPI_STM_LOW_CRIT (SaHpiSensorThdMaskT)0x04 +#define SAHPI_STM_UP_MINOR (SaHpiSensorThdMaskT)0x08 +#define SAHPI_STM_UP_MAJOR (SaHpiSensorThdMaskT)0x10 +#define SAHPI_STM_UP_CRIT (SaHpiSensorThdMaskT)0x20 +#define SAHPI_STM_UP_HYSTERESIS (SaHpiSensorThdMaskT)0x40 +#define SAHPI_STM_LOW_HYSTERESIS (SaHpiSensorThdMaskT)0x80 + +typedef SaHpiUint8T SaHpiSensorThdCapT; +#define SAHPI_STC_RAW (SaHpiSensorThdMaskT)0x01 /* read/write as + raw counts */ +#define SAHPI_STC_INTERPRETED (SaHpiSensorThdMaskT)0x02 /* read/write as + interpreted */ + +typedef struct { + SaHpiBoolT IsThreshold; /* True if the sensor + supports thresholds. If false, + rest of structure is not + meaningful. */ + SaHpiSensorThdCapT TholdCapabilities; + SaHpiSensorThdMaskT ReadThold; /* Readable thresholds */ + SaHpiSensorThdMaskT WriteThold; /* Writable thresholds */ + SaHpiSensorThdMaskT FixedThold; /* Fixed thresholds */ +} SaHpiSensorThdDefnT; + +/* +** Event Control +** +** This type defines how sensor event messages can be controlled (can be turned +** off and on for each type of event, etc.). +*/ +typedef enum { + SAHPI_SEC_PER_EVENT = 0, /* Event message control per event */ + SAHPI_SEC_ENTIRE_SENSOR, /* Control for entire sensor only */ + SAHPI_SEC_GLOBAL_DISABLE, /* Global disable of events only */ + SAHPI_SEC_NO_EVENTS /* Events not supported */ +} SaHpiSensorEventCtrlT; + +/* +** Record +** +** This is the sensor resource data record which describes all of the static +** data associated with a sensor. +*/ +typedef struct { + SaHpiSensorNumT Num; /* Sensor Number/Index */ + SaHpiSensorTypeT Type; /* General Sensor Type */ + SaHpiEventCategoryT Category; /* Event category */ + SaHpiSensorEventCtrlT EventCtrl; /* How events can be controlled */ + SaHpiEventStateT Events; /* Bit mask of event states + supported */ + SaHpiBoolT Ignore; /* Ignore sensor (entity not + present, disabled, etc.) */ + SaHpiSensorDataFormatT DataFormat; /* Format of the data */ + SaHpiSensorThdDefnT ThresholdDefn; /* Threshold Definition */ + SaHpiUint32T Oem; /* Reserved for OEM use */ +} SaHpiSensorRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Aggregate Status ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* These are the default sensor numbers for aggregate status. */ +#define SAHPI_DEFAGSENS_OPER (SaHpiSensorNumT)0xFE +#define SAHPI_DEFAGSENS_PWR (SaHpiSensorNumT)0xFD +#define SAHPI_DEFAGSENS_TEMP (SaHpiSensorNumT)0xFC + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Controls ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Control Number */ +typedef SaHpiUint8T SaHpiCtrlNumT; + +/* +** Type of Control +** +** This enumerated type defines the different types of generic controls. +*/ +typedef enum { + SAHPI_CTRL_TYPE_DIGITAL = 0x00, + SAHPI_CTRL_TYPE_DISCRETE, + SAHPI_CTRL_TYPE_ANALOG, + SAHPI_CTRL_TYPE_STREAM, + SAHPI_CTRL_TYPE_TEXT, + SAHPI_CTRL_TYPE_OEM = 0xC0 +} SaHpiCtrlTypeT; + +/* +** Control State Type Definitions +** +** Defines the types of control states. +*/ +typedef enum { + SAHPI_CTRL_STATE_OFF = 0, + SAHPI_CTRL_STATE_ON, + SAHPI_CTRL_STATE_PULSE_OFF, + SAHPI_CTRL_STATE_PULSE_ON, + SAHPI_CTRL_STATE_AUTO = 0xFF +} SaHpiCtrlStateDigitalT; + +typedef SaHpiUint32T SaHpiCtrlStateDiscreteT; + +typedef SaHpiInt32T SaHpiCtrlStateAnalogT; + +#define SAHPI_CTRL_MAX_STREAM_LENGTH 4 +typedef struct { + SaHpiBoolT Repeat; /* Repeat flag */ + SaHpiUint32T StreamLength; /* Length of the data, in bytes, + ** stored in the stream. */ + SaHpiUint8T Stream[SAHPI_CTRL_MAX_STREAM_LENGTH]; +} SaHpiCtrlStateStreamT; + +typedef SaHpiUint8T SaHpiTxtLineNumT; + +/* Reserved number for sending output to all lines */ +#define SAHPI_TLN_ALL_LINES (SaHpiTxtLineNumT)0xFF + +typedef struct { + SaHpiTxtLineNumT Line; /* Operate on line # */ + SaHpiTextBufferT Text; /* Text to display */ +} SaHpiCtrlStateTextT; + +#define SAHPI_CTRL_MAX_OEM_BODY_LENGTH 255 +typedef struct { + SaHpiManufacturerIdT MId; + SaHpiUint8T BodyLength; + SaHpiUint8T Body[SAHPI_CTRL_MAX_OEM_BODY_LENGTH]; /* OEM Specific */ +} SaHpiCtrlStateOemT; + +typedef union { + SaHpiCtrlStateDigitalT Digital; + SaHpiCtrlStateDiscreteT Discrete; + SaHpiCtrlStateAnalogT Analog; + SaHpiCtrlStateStreamT Stream; + SaHpiCtrlStateTextT Text; + SaHpiCtrlStateOemT Oem; +} SaHpiCtrlStateUnionT; + +typedef struct { + SaHpiCtrlTypeT Type; /* Type of control */ + SaHpiCtrlStateUnionT StateUnion; /* Data for control type */ +} SaHpiCtrlStateT; + + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Control Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** Output Type +** +** This enumeration defines the what the control's output will be. +*/ +typedef enum { + SAHPI_CTRL_GENERIC = 0, + SAHPI_CTRL_LED, + SAHPI_CTRL_FAN_SPEED, + SAHPI_CTRL_DRY_CONTACT_CLOSURE, + SAHPI_CTRL_POWER_SUPPLY_INHIBIT, + SAHPI_CTRL_AUDIBLE, + SAHPI_CTRL_FRONT_PANEL_LOCKOUT, + SAHPI_CTRL_POWER_INTERLOCK, + SAHPI_CTRL_POWER_STATE, + SAHPI_CTRL_LCD_DISPLAY, + SAHPI_CTRL_OEM +} SaHpiCtrlOutputTypeT; + +/* +** Specific Record Types +** These types represent the specific types of control resource data records. +*/ +typedef struct { + SaHpiCtrlStateDigitalT Default; +} SaHpiCtrlRecDigitalT; + +typedef struct { + SaHpiCtrlStateDiscreteT Default; +} SaHpiCtrlRecDiscreteT; + +typedef struct { + SaHpiCtrlStateAnalogT Min; /* Minimum Value */ + SaHpiCtrlStateAnalogT Max; /* Maximum Value */ + SaHpiCtrlStateAnalogT Default; +} SaHpiCtrlRecAnalogT; + +typedef struct { + SaHpiCtrlStateStreamT Default; +} SaHpiCtrlRecStreamT; + +typedef struct { + SaHpiUint8T MaxChars; /* Maximum chars per line */ + SaHpiUint8T MaxLines; /* Maximum # of lines */ + SaHpiLanguageT Language; /* Language Code */ + SaHpiTextTypeT DataType; /* Permitted Data */ + SaHpiCtrlStateTextT Default; +} SaHpiCtrlRecTextT; + +#define SAHPI_CTRL_OEM_CONFIG_LENGTH 10 +typedef struct { + SaHpiManufacturerIdT MId; + SaHpiUint8T ConfigData[SAHPI_CTRL_OEM_CONFIG_LENGTH]; + SaHpiCtrlStateOemT Default; +} SaHpiCtrlRecOemT; + +typedef union { + SaHpiCtrlRecDigitalT Digital; + SaHpiCtrlRecDiscreteT Discrete; + SaHpiCtrlRecAnalogT Analog; + SaHpiCtrlRecStreamT Stream; + SaHpiCtrlRecTextT Text; + SaHpiCtrlRecOemT Oem; +} SaHpiCtrlRecUnionT; + +/* +** Record Definition +** Definition of the control resource data record. +*/ +typedef struct { + SaHpiCtrlNumT Num; /* Control Number/Index */ + SaHpiBoolT Ignore; /* Ignore control (entity + not present, disabled, etc.) */ + SaHpiCtrlOutputTypeT OutputType; + SaHpiCtrlTypeT Type; /* Type of control */ + SaHpiCtrlRecUnionT TypeUnion; /* Specific control record */ + SaHpiUint32T Oem; /* Reserved for OEM use */ +} SaHpiCtrlRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Entity Inventory Data ********** +********** ********** +******************************************************************************** +*******************************************************************************/ +/* +** These structures are used to read and write inventory data to entity inventory +** repositories within a resource. +*/ +/* +** Entity Inventory Repository ID +** Identifier for an entity inventory repository. +*/ +typedef SaHpiUint8T SaHpiEirIdT; +#define SAHPI_DEFAULT_INVENTORY_ID (SaHpiEirIdT)0x00 + +/* Data Validity */ +typedef enum { + SAHPI_INVENT_DATA_VALID, + SAHPI_INVENT_DATA_INVALID, + SAHPI_INVENT_DATA_OVERFLOW +} SaHpiInventDataValidityT; + +/* Inventory Record definitions */ +typedef enum { + SAHPI_INVENT_RECTYPE_INTERNAL_USE = 0xB0, + SAHPI_INVENT_RECTYPE_CHASSIS_INFO, + SAHPI_INVENT_RECTYPE_BOARD_INFO, + SAHPI_INVENT_RECTYPE_PRODUCT_INFO, + SAHPI_INVENT_RECTYPE_OEM = 0xC0 +} SaHpiInventDataRecordTypeT; + +typedef enum { + SAHPI_INVENT_CTYP_OTHER = 1, + SAHPI_INVENT_CTYP_UNKNOWN, + SAHPI_INVENT_CTYP_DESKTOP, + SAHPI_INVENT_CTYP_LOW_PROFILE_DESKTOP, + SAHPI_INVENT_CTYP_PIZZA_BOX, + SAHPI_INVENT_CTYP_MINI_TOWER, + SAHPI_INVENT_CTYP_TOWER, + SAHPI_INVENT_CTYP_PORTABLE, + SAHPI_INVENT_CTYP_LAPTOP, + SAHPI_INVENT_CTYP_NOTEBOOK, + SAHPI_INVENT_CTYP_HANDHELD, + SAHPI_INVENT_CTYP_DOCKING_STATION, + SAHPI_INVENT_CTYP_ALLINONE, + SAHPI_INVENT_CTYP_SUBNOTEBOOK, + SAHPI_INVENT_CTYP_SPACE_SAVING, + SAHPI_INVENT_CTYP_LUNCH_BOX, + SAHPI_INVENT_CTYP_MAIN_SERVER, + SAHPI_INVENT_CTYP_EXPANSION, + SAHPI_INVENT_CTYP_SUBCHASSIS, + SAHPI_INVENT_CTYP_BUS_EXPANSION_CHASSIS, + SAHPI_INVENT_CTYP_PERIPHERAL_CHASSIS, + SAHPI_INVENT_CTYP_RAID_CHASSIS, + SAHPI_INVENT_CTYP_RACKMOUNT +} SaHpiInventChassisTypeT; + +typedef struct { + SaHpiUint8T Data[1]; /* Variable length opaque data */ +} SaHpiInventInternalUseDataT; + +typedef struct { + SaHpiTimeT MfgDateTime; /* May be set to + SAHPI_TIME_UNSPECIFIED + if manufacturing + date/time not available */ + SaHpiTextBufferT *Manufacturer; + SaHpiTextBufferT *ProductName; + SaHpiTextBufferT *ProductVersion; + SaHpiTextBufferT *ModelNumber; + SaHpiTextBufferT *SerialNumber; + SaHpiTextBufferT *PartNumber; + SaHpiTextBufferT *FileId; + SaHpiTextBufferT *AssetTag; + SaHpiTextBufferT *CustomField[1]; /* Variable number of fields, + last is NULL */ +} SaHpiInventGeneralDataT; + +typedef struct { + SaHpiInventChassisTypeT Type; /* Type of chassis */ + SaHpiInventGeneralDataT GeneralData; +} SaHpiInventChassisDataT; + +typedef struct { + SaHpiManufacturerIdT MId;/* OEM Manuf. ID */ + SaHpiUint8T Data[1]; /* Variable length data, defined by OEM, + Length derived from DataLength in + SaHpiInventDataRecordT structure: + DataLength - 4(because DataLength + includes the MId) */ +} SaHpiInventOemDataT; + +typedef union { + SaHpiInventInternalUseDataT InternalUse; + SaHpiInventChassisDataT ChassisInfo; + SaHpiInventGeneralDataT BoardInfo; + SaHpiInventGeneralDataT ProductInfo; + SaHpiInventOemDataT OemData; +} SaHpiInventDataUnionT; + +typedef struct { + SaHpiInventDataRecordTypeT RecordType; + SaHpiUint32T DataLength; /* Length of Data field for + this record */ + SaHpiInventDataUnionT RecordData; /* Variable length data */ +} SaHpiInventDataRecordT; + +typedef struct { + SaHpiInventDataValidityT Validity; /* Indication as to whether data + Returned by + saHpiEntityInventoryDataRead() is + complete and valid. Unless this + flag indicates valid data, + saHpiEntityInventoryDataWrite() will + not take any actions except to + return an error.*/ + SaHpiInventDataRecordT *DataRecords[1]; /* Array of pointers to inventory + Data Records. Variable + number of entries. Last + entry is NULL. */ +} SaHpiInventoryDataT; + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Inventory Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** All inventory data contained in an entity inventory repository +** must be represented in the RDR repository +** with an SaHpiInventoryRecT. +*/ +typedef struct { + SaHpiEirIdT EirId; + SaHpiUint32T Oem; +} SaHpiInventoryRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Watchdogs ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** This section defines all of the data types associated with watchdog timers. +*/ + +/* Watchdog Number - Identifier for a watchdog timer. */ +typedef SaHpiUint8T SaHpiWatchdogNumT; +#define SAHPI_DEFAULT_WATCHDOG_NUM (SaHpiWatchdogNumT)0x00 + +/* +** Watchdog Timer Action +** +** These enumerations represent the possible actions to be taken upon watchdog +** timer timeout and the events that are generated for watchdog actions. +*/ +typedef enum { + SAHPI_WA_NO_ACTION = 0, + SAHPI_WA_RESET, + SAHPI_WA_POWER_DOWN, + SAHPI_WA_POWER_CYCLE +} SaHpiWatchdogActionT; + +typedef enum { + SAHPI_WAE_NO_ACTION = 0, + SAHPI_WAE_RESET, + SAHPI_WAE_POWER_DOWN, + SAHPI_WAE_POWER_CYCLE, + SAHPI_WAE_TIMER_INT=0x08 /* Used if Timer Preinterrupt only */ +} SaHpiWatchdogActionEventT; + +/* +** Watchdog Pre-timer Interrupt +** +** These enumerations represent the possible types of interrupts that may be +** triggered by a watchdog pre-timer event. The actual meaning of these +** operations may differ depending on the hardware architecture. +*/ +typedef enum { + SAHPI_WPI_NONE = 0, + SAHPI_WPI_SMI, + SAHPI_WPI_NMI, + SAHPI_WPI_MESSAGE_INTERRUPT, + SAHPI_WPI_OEM = 0x0F +} SaHpiWatchdogPretimerInterruptT; + +/* +** Watchdog Timer Use +** +** These enumerations represent the possible watchdog users that may have caused +** the watchdog to expire. For instance, if watchdog is being used during power +** on self test (POST), and it expires, the SAHPI_WTU_BIOS_POST expiration type +** will be set. Most specific uses for Watchdog timer by users of HPI should +** indicate SAHPI_WTU_SMS_OS if the use is to provide an OS-healthy heartbeat, +** or SAHPI_WTU_OEM if it is used for some other purpose. +*/ +typedef enum { + SAHPI_WTU_NONE = 0, + SAHPI_WTU_BIOS_FRB2, + SAHPI_WTU_BIOS_POST, + SAHPI_WTU_OS_LOAD, + SAHPI_WTU_SMS_OS, /* System Management System providing + heartbeat for OS */ + SAHPI_WTU_OEM, + SAHPI_WTU_UNSPECIFIED = 0x0F +} SaHpiWatchdogTimerUseT; + +/* +** Timer Use Expiration Flags +** These values are used for the Watchdog Timer Use Expiration flags in the +** SaHpiWatchdogT structure. +*/ +typedef SaHpiUint8T SaHpiWatchdogExpFlagsT; +#define SAHPI_WATCHDOG_EXP_BIOS_FRB2 (SaHpiWatchdogExpFlagsT)0x02 +#define SAHPI_WATCHDOG_EXP_BIOS_POST (SaHpiWatchdogExpFlagsT)0x04 +#define SAHPI_WATCHDOG_EXP_OS_LOAD (SaHpiWatchdogExpFlagsT)0x08 +#define SAHPI_WATCHDOG_EXP_SMS_OS (SaHpiWatchdogExpFlagsT)0x10 +#define SAHPI_WATCHDOG_EXP_OEM (SaHpiWatchdogExpFlagsT)0x20 + +/* +** Watchdog Structure +** +** This structure is used by the saHpiWatchdogTimerGet() and +** saHpiWatchdogTimerSet() functions. The use of the structure varies slightly by +** each function. +** +** For saHpiWatchdogTimerGet() : +** +** Log - indicates whether or not the Watchdog is configured to +** issue an event when it next times out. TRUE=event will +** be issued on timeout. +** Running - indicates whether or not the Watchdog is currently +** running or stopped. TRUE=Watchdog is running. +** TimerUse - indicates the current use of the timer; one of five +** preset uses which was included on the last +** saHpiWatchdogTimerSet() function call, or through some +** other implementation-dependent means to start the +** Watchdog timer. +** TimerAction - indicates what action will be taken when the Watchdog +** times out. +** PretimerInterrupt - indicates which action will be taken +** "PreTimeoutInterval" seconds prior to Watchdog timer +** expiration. +** PreTimeoutInterval - indicates how many milliseconds prior to timer time +** out the PretimerInterrupt action will be taken. If +** "PreTimeoutInterval" = 0, the PretimerInterrupt action +** will occur concurrently with "TimerAction." HPI +** implementations may not be able to support millisecond +** resolution and may have a maximum value restriction. +** These restrictions should be documented by the +** provider of the HPI interface. +** TimerUseExpFlags - set of five bit flags which indicate that a Watchdog +** timer timeout has occurred while the corresponding +** TimerUse value was set. Once set, these flags stay +** set until specifically cleared with a +** saHpiWatchdogTimerSet() call, or by some other +** implementation-dependent means. +** InitialCount - The time, in milliseconds, before the timer will time +** out after a saHpiWatchdogTimerReset() function call is +** made, or some other implementation-dependent strobe is +** sent to the Watchdog. HPI implementations may not be +** able to support millisecond resolution and may have a +** maximum value restriction. These restrictions should +** be documented by the provider of the HPI interface. +** PresentCount - The remaining time in milliseconds before the timer +** will time out unless a saHpiWatchdogTimerReset() +** function call is made, or some other implementation- +** dependent strobe is sent to the Watchdog. +** HPI implementations may not be able to support +** millisecond resolution on watchdog timers, but will +** return the number of clock ticks remaining times the +** number of milliseconds between each tick. +** +** For saHpiWatchdogTimerSet(): +** +** Log - indicates whether or not the Watchdog should issue +** an event when it next times out. TRUE=event will be +** issued on timeout. +** Running - indicates whether or not the Watchdog should be +** stopped before updating. +** TRUE = Watchdog is not stopped. If it is already +** stopped, it will remain stopped, but if it is +** running, it will continue to run, with the +** countdown timer reset to the new InitialCount. +** Note that there is a race condition possible +** with this setting, so it should be used with +** care. +** FALSE = Watchdog is stopped. After +** saHpiWatchdogTimerSet() is called, a subsequent +** call to saHpiWatchdogTimerReset() is required to +** start the timer. +** TimerUse - indicates the current use of the timer. Will control +** which TimerUseExpFlag is set if the timer expires. +** TimerAction - indicates what action will be taken when the Watchdog +** times out. +** PretimerInterrupt - indicates which action will be taken +** "PreTimeoutInterval" seconds prior to Watchdog timer +** expiration. +** PreTimeoutInterval - indicates how many milliseconds prior to timer time +** out the PretimerInterrupt action will be taken. If +** "PreTimeoutInterval" = 0, the PretimerInterrupt action +** will occur concurrently with "TimerAction." HPI +** implementations may not be able to support millisecond +** resolution and may have a maximum value restriction. +** These restrictions should be documented by the +** provider of the HPI interface. +** TimerUseExpFlags - Set of five bit flags corresponding to the five +** TimerUse values. For each bit set, the corresponding +** Timer Use Expiration Flag will be CLEARED. Generally, +** a program should only clear the Timer Use Expiration +** Flag corresponding to its own TimerUse, so that other +** software, which may have used the timer for another +** purpose in the past can still read its TimerUseExpFlag +** to determine whether or not the timer expired during +** that use. +** InitialCount - The time, in milliseconds, before the timer will time +** out after a saHpiWatchdogTimerReset() function call is +** made, or some other implementation-dependent strobe is +** sent to the Watchdog. HPI implementations may not be +** able to support millisecond resolution and may have a +** maximum value restriction. These restrictions should +** be documented by the provider of the HPI interface. +** PresentCount - Not used on saHpiWatchdogTimerSet() function. Ignored. +** +*/ + +typedef struct { + SaHpiBoolT Log; + SaHpiBoolT Running; + SaHpiWatchdogTimerUseT TimerUse; + SaHpiWatchdogActionT TimerAction; + SaHpiWatchdogPretimerInterruptT PretimerInterrupt; + SaHpiUint32T PreTimeoutInterval; + SaHpiWatchdogExpFlagsT TimerUseExpFlags; + SaHpiUint32T InitialCount; + SaHpiUint32T PresentCount; +} SaHpiWatchdogT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Watchdog Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** When the "Watchdog" capability is set in a resource, a watchdog with an +** identifier of SAHPI_DEFAULT_WATCHDOG_NUM is required. All watchdogs must be +** represented in the RDR repository with an SaHpiWatchdogRecT, including the +** watchdog with an identifier of SAHPI_DEFAULT_WATCHDOG_NUM. +*/ +typedef struct { + SaHpiWatchdogNumT WatchdogNum; + SaHpiUint32T Oem; +} SaHpiWatchdogRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Resource Data Record ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** The following describes the different types of records that exist within a +** RDR repository and the RDR super-structure to all of the specific RDR types +** (sensor, inventory data, watchdog, etc.). +*/ +typedef enum { + SAHPI_NO_RECORD, + SAHPI_CTRL_RDR, + SAHPI_SENSOR_RDR, + SAHPI_INVENTORY_RDR, + SAHPI_WATCHDOG_RDR +} SaHpiRdrTypeT; + +typedef union { + SaHpiCtrlRecT CtrlRec; + SaHpiSensorRecT SensorRec; + SaHpiInventoryRecT InventoryRec; + SaHpiWatchdogRecT WatchdogRec; +} SaHpiRdrTypeUnionT; + +typedef struct { + SaHpiEntryIdT RecordId; + SaHpiRdrTypeT RdrType; + SaHpiEntityPathT Entity; /* Entity to which this RDR relates. */ + SaHpiRdrTypeUnionT RdrTypeUnion; + SaHpiTextBufferT IdString; +} SaHpiRdrT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Hot Swap ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Power State */ +typedef enum { + SAHPI_HS_POWER_OFF = 0, + SAHPI_HS_POWER_ON, + SAHPI_HS_POWER_CYCLE +} SaHpiHsPowerStateT; + +/* Hot Swap Indicator State */ +typedef enum { + SAHPI_HS_INDICATOR_OFF = 0, + SAHPI_HS_INDICATOR_ON +} SaHpiHsIndicatorStateT; + +/* Hot Swap Action */ +typedef enum { + SAHPI_HS_ACTION_INSERTION = 0, + SAHPI_HS_ACTION_EXTRACTION +} SaHpiHsActionT; + +/* Hot Swap State */ +typedef enum { + SAHPI_HS_STATE_INACTIVE = 0, + SAHPI_HS_STATE_INSERTION_PENDING, + SAHPI_HS_STATE_ACTIVE_HEALTHY, + SAHPI_HS_STATE_ACTIVE_UNHEALTHY, + SAHPI_HS_STATE_EXTRACTION_PENDING, + SAHPI_HS_STATE_NOT_PRESENT +} SaHpiHsStateT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Events, Part 2 ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Event Data Structures */ + +/* +** Sensor Optional Data +** +** Sensor events may contain optional data items passed and stored with the +** event. If these optional data items are present, they will be included with +** the event data returned in response to a saHpiEventGet() or +** saHpiEventLogEntryGet() function call. Also, the optional data items may be +** included with the event data passed to the saHpiEventLogEntryAdd() function. +** +** Specific implementations of HPI may have restrictions on how much data may +** be passed to saHpiEventLogEntryAdd(). These restrictions should be documented +** by the provider of the HPI interface. +*/ +typedef enum { + SAHPI_CRITICAL = 0, + SAHPI_MAJOR, + SAHPI_MINOR, + SAHPI_INFORMATIONAL, + SAHPI_OK, + SAHPI_DEBUG = 0xF0 +} SaHpiSeverityT; + +typedef SaHpiUint8T SaHpiSensorOptionalDataT; + +#define SAHPI_SOD_TRIGGER_READING (SaHpiSensorOptionalDataT)0x01 +#define SAHPI_SOD_TRIGGER_THRESHOLD (SaHpiSensorOptionalDataT)0x02 +#define SAHPI_SOD_OEM (SaHpiSensorOptionalDataT)0x04 +#define SAHPI_SOD_PREVIOUS_STATE (SaHpiSensorOptionalDataT)0x08 +#define SAHPI_SOD_SENSOR_SPECIFIC (SaHpiSensorOptionalDataT)0x10 + +typedef struct { + SaHpiSensorNumT SensorNum; + SaHpiSensorTypeT SensorType; + SaHpiEventCategoryT EventCategory; + SaHpiBoolT Assertion; /* TRUE = Event State asserted + FALSE = deasserted */ + SaHpiEventStateT EventState; /* State being asserted + deasserted */ + SaHpiSensorOptionalDataT OptionalDataPresent; + SaHpiSensorReadingT TriggerReading; /* Reading that triggered + the event */ + SaHpiSensorReadingT TriggerThreshold; + SaHpiEventStateT PreviousState; + SaHpiUint32T Oem; + SaHpiUint32T SensorSpecific; +} SaHpiSensorEventT; + +typedef struct { + SaHpiHsStateT HotSwapState; + SaHpiHsStateT PreviousHotSwapState; +} SaHpiHotSwapEventT; + +typedef struct { + SaHpiWatchdogNumT WatchdogNum; + SaHpiWatchdogActionEventT WatchdogAction; + SaHpiWatchdogPretimerInterruptT WatchdogPreTimerAction; + SaHpiWatchdogTimerUseT WatchdogUse; +} SaHpiWatchdogEventT; + +#define SAHPI_OEM_EVENT_DATA_SIZE 32 +typedef struct { + SaHpiManufacturerIdT MId; + SaHpiUint8T OemEventData[SAHPI_OEM_EVENT_DATA_SIZE]; +} SaHpiOemEventT; + +/* +** User events may be used for storing custom events created by the application / middleware; +** eg. when injecting events into the event log using saHpiEventLogEntryAdd(). +*/ +#define SAHPI_USER_EVENT_DATA_SIZE 32 +typedef struct { + SaHpiUint8T UserEventData[SAHPI_USER_EVENT_DATA_SIZE]; +} SaHpiUserEventT; + +typedef enum { + SAHPI_ET_SENSOR, + SAHPI_ET_HOTSWAP, + SAHPI_ET_WATCHDOG, + SAHPI_ET_OEM, + SAHPI_ET_USER +} SaHpiEventTypeT; + +typedef union { + SaHpiSensorEventT SensorEvent; + SaHpiHotSwapEventT HotSwapEvent; + SaHpiWatchdogEventT WatchdogEvent; + SaHpiOemEventT OemEvent; + SaHpiUserEventT UserEvent; +} SaHpiEventUnionT; + +typedef struct { + SaHpiResourceIdT Source; + SaHpiEventTypeT EventType; + SaHpiTimeT Timestamp; + SaHpiSeverityT Severity; + SaHpiEventUnionT EventDataUnion; +} SaHpiEventT; + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Parameter Control ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +typedef enum { + SAHPI_DEFAULT_PARM = 0, + SAHPI_SAVE_PARM, + SAHPI_RESTORE_PARM +} SaHpiParmActionT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Reset ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +typedef enum { + SAHPI_COLD_RESET = 0, + SAHPI_WARM_RESET, + SAHPI_RESET_ASSERT, + SAHPI_RESET_DEASSERT +} SaHpiResetActionT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Resource Presence Table ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* This section defines the types associated with the RPT. */ + +typedef struct { + SaHpiUint32T UpdateCount; /* This count is incremented any time the table + is changed. It rolls over to zero when the + maximum value is reached */ + SaHpiTimeT UpdateTimestamp; /* This time is set any time the table is + changed. If the implementation cannot + supply an absolute timestamp, then it may + supply a timestamp relative to some system- + defined epoch, such as system boot. The + value SAHPI_TIME_UNSPECIFIED indicates that + the time of the update cannot be determined. + Otherwise, If the value is less than or + equal to SAHPI_TIME_MAX_RELATIVE, then it + is relative; if it is greater than + SAHPI_TIME_MAX_RELATIVE, then it is absolute. */ +} SaHpiRptInfoT; + +/* +** Resource Info Type Definitions +** +** +** SaHpiResourceInfoT contains static configuration data concerning the +** management controller associated with the resource, or the resource itself. +** Note this information is used to describe the resource; that is, the piece of +** infrastructure which manages an entity (or multiple entities) - NOT the entities +** for which the resource provides management. The purpose of the +** SaHpiResourceInfoT structure is to provide information that the HPI user may +** need in order to interact correctly with the resource (e.g., recognize a +** specific management controller which may have defined OEM fields in sensors, +** OEM controls, etc.). +** +** All of the fields in the following structure may or may not be used by a +** given resource. +*/ +typedef struct { + SaHpiUint8T ResourceRev; + SaHpiUint8T SpecificVer; + SaHpiUint8T DeviceSupport; + SaHpiManufacturerIdT ManufacturerId; + SaHpiUint16T ProductId; + SaHpiUint8T FirmwareMajorRev; + SaHpiUint8T FirmwareMinorRev; + SaHpiUint8T AuxFirmwareRev; +} SaHpiResourceInfoT; + +/* +** Resource Capabilities +** +** This definition defines the capabilities of a given resource. One resource +** may support any number of capabilities using the bit mask. Every resource +** must set at least one of these capabilities; ie. zero is not a valid value +** for a resource's capabilities. +** +** SAHPI_CAPABILITY_DOMAIN +** SAHPI_CAPABILITY_RESOURCE +** SAHPI_CAPABILITY_EVT_DEASSERTS +** Indicates that all sensors on the resource have the property that their +** Assertion and Deassertion event enable flags are the same. That is, +** for all event states whose assertion triggers an event, it is +** guaranteed that the deassertion of that event will also +** trigger an event. Thus, the user may track the state of sensors on the +** resource by monitoring events rather than polling for state changes. +** SAHPI_CAPABILITY_AGGREGATE_STATUS +** SAHPI_CAPABILITY_CONFIGURATION +** SAHPI_CAPABILITY_MANAGED_HOTSWAP +** Indicates that the resource supports managed hotswap. Since hotswap only +** makes sense for field-replaceable units, the SAHPI_CAPABILITY_FRU +** capability bit must also be set for this resource. +** SAHPI_CAPABILITY_WATCHDOG +** SAHPI_CAPABILITY_CONTROL +** SAHPI_CAPABILITY_FRU +** Indicates that the resource is a field-replaceable unit; i.e., it is +** capable of being removed and replaced in a live system. This does not +** necessarily imply that the resource supports managed hotswap. +** SAHPI_CAPABILITY_INVENTORY_DATA +** SAHPI_CAPABILITY_SEL +** SAHPI_CAPABILITY_RDR +** Indicates that a resource data record (RDR) repository is supplied +** by the resource. Since the existence of an RDR is mandatory, this +** capability must be asserted. +** SAHPI_CAPABILITY_SENSOR +*/ + +typedef SaHpiUint32T SaHpiCapabilitiesT; +#define SAHPI_CAPABILITY_DOMAIN (SaHpiCapabilitiesT)0x80000000 +#define SAHPI_CAPABILITY_RESOURCE (SaHpiCapabilitiesT)0X40000000 +#define SAHPI_CAPABILITY_EVT_DEASSERTS (SaHpiCapabilitiesT)0x00008000 +#define SAHPI_CAPABILITY_AGGREGATE_STATUS (SaHpiCapabilitiesT)0x00002000 +#define SAHPI_CAPABILITY_CONFIGURATION (SaHpiCapabilitiesT)0x00001000 +#define SAHPI_CAPABILITY_MANAGED_HOTSWAP (SaHpiCapabilitiesT)0x00000800 +#define SAHPI_CAPABILITY_WATCHDOG (SaHpiCapabilitiesT)0x00000400 +#define SAHPI_CAPABILITY_CONTROL (SaHpiCapabilitiesT)0x00000200 +#define SAHPI_CAPABILITY_FRU (SaHpiCapabilitiesT)0x00000100 +#define SAHPI_CAPABILITY_INVENTORY_DATA (SaHpiCapabilitiesT)0x00000008 +#define SAHPI_CAPABILITY_SEL (SaHpiCapabilitiesT)0x00000004 +#define SAHPI_CAPABILITY_RDR (SaHpiCapabilitiesT)0x00000002 +#define SAHPI_CAPABILITY_SENSOR (SaHpiCapabilitiesT)0x00000001 + +/* +** RPT Entry +** +** This structure is used to store the RPT entry information. +** +** The ResourceCapabilities field definies the capabilities of the resource. +** This field must be non-zero for all valid resources. +** +** The ResourceTag field is an informational value that supplies the caller with naming +** information for the resource. This should be set to the "user-visible" name for a +** resource, which can be used to identify the resource in messages to a human operator. +** For example, it could be set to match a physical printed label attached to the primary +** entity which the resource manages. See section 5.2.6, saHpiResourceTagSet(), on page 33. +*/ +typedef struct { + SaHpiEntryIdT EntryId; + SaHpiResourceIdT ResourceId; + SaHpiResourceInfoT ResourceInfo; + SaHpiEntityPathT ResourceEntity; /* If resource manages a FRU, entity path of the FRU */ + /* If resource manages a single entity, entity path of + that entity. */ + /* If resource manages multiple entities, the + entity path of the "primary" entity managed by the + resource */ + /* Must be set to the same value in every domain which + contains this resource */ + SaHpiCapabilitiesT ResourceCapabilities; /* Must be non-0. */ + SaHpiSeverityT ResourceSeverity; /* Indicates the criticality that + should be raised when the resource + is not responding */ + SaHpiDomainIdT DomainId; /* The Domain ID is used when the resource + is also a domain. */ + SaHpiTextBufferT ResourceTag; +} SaHpiRptEntryT; + + + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** System Event Log ********** +********** ********** +******************************************************************************** +*******************************************************************************/ +/* This section defines the types associated with the SEL. */ +/* +** Event Log Information +** +** The Entries entry denotes the number of active entries contained in the log. +** The Size entry denotes the total number of entries the log is able to hold. +** The UpdateTimestamp entry denotes the timestamp of the last addition, +** deletion or log clear operation. +** The CurrentTime entry denotes the log's idea of the current time; i.e the +** timestamp that would be placed on an entry if it was added now. +** The Enabled entry indicates whether the log is enabled. If the event log +** is "disabled" no events generated within the HPI implementation will be +** added to the event log. Events may still be added to the event log with +** the saHpiEventLogEntryAdd() function. When the event log is "enabled" +** events may be automatically added to the event log as they are generated +** in a resource or a domain, however, it is implementation-specific which +** events are automatically added to any event log. +** The OverflowFlag entry indicates the log has overflowed. Events have been +** dropped or overwritten due to a table overflow. +** The OverflowAction entry indicates the behavior of the SEL when an overflow +** occurs. +** The DeleteEntrySupported indicates whether the delete command is supported for +** event log entries. Note that clearing an entire log is valid even if this +** flag is not set. +*/ +typedef enum { + SAHPI_SEL_OVERFLOW_DROP, /* New entries are dropped when log is full*/ + SAHPI_SEL_OVERFLOW_WRAP, /* Log wraps when log is full */ + SAHPI_SEL_OVERFLOW_WRITELAST /* Last entry overwritten when log is full */ +} SaHpiSelOverflowActionT; + +typedef struct { + SaHpiUint32T Entries; + SaHpiUint32T Size; + SaHpiTimeT UpdateTimestamp; + SaHpiTimeT CurrentTime; + SaHpiBoolT Enabled; + SaHpiBoolT OverflowFlag; + SaHpiSelOverflowActionT OverflowAction; + SaHpiBoolT DeleteEntrySupported; +} SaHpiSelInfoT; +/* +** Event Log Entry +** These types define the event log entry. +*/ +typedef SaHpiUint32T SaHpiSelEntryIdT; +/* Reserved values for event log entry IDs */ +#define SAHPI_OLDEST_ENTRY (SaHpiSelEntryIdT)0x00000000 +#define SAHPI_NEWEST_ENTRY (SaHpiSelEntryIdT)0xFFFFFFFF +#define SAHPI_NO_MORE_ENTRIES (SaHpiSelEntryIdT)0xFFFFFFFE + + + +typedef struct { + SaHpiSelEntryIdT EntryId; /* Entry ID for record */ + SaHpiTimeT Timestamp; /* Time at which the event was placed + in the event log. The value + SAHPI_TIME_UNSPECIFIED indicates that + the time of the event cannot be + determined; otherwise, if less than + or equal to SAHPI_TIME_MAX_RELATIVE, + then it relative; if it is greater than + SAHPI_TIME_MAX_RELATIVE, then it is absolute. */ + SaHpiEventT Event; /* Logged Event */ +} SaHpiSelEntryT; + + + + + +/******************************************************************************* +** +** Name: saHpiInitialize +** +** Description: +** This function allows the management service an opportunity to perform +** platform-specific initialization. saHpiInitialize() must be called +** before any other functions are called. +** +** Parameters: +** HpiImplVersion - [out] Pointer to the version of the HPI +** implementation. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_DUPLICATE is returned when the HPI has already +** been initialized. Once one saHpiInitialize() call has been made, +** another one cannot be made until after a saHpiFinalize() call is made. +** +** +** Remarks: +** This function returns the version of the HPI implementation. Note: If +** the HPI interface version is needed it can be retrieved from the +** SAHPI_INTERFACE_VERSION definition. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiInitialize( + SAHPI_OUT SaHpiVersionT *HpiImplVersion +); + + +/******************************************************************************* +** +** Name: saHpiFinalize +** +** Description: +** This function allows the management service an opportunity to perform +** platform-specific cleanup. All sessions should be closed (see +** saHpiSessionClose()), before this function is executed. All open +** sessions will be forcibly closed upon execution of this command. +** +** Parameters: +** None. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. 5 Domains +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiFinalize ( +); + + +/******************************************************************************* +** +** Name: saHpiSessionOpen +** +** Description: +** This function opens a HPI session for a given domain and set of +** security characteristics (future). This function call assumes that a +** pre-arranged agreement between caller and the HPI implementation +** identifies the resources within the specified domain. As a future +** roadmap item, functions for discovery of domains and allocation of +** resources within domains may be developed. +** +** Parameters: +** DomainId - [in] Domain ID to be controlled by middleware/application. +** A domain ID of SAHPI_DEFAULT_DOMAIN_ID indicates the default domain. +** SessionId - [out] Pointer to a location to store a handle to the newly +** opened session. This handle is used for subsequent access to domain +** resources and events. +** SecurityParams - [in] Pointer to security and permissions data +** structure. This parameter is reserved for future use, and must be set +** to NULL. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_INVALID_DOMAIN is returned if no domain +** matching the specified domain ID exists. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSessionOpen ( + SAHPI_IN SaHpiDomainIdT DomainId, + SAHPI_OUT SaHpiSessionIdT *SessionId, + SAHPI_IN void *SecurityParams +); + + +/******************************************************************************* +** +** Name: saHpiSessionClose +** +** Description: +** This function closes a HPI session. After closing a session, the +** session ID will no longer be valid. +** +** Parameters: +** SessionId - [in] Session handle previously obtained using +** saHpiSessionOpen(). +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSessionClose ( + SAHPI_IN SaHpiSessionIdT SessionId +); + + +/******************************************************************************* +** +** Name: saHpiResourcesDiscover +** +** Description: +** This function requests the underlying management service to discover +** information about the resources it controls for the domain associated +** with the open session. This function may be called during operation to +** regenerate the RPT table. For those FRUs that must be discovered by +** polling, latency between FRU insertion and actual addition of the +** resource associated with that FRU to the RPT exists. To overcome this +** latency, a discovery of all present resources may be forced by calling +** saHpiResourcesDiscover (). +** +** Parameters: +** SessionId - [in] Handle to session context. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourcesDiscover ( + SAHPI_IN SaHpiSessionIdT SessionId +); + + +/******************************************************************************* +** +** Name: saHpiRptInfoGet +** +** Description: +** This function is used for requesting information about the resource +** presence table (RPT) such as an update counter and timestamp. This is +** particularly useful when using saHpiRptEntryGet() (see page 31). +** +** Parameters: +** SessionId - [in] Handle to session context. +** RptInfo - [out] Pointer to the information describing the resource +** presence table. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRptInfoGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiRptInfoT *RptInfo +); + + +/******************************************************************************* +** +** Name: saHpiRptEntryGet +** +** Description: +** This function retrieves resource information for the specified entry +** of the resource presence table. This function allows the caller to +** read the RPT entry-by-entry. If the EntryID parameter is set to +** SAHPI_FIRST_ENTRY, the first entry in the RPT will be returned. When +** an entry is successfully retrieved, *NextEntryID will be set to the +** ID of the next valid entry; however, when the last entry has been +** retrieved, *NextEntryID will be set to SAHPI_LAST_ENTRY. To retrieve +** an entire list of entries, call this function first with an EntryID of +** SAHPI_FIRST_ENTRY and then use the returned NextEntryID in the next +** call. Proceed until the NextEntryID returned is SAHPI_LAST_ENTRY. At +** initialization, the user may not wish to turn on eventing, since the +** context of the events, as provided by the RPT, is not known. In this +** instance, if a FRU is inserted into the system while the RPT is being +** read entry by entry, the resource associated with that FRU may be +** missed. (Keep in mind that there is no specified ordering for the RPT +** entries.) The update counter provides a means for insuring that no +** resources are missed when stepping through the RPT. In order to use +** this feature, the user should invoke saHpiRptInfoGet(), and get the +** update counter value before retrieving the first RPT entry. After +** reading the last entry, the user should again invoke the +** saHpiRptInfoGet() to get the update counter value. If the update +** counter has not been incremented, no new records have been added. +** +** Parameters: +** SessionId - [in] Handle to session context. +** EntryId - [in] Handle of the entry to retrieve from the RPT. Reserved +** entry ID values: SAHPI_FIRST_ENTRY Get first entry SAHPI_LAST_ENTRY +** Reserved as delimiter for end of list. Not a valid entry identifier. +** +** NextEntryId - [out] Pointer to location to store the record ID of next +** entry in RPT. +** RptEntry - [out] Pointer to the structure to hold the returned RPT +** entry. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRptEntryGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiEntryIdT EntryId, + SAHPI_OUT SaHpiEntryIdT *NextEntryId, + SAHPI_OUT SaHpiRptEntryT *RptEntry +); + + +/******************************************************************************* +** +** Name: saHpiRptEntryGetByResourceId +** +** Description: +** This function retrieves resource information from the resource +** presence table for the specified resource using its resource ID. +** Typically at start-up, the RPT is read entry-by-entry, using +** saHpiRptEntryGet(). From this, the caller can establish the set of +** resource IDs to use for future calls to the HPI functions. However, +** there may be other ways of learning resource IDs without first reading +** the RPT. For example, resources may be added to the domain while the +** system is running in response to a hot-swap action. When a resource is +** added, the application will receive a hot-swap event containing the +** resource ID of the new resource. The application may then want to +** search the RPT for more detailed information on the newly added +** resource. In this case, the resource ID can be used to locate the +** applicable RPT entry information. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource whose RPT entry should +** be returned. +** RptEntry - [out] Pointer to structure to hold the returned RPT entry. +** +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRptEntryGetByResourceId ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiRptEntryT *RptEntry +); + + +/******************************************************************************* +** +** Name: saHpiResourceSeveritySet +** +** Description: +** This function allows the caller to set the severity level applied to +** an event issued if a resource unexpectedly becomes unavailable to the +** HPI. A resource may become unavailable for several reasons including: +** ? The FRU associated with the resource is no longer present in the +** system (a surprise extraction has occurred) ? A catastrophic failure +** has occurred Typically, the HPI implementation will provide an +** appropriate default value for this parameter, which may vary by +** resource; management software can override this default value by use +** of this function ? If a resource is removed from, then re-added to the +** RPT (e.g., because of a hot-swap action), the HPI implementation may +** reset the value of this parameter. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource for which the severity +** level will be set. +** Severity - [in] Severity level of event issued when the resource +** unexpectedly becomes unavailable to the HPI. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceSeveritySet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSeverityT Severity +); + + +/******************************************************************************* +** +** Name: saHpiResourceTagSet +** +** Description: +** This function allows the caller to set the resource tag for a +** particular resource. The resource tag is an informational value that +** supplies the caller with naming information for the resource. This +** should be set to the "user-visible" name for a resource, which can be +** used to identify the resource in messages to a human operator. For +** example, it could be set to match a physical, printed label attached +** to the entity associated with the resource. Typically, the HPI +** implementation will provide an appropriate default value for this +** parameter; this function is provided so that management software can +** override the default, if desired. The value of the resource tag may be +** retrieved from the resource's RPT entry. Note: If a resource is +** removed from, then re-added to the RPT (e.g., because of a hot-swap +** action), the HPI implementation may reset the value of this parameter. +** +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource for which the resource +** tag should be set. +** ResourceTag - [in] Pointer to string representing the resource tag. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceTagSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiTextBufferT *ResourceTag +); + + +/******************************************************************************* +** +** Name: saHpiResourceIdGet +** +** Description: +** This function returns the resource ID of the resource associated with +** the entity upon which the caller is running. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [out] Pointer to location to hold the returned resource +** ID. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_NOT_PRESENT is returned if the entity the +** caller is running on is not manageable in the addressed domain. +** SA_ERR_HPI_UNKNOWN is returned if the domain controller cannot +** determine an appropriate response. That is, there may be an +** appropriate resource ID in the domain to return, but it cannot be +** determined. +** +** Remarks: +** This function must be issued within a session to a domain that +** includes a resource associated with the entity upon which the caller +** is running, or the SA_ERR_HPI_NOT_PRESENT return will be issued. Since +** entities are contained within other entities, there may be multiple +** possible resources that could be returned to this call. For example, +** if there is a resource ID associated with a particular compute blade +** upon which the caller is running, and another associated with the +** chassis which contains the compute blade, either could logically be +** returned as an indication of a resource associated with the entity +** upon which the caller was running. The function should return the +** resource ID of the "smallest" resource that is associated with the +** caller. So, in the example above, the function should return the +** resource ID of the compute blade. Once the function has returned the +** resourceID, the caller may issue further HPI calls using that +** resourceID to learn the type of resource that been identified. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceIdGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiResourceIdT *ResourceId +); + + +/******************************************************************************* +** +** Name: saHpiEntitySchemaGet +** +** Description: +** This function returns the identifier of the Entity Schema for the HPI +** implementation. This schema defines valid Entity Paths that may be +** returned by the HPI implementation. +** +** Parameters: +** SessionId - [in] Handle to session context. +** SchemaId - [out] Pointer to the ID of the schema in use; zero +** indicates that a custom schema is in use. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** This function may be issued on any session opened to any domain in the +** system, and will return the same identifier. The identifier returned +** should either be zero, indicating that the HPI implementation uses a +** custom schema; or one of the schema identifiers defined in Appendix A, +** "Pre-Defined Entity Schemas," page 107. In the case of a custom +** schema, the HPI implementation may use arbitrary entity paths to +** describe resources in the system; in the case of a pre-defined schema, +** all entity paths should conform to the schema. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEntitySchemaGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiUint32T *SchemaId +); + + +/******************************************************************************* +** +** Name: saHpiEventLogInfoGet +** +** Description: +** This function retrieves the number of entries in the system event log, +** total size of the event log, timestamp for the most recent entry, the +** log's idea of the current time (i.e., timestamp that would be placed +** on an entry at this moment), enabled/disabled status of the log (see +** saHpiEventLogStateSet()), the overflow flag, the overflow action, and +** whether the log supports deletion of individual entries. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the system +** event log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the domain system event log. +** Info - [out] Pointer to the returned SEL information. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogInfoGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiSelInfoT *Info +); + + +/******************************************************************************* +** +** Name: saHpiEventLogEntryGet +** +** Description: +** This function retrieves an event log entry from a system event log. +** The special entry IDs SAHPI_OLDEST_ENTRY and SAHPI_NEWEST_ENTRY are +** used to select the oldest and newest entries, respectively, in the log +** being read. A returned NextEntryID of SAHPI_NO_MORE_ENTRIES indicates +** that the newest entry has been returned; there are no more entries +** going forward (time-wise) in the log. A returned PrevEntryID of +** SAHPI_NO_MORE_ENTRIES indicates that the oldest entry has been +** returned. To retrieve an entire list of entries going forward (oldest +** entry to newest entry) in the log, call this function first with an +** EntryID of SAHPI_OLDEST_ENTRY and then use the returned NextEntryID as +** the EntryID in the next call. Proceed until the NextEntryID returned +** is SAHPI_NO_MORE_ENTRIES. To retrieve an entire list of entries going +** backward (newest entry to oldest entry) in the log, call this function +** first with an EntryID of SAHPI_NEWEST_ENTRY and then use the returned +** PrevEntryID as the EntryID in the next call. Proceed until the +** PrevEntryID returned is SAHPI_NO_MORE_ENTRIES. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the system +** event log to be read. Set to SAHPI_DOMAIN_CONTROLLER_ID to address the +** domain system event log. +** EntryId - [in] Handle of the entry to retrieve from the SEL. Reserved +** event log entry ID values: SAHPI_OLDEST_ENTRY Oldest entry in the +** log. SAHPI_NEWEST_ENTRY Newest entry in the log. +** SAHPI_NO_MORE_ENTRIES Not valid for this parameter. Used only when +** retrieving the next and previous entry IDs. +** PrevEntryId - [out] Handle of previous (older adjacent) entry in event +** log. Reserved event log entry ID values: SAHPI_OLDEST_ENTRY Not valid +** for this parameter. Used only for the EntryID parameter. +** SAHPI_NEWEST_ENTRY Not valid for this parameter. Used only for the +** EntryID parameter. SAHPI_NO_MORE_ENTRIES No more entries in the log +** before the one referenced by the EntryId parameter. +** NextEntryId - [out] Handle of next (newer adjacent) entry in event +** log. Reserved event log entry ID values: SAHPI_OLDEST_ENTRY Not valid +** for this parameter. Used only for the EntryID parameter. +** SAHPI_NEWEST_ENTRY Not valid for this parameter. Used only for the +** EntryID parameter. SAHPI_NO_MORE_ENTRIES No more entries in the log +** after the one referenced by the EntryId parameter. +** EventLogEntry - [out] Pointer to retrieved event log entry. +** Rdr - [in/out] Pointer to structure to receive resource data record +** associated with the event, if available. If NULL, no RDR data will be +** returned. +** RptEntry - [in/out] Pointer to structure to receive RPT Entry +** associated with the event, if available. If NULL, no RPT entry data +** will be returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Event logs may include RPT entries and resource data records +** associated with the resource and sensor issuing an event along with +** the basic event data in the log. Because the system may be +** reconfigured after the event was entered in the log, this stored +** information may be important to interpret the event. If the event log +** includes logged RPT Entries and/or RDRs, and if the caller provides a +** pointer to a structure to receive this information, it will be +** returned along with the event log entry. If the caller provides a +** pointer for an RPT entry, but the event log does not include a logged +** RPT entry for the event being returned, RptEntry->ResourceCapabilities +** will be set to zero. No valid RPTEntry will have a zero value here. If +** the caller provides a pointer for an RDR, but the event log does not +** include a logged RDR for the event being returned, Rdr->RdrType will +** be set to SAHPI_NO_RECORD. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogEntryGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSelEntryIdT EntryId, + SAHPI_OUT SaHpiSelEntryIdT *PrevEntryId, + SAHPI_OUT SaHpiSelEntryIdT *NextEntryId, + SAHPI_OUT SaHpiSelEntryT *EventLogEntry, + SAHPI_INOUT SaHpiRdrT *Rdr, + SAHPI_INOUT SaHpiRptEntryT *RptEntry +); + + +/******************************************************************************* +** +** Name: saHpiEventLogEntryAdd +** +** Description: +** This function enables system management software to add entries to the +** system event log. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the system +** event log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the Domain System Event Log. +** EvtEntry - [in] Pointer to event log entry data to write to the system +** event log. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** This function forces a write of the event to the addressed event log. +** Nothing else is done with the event. Specific implementations of HPI +** may have restrictions on how much data may be passed to the +** saHpiEventLogEntryAdd() function. These restrictions should be +** documented by the provider of the HPI interface. If more event log +** data is provided than can be written, an error will be returned. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogEntryAdd ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSelEntryT *EvtEntry +); + + +/******************************************************************************* +** +** Name: saHpiEventLogEntryDelete +** +** Description: +** This function deletes an event log entry. This operation is only valid +** if so indicated by saHpiEventLogInfoGet(), via the +** DeleteEntrySupported field in the SaHpiSelInfoT structure. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] ResourceID of the resource that contains the system +** event log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the domain system event log. +** EntryId - [in] Entry ID on the event log entry to delete. Reserved +** event log entry ID values: SAHPI_OLDEST_ENTRY - Oldest entry in the +** log. SAHPI_NEWEST_ENTRY - Newest entry in the log. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_INVALID_CMD is returned if this log does not +** support this operation. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogEntryDelete ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSelEntryIdT EntryId +); + + +/******************************************************************************* +** +** Name: saHpiEventLogClear +** +** Description: +** This function erases the contents of the specified system event log. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] ResourceID of the resource that contains the system +** event log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the domain system event log. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Note that all event logs must support the "clear" operation, +** regardless of the setting of the DeleteEntrySupported field in the +** SaHpiSelInfoT structure returned by saHpiEventLogInfoGet(). +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogClear ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + + +/******************************************************************************* +** +** Name: saHpiEventLogTimeGet +** +** Description: +** This function retrieves the current time from the event log's own time +** clock. The value of this clock is used to timestamp log entries +** written into the log. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] ResourceID of the resource that contains the System +** Event Log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the Domain System Event Log. +** Time - [out] Pointer to the returned SEL current time. If the +** implementation cannot supply an absolute time value, then it may +** supply a time relative to some system-defined epoch, such as system +** boot. If the time value is less than or equal to +** SAHPI_TIME_MAX_RELATIVE, but not SAHPI_TIME_UNSPECIFIED, then it is +** relative; if it is greater than SAHPI_TIME_MAX_RELATIVE, then it is +** absolute. The value SAHPI_TIME_UNSPECIFIED indicates that the time is +** not set, or cannot be determined. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogTimeGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiTimeT *Time +); + + +/******************************************************************************* +** +** Name: saHpiEventLogTimeSet +** +** Description: +** This function sets the event log's time clock, which is used to +** timestamp events written into the log. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the system +** event log to be managed. set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the domain system event log. +** Time - [in] time to set the SEL clock to. If the implementation cannot +** supply an absolute time, then it may supply a time relative to some +** system-defined epoch, such as system boot. If the timestamp value is +** less than or equal to SAHPI_TIME_MAX_RELATIVE, but not +** SAHPI_TIME_UNSPECIFIED, then it is relative; if it is greater than +** SAHPI_TIME_MAX_RELATIVE, then it is absolute. The value +** SAHPI_TIME_UNSPECIFIED indicates that the time of the event cannot be +** determined. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogTimeSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiTimeT Time +); + + +/******************************************************************************* +** +** Name: saHpiEventLogStateGet +** +** Description: +** This function enables system management software to get the event log +** state. If the event log is "disabled" no events generated within the +** HPI implementation will be added to the event log. Events may still be +** added to the event log with the saHpiEventLogEntryAdd() function. When +** the event log is "enabled" events may be automatically added to the +** event log as they are generated in a resource or a domain, however, it +** is implementation-specific which events are automatically added to any +** event log. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] ResourceID of the resource that contains the System +** Event Log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the Domain System Event Log. +** Enable - [out] Pointer to the current SEL state. True indicates that +** the SEL is enabled; false indicates that it is disabled. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiBoolT *Enable +); + + +/******************************************************************************* +** +** Name: saHpiEventLogStateSet +** +** Description: +** This function enables system management software to set the event log +** enabled state. If the event log is "disabled" no events generated +** within the HPI implementation will be added to the event log. Events +** may still be added to the event log using the saHpiEventLogEntryAdd() +** function. When the event log is "enabled" events may be automatically +** added to the event log as they are generated in a resource or a +** domain. The actual set of events that are automatically added to any +** event log is implementation-specific. Typically, the HPI +** implementation will provide an appropriate default value for this +** parameter, which may vary by resource. This function is provided so +** that management software can override the default, if desired. Note: +** If a resource hosting an event log is re-initialized (e.g., because of +** a hot-swap action), the HPI implementation may reset the value of this +** parameter. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the system +** event log to be managed. Set to SAHPI_DOMAIN_CONTROLLER_ID to address +** the domain system event log. +** Enable - [in] SEL state to be set. True indicates that the SEL is to +** be enabled; false indicates that it is to be disabled. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiBoolT Enable +); + + +/******************************************************************************* +** +** Name: saHpiSubscribe +** +** Description: +** This function allows the caller to subscribe for session events. This +** single call provides subscription to all session events, regardless of +** event type or event severity. Only one subscription is allowed per +** session, and additional subscribers will receive an appropriate error +** code. No event filtering will be done by the underlying management +** service. +** +** Parameters: +** SessionId - [in] Session for which event subscription will be opened. +** ProvideActiveAlarms - [in] Indicates whether or not alarms which are +** active at the time of subscription should be queued for future +** retrieval via the saHpiEventGet() function. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_DUPLICATE is returned when a subscription is +** already in place for this session. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSubscribe ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiBoolT ProvideActiveAlarms +); + + +/******************************************************************************* +** +** Name: saHpiUnsubscribe +** +** Description: +** This function removes the event subscription for the session. After +** removal of a subscription, additional saHpiEventGet() calls will not +** be allowed unless the caller re-subscribes for events first. Any +** events that are still in the event queue when this function is called +** will be cleared from it. +** +** Parameters: +** SessionId - [in] Session for which event subscription will be closed. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_INVALID_REQUEST is returned if the caller is +** not currently subscribed for events in this session. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiUnsubscribe ( + SAHPI_IN SaHpiSessionIdT SessionId +); + + +/******************************************************************************* +** +** Name: saHpiEventGet +** +** Description: +** This function allows the caller to get an event. This call is only +** valid within a session, which has subscribed for events. If the +** ProvideActiveAlarms parameter was set in the subscription, the first +** events retrieved will reflect the state of currently active alarms for +** the resources belonging to the domain. After all active alarms are +** retrieved this function will begin returning newly generated events as +** the domain controller receives them. If there are one or more events +** on the event queue when this function is called, it will immediately +** return the next event on the queue. Otherwise, if the Timeout +** parameter is SAHPI_TIMEOUT_IMMEDIATE, it will return +** SA_ERR_HPI_TIMEOUT immediately. Otherwise, it will block for a time +** specified by the timeout parameter; if an event is added to the queue +** within that time, it will be returned immediately; if not, +** saHpiEventGet() will return SA_ERR_HPI_TIMEOUT. If the Timeout +** parameter is SAHPI_TIMEOUT_BLOCK, then saHpiEventGet() will block +** indefinitely, until an event becomes available, and then return that +** event. This provides for notification of events as they occur. +** +** Parameters: +** SessionId - [in] Session for which events are retrieved. +** Timeout - [in] The number of nanoseconds to wait for an event to +** arrive. Reserved time out values: SAHPI_TIMEOUT_IMMEDIATE Time out +** immediately if there are no events available (non-blocking call). +** SAHPI_TIMEOUT_BLOCK Call should not return until an event is +** retrieved. +** Event - [out] Pointer to the next available event. +** Rdr - [in/out] Pointer to structure to receive the resource data +** associated with the event. If NULL, no RDR will be returned. +** RptEntry - [in/out] Pointer to structure to receive the RPT entry +** associated with the resource that generated the event. If NULL, no RPT +** entry will be returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_TIMEOUT is returned if no event is available +** to return within the timeout period. If SAHPI_TIMEOUT_IMMEDIATE is +** passed in the Timeout parameter, this error return will be used if +** there is no event queued when the function is called. +** +** Remarks: +** If the caller provides a pointer for an RPT entry, but the event does +** not include a valid resource ID for a resource in the domain (possible +** on OEM or USER type event), then the ResourceCapabilities field in +** *RptEntry will be set to zero. No valid RPT entry will have a zero +** value here. If the caller provides a pointer for an RDR, but there is +** no valid RDR associated with the event being returned (e.g., returned +** event is not a sensor event), Rdr->RdrType will be set to +** SAHPI_NO_RECORD. The timestamp reported in the returned event +** structure is the best approximation an implementation has to when the +** event actually occurred. The implementation may need to make an +** approximation (such as the time the event was placed on the event +** queue) because it may not have access to the actual time the event +** occurred. The value SAHPI_TIME_UNSPECIFIED indicates that the time of +** the event cannot be determined. If the implementation cannot supply an +** absolute timestamp, then it may supply a timestamp relative to some +** system-defined epoch, such as system boot. If the timestamp value is +** less than or equal to SAHPI_TIME_MAX_RELATIVE, but not +** SAHPI_TIME_UNSPECIFIED, then it is relative; if it is greater than +** SAHPI_TIME_MAX_RELATIVE, then it is absolute. 6 Resource Functions +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiTimeoutT Timeout, + SAHPI_OUT SaHpiEventT *Event, + SAHPI_INOUT SaHpiRdrT *Rdr, + SAHPI_INOUT SaHpiRptEntryT *RptEntry +); + + +/******************************************************************************* +** +** Name: saHpiRdrGet +** +** Description: +** This function returns a resource data record from the addressed +** resource. Submitting an EntryId of SAHPI_FIRST_ENTRY results in the +** first RDR being read. A returned NextEntryID of SAHPI_LAST_ENTRY +** indicates the last RDR has been returned. A successful retrieval will +** include the next valid EntryId. To retrieve the entire list of RDRs, +** call this function first with an EntryId of SAHPI_FIRST_ENTRY and then +** use the returned NextEntryId in the next call. Proceed until the +** NextEntryId returned is SAHPI_LAST_ENTRY. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** EntryId - [in] Handle of the RDR to retrieve. Reserved entry ID +** values: SAHPI_FIRST_ENTRY Get first entry SAHPI_LAST_ENTRY Reserved as +** delimiter for end of list. Not a valid entry identifier. +** NextEntryId - [out] Pointer to location to store Entry ID of next +** entry in RDR repository. +** Rdr - [out] Pointer to the structure to receive the requested resource +** data record. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** A resource's RDR repository is static over the lifetime of the +** resource; therefore no precautions are required against changes to the +** content of the RDR repository while it is being accessed. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRdrGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiEntryIdT EntryId, + SAHPI_OUT SaHpiEntryIdT *NextEntryId, + SAHPI_OUT SaHpiRdrT *Rdr +); + + +/******************************************************************************* +** +** Name: saHpiSensorReadingGet +** +** Description: +** This function is used to retrieve a sensor reading. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which the sensor reading is being +** retrieved. +** Reading - [out] Pointer to a structure to receive sensor reading +** values. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorReadingGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiSensorReadingT *Reading +); + + +/******************************************************************************* +** +** Name: saHpiSensorReadingConvert +** +** Description: +** This function converts between raw and interpreted sensor reading +** values. The type of conversion done depends on the passed-in +** ReadingInput parameter. If it contains only a raw value, then this is +** converted to an interpreted value in ConvertedReading; if it contains +** only an interpreted value, then this is converted to a raw value in +** ConvertedReading. If it contains neither type of value, or both, then +** an error is returned. The ReadingInput parameter is not altered in any +** case. If the sensor does not use raw values - i.e., it directly +** returns interpreted values - then this routine returns an error. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which reading is associated. +** ReadingInput - [in] Pointer to the structure that contains raw or +** interpreted reading to be converted. +** ConvertedReading - [out] Pointer to structure to hold converted +** reading. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_HPI_INVALID_PARAMS is returned if the ReadingInput +** parameter is invalid; e.g. if it contains neither a raw nor an +** interpreted value; or if it contains both; or if it contains an +** invalid value. SA_ERR_HPI_INVALID_DATA is returned if the sensor does +** not support raw readings. SA_ERR_HPI_NOT_PRESENT is returned if the +** sensor is not present. +** +** Remarks: +** The EventStatus field in ReadingInput is not used by this function. To +** make conversions, sensor-specific data may be required. Thus, the +** function references a particular sensor in the system through the +** SessionID/ResourceID/SensorNum parameters. If this sensor is not +** present, and sensor- specific information is required, the conversion +** will fail and SA_ERR_HPI_NOT_PRESENT will be returned. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorReadingConvert ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_IN SaHpiSensorReadingT *ReadingInput, + SAHPI_OUT SaHpiSensorReadingT *ConvertedReading +); + + +/******************************************************************************* +** +** Name: saHpiSensorThresholdsGet +** +** Description: +** This function retrieves the thresholds for the given sensor. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which threshold values are being +** retrieved. +** SensorThresholds - [out] Pointer to returned sensor thresholds. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorThresholdsGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiSensorThresholdsT *SensorThresholds +); + + +/******************************************************************************* +** +** Name: saHpiSensorThresholdsSet +** +** Description: +** This function sets the specified thresholds for the given sensor. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of addressed resource. +** SensorNum - [in] Sensor number for which threshold values are being +** set. +** SensorThresholds - [in] Pointer to the sensor thresholds values being +** set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** For each threshold or hysteresis value to be set, the corresponding +** sensor reading structure must indicate whether a raw or interpreted +** value is present. If neither are present, then that threshold or +** hysteresis value will not be set. Each sensor may require settings to +** be done with raw, or interpreted values, or may permit either; this is +** defined by the field ThresholdDefn.TholdCapabilities in the sensor's +** RDR (saHpiSensorRecT). If the interpreted value and raw value are both +** provided, and both are legal for the sensor, the interpreted value +** will be ignored and the raw value will be used. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorThresholdsSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_IN SaHpiSensorThresholdsT *SensorThresholds +); + + +/******************************************************************************* +** +** Name: saHpiSensorTypeGet +** +** Description: +** This function retrieves the sensor type and event category for the +** specified sensor. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which the type is being retrieved +** Type - [out] Pointer to returned enumerated sensor type for the +** specified sensor. +** Category - [out] Pointer to location to receive the returned sensor +** event category. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorTypeGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiSensorTypeT *Type, + SAHPI_OUT SaHpiEventCategoryT *Category +); + + +/******************************************************************************* +** +** Name: saHpiSensorEventEnablesGet +** +** Description: +** This function provides the ability to get the disable or enable event +** message generation status for individual sensor events. The sensor +** event states are relative to the event category specified by the +** sensor. See the SaHpiEventCategoryT definition in section 7.3, +** "Events, Part 1," on page 83 for more information. Within the +** structure returned, there are two elements that contain bit flags; one +** for assertion events and one for de-assertion events. A bit set to '1' +** in the "AssertEvents" element in the structure indicates that an event +** will be generated when the corresponding event state changes from +** de-asserted to asserted on that sensor. A bit set to '1' in the +** "DeassertEvents" element in the structure indicates that an event will +** be generated when the corresponding event state changes from asserted +** to de-asserted on that sensor. The saHpiSensorEventEnablesGet() +** function also returns the general sensor status - whether the sensor +** is completely disabled, or event generation is completely disabled. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which the event enable +** configuration is being requested +** Enables - [out] Pointer to the structure for returning sensor status +** and event enable information. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Disabling events means that events are disabled for all sessions, not +** just the session referenced by the SessionId parameter. For sensors +** hosted by resources that have the "SAHPI_CAPABILITY_EVT_DEASSERTS" +** flag set in its RPT entry, the "AssertEvents" element and the +** "DeassertsEvents" element will always have same value. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorEventEnablesGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiSensorEvtEnablesT *Enables +); + + +/******************************************************************************* +** +** Name: saHpiSensorEventEnablesSet +** +** Description: +** This function provides the ability to set the disable or enable event +** message generation status for individual sensor events. The sensor +** event states are relative to the event category specified by the +** sensor. See the SaHpiEventCategoryT definition for more information. +** Within the structure passed, there are two elements, which contain bit +** flags; one for assertion events and one for de-assertion events. +** However, the use of these two elements depends on whether the resource +** addressed has the "SAHPI_CAPABILITY_EVT_DEASSERTS" flag set in its RPT +** entry. This capability, if set, advertises that all sensors hosted by +** the resource will always send a "de-assert" event when any state is +** de-asserted whose assertion generates an "assert" event. Thus, for +** sensors hosted by resources that advertise this behavior, it is not +** meaningful to control assert events and de-assert events separately. +** For sensors on resources that do not have the +** "SAHPI_CAPABILITY_EVT_DEASSERTS" flag set, a bit set to '1' in the +** "AssertEvents" element in the structure indicates that an event will +** be generated when the corresponding event state changes from +** de-asserted to asserted on that sensor., and a bit set to '1' in the +** "DeassertEvents" element in the structure indicates that an event will +** be generated when the corresponding event state changes from asserted +** to de-asserted on that sensor. For sensors on resources, which do have +** the "SAHPI_CAPABILITY_EVT_DEASSERTS" flag set, the "DeassertEvents" +** element is not used. For sensors on these resources, a bit set to '1' +** in the "AssertEvents" element in the structure indicates that an event +** will be generated when the corresponding event state changes in either +** direction (de-asserted to asserted or asserted to de-asserted). The +** saHpiSensorEventEnablesSet() function also allows setting of general +** sensor status - whether the sensor is completely disabled, or event +** generation is completely disabled. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** SensorNum - [in] Sensor number for which the event enables are being +** set. +** Enables - [in] Pointer to the structure containing the enabled status +** for each event. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Disabling events means that events are disabled for all sessions, not +** just the session referenced by the SessionId parameter. +** saHpiSensorEventEnablesGet () will return the values which were last +** set by saHpiSensorEventEnablesSet() for the "AssertEvents" and +** "DeassertEvents" elements in the passed data structures. However, for +** sensors hosted by any resource that has the +** SAHPI_CAPABILITY_EVT_DEASSERTS flag set in its RPT entry, the passed +** "AssertEvents" element on the saHpiSensorEventEnablesSet () function +** is used for both assertion and de-assertion event enable flags. In +** this case, this value will be returned in both the "AssertEvents" and +** "DeassertEvents" elements on a subsequent saHpiSensorEventEnablesGet +** () call. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorEventEnablesSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_IN SaHpiSensorEvtEnablesT *Enables +); + + +/******************************************************************************* +** +** Name: saHpiControlTypeGet +** +** Description: +** This function retrieves the control type of a control object. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** CtrlNum - [in] Control number +** Type - [out] Pointer to SaHpiCtrlTypeT variable to receive the +** enumerated control type for the specified control. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** The Type parameter must point to a variable of type SaHpiCtrlTypeT. +** Upon successful completion, the enumerated control type is returned in +** the variable pointed to by Type. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiControlTypeGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiCtrlNumT CtrlNum, + SAHPI_OUT SaHpiCtrlTypeT *Type +); + + +/******************************************************************************* +** +** Name: saHpiControlStateGet +** +** Description: +** This function retrieves the current state (generally the last state +** set) of a control object. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of addressed resource. +** CtrlNum - [in] Number of the control for which the state is being +** retrieved. +** CtrlState - [in/out] Pointer to a control data structure into which +** the current control state will be placed. For text controls, the line +** number to read is passed in via CtrlState->StateUnion.Text.Line. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Note that Text controls are unique in that they have a state +** associated with each line of the control - the state being the text on +** that line. The line number to be read is passed in to +** sahpiControlStateGet()via CtrlState- >StateUnion.Text.Line; the +** contents of that line of the control will be returned in CtrlState- +** >StateUnion.Text.Text. If the line number passed in is +** SAHPI_TLN_ALL_LINES, then sahpiControlStateGet() will return the +** entire text of the control, or as much of it as will fit in a single +** SaHpiTextBufferT, in CtrlState- >StateUnion.Text.Text. This value will +** consist of the text of all the lines concatenated, using the maximum +** number of characters for each line (no trimming of trailing blanks). +** Note that depending on the data type and language, the text may be +** encoded in 2-byte Unicode, which requires two bytes of data per +** character. Note that the number of lines and columns in a text control +** can be obtained from the control's Resource Data Record. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiControlStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiCtrlNumT CtrlNum, + SAHPI_INOUT SaHpiCtrlStateT *CtrlState +); + + +/******************************************************************************* +** +** Name: saHpiControlStateSet +** +** Description: +** This function is used for setting the state of the specified control +** object. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** CtrlNum - [in] Number of the control for which the state is being set. +** +** CtrlState - [in] Pointer to a control state data structure holding the +** state to be set +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** The CtrlState parameter must be of the correct type for the specified +** control. Text controls include a line number and a line of text in the +** CtrlState parameter, allowing update of just a single line of a text +** control. If less than a full line of data is written, the control will +** clear all spaces beyond those written on the line. Thus writing a +** zero-length string will clear the addressed line. It is also possible +** to include more characters in the text passed in the CtrlState +** structure than will fit on one line; in this case, the control will +** "wrap" to the next line (still clearing the trailing characters on the +** last line written). Thus, there are two ways to write multiple lines +** to a text control: (a) call saHpiControlStateSet() repeatedly for each +** line, or (b) call saHpiControlStateSet() once and send more characters +** than will fit on one line. The caller should not assume any "cursor +** positioning" characters are available to use, but rather should always +** write full lines and allow "wrapping" to occur. When calling +** saHpiControlStateSet() for a text control, the caller may set the line +** number to SAHPI_TLN_ALL_LINES; in this case, the entire control will +** be cleared, and the data will be written starting on line 0. (This is +** different from simply writing at line 0, which only alters the lines +** written to.) This feature may be used to clear the entire control, +** which can be accomplished by setting: CtrlState->StateUnion.Text.Line +** = SAHPI_TLN_ALL_LINES; CtrlState->StateUnion.Text.Text.DataLength = 0; +** Note that the number of lines and columns in a text control can be +** obtained from the control's Resource Data Record. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiControlStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiCtrlNumT CtrlNum, + SAHPI_IN SaHpiCtrlStateT *CtrlState +); + + +/******************************************************************************* +** +** Name: saHpiEntityInventoryDataRead +** +** Description: +** This function returns inventory data for a particular entity +** associated with a resource. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** EirId - [in] Identifier for the entity inventory repository. +** BufferSize - [in] Size of the InventData buffer passed in. +** InventData - [out] Pointer to the buffer for the returned data. +** ActualSize - [out] Pointer to size of the actual amount of data +** returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. SA_ERR_INVENT_DATA_TRUNCATED is returned if the buffer +** passed in the InventData structure is not large enough (as indicated +** by the "BufferSize" parameter) to hold the entire InventData +** structure. +** +** Remarks: +** Before calling saHpiEntityInventoryDataRead() the caller should +** allocate a sufficiently large buffer to hold the data, and pass the +** size of the buffer in the "BufferSize" parameter. The +** saHpiEntityInventoryDataRead() function will return, at the location +** pointed to by the ActualSize parameter, the actual space used in the +** buffer to hold the returned data. If the data will not fit in the +** buffer, as much as will fit will be returned, *ActualSize will be set +** to indicated a suggested buffer size for the entire inventory data, +** the "Validity" field in the InventData buffer will be set to +** "SAHPI_INVENT_DATA_OVERFLOW," and an error return will be made. Since +** it is impossible to know how large the inventory data may be without +** actually reading and processing it from the entity inventory +** repository, it may be advisable to err on the large side in allocating +** the buffer. Note that the data includes many pointers to +** SaHpiTextBufferT structures. The implementation of +** saHpiEntityInventoryDataRead() may not reserve space for the maximum +** size of each of these structures when formatting the data in the +** returned buffer. Thus, if a user wishes to lengthen the data in one of +** these structures, a new SaHpiTextBufferT structure should be +** allocated, and the appropriate pointer reset to point to this new +** structure in memory. See the description of the SaHpiInventoryDataT +** structure in section 7.9, "Entity Inventory Data," on page 94, for +** details on the format of the returned data. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEntityInventoryDataRead ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiEirIdT EirId, + SAHPI_IN SaHpiUint32T BufferSize, + SAHPI_OUT SaHpiInventoryDataT *InventData, + SAHPI_OUT SaHpiUint32T *ActualSize +); + + +/******************************************************************************* +** +** Name: saHpiEntityInventoryDataWrite +** +** Description: +** This function writes the specified data to the inventory information +** area. Note: If the resource hosting the inventory data is +** re-initialized, or if the entity itself is removed and reinserted, the +** inventory data may be reset to its default settings, losing data +** written to the repository with this function. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** EirId - [in] Identifier for the entity inventory repository. +** InventData - [in] Pointer to data to write to the repository. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** The SaHpiInventoryDataT structure consists of a Validity field and +** then a set of pointers to record structures. It is not required that +** all pointers point to data within a single contiguous buffer. The +** "Validity" field in the SaHpiInventoryDataT structure must be set to +** "SAHPI_INVENT_DATA_VALID," or else the saHpiEntityInventoryDataWrite() +** function will take no action and return an error. This is to help +** prevent invalid data returned by a saHpiEntityInventoryDataRead() +** function from being inadvertently written to the resource. For this +** protection to work, the caller should not change the value of the +** "Validity" field in the SaHpiInventoryDataT structure unless building +** an entire Inventory Data set from scratch. Some implementations may +** impose limitations on the languages of the strings passed in within +** the InventData parameter. Implementation-specific documentation +** should identify these restrictions. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEntityInventoryDataWrite ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiEirIdT EirId, + SAHPI_IN SaHpiInventoryDataT *InventData +); + + +/******************************************************************************* +** +** Name: saHpiWatchdogTimerGet +** +** Description: +** This function retrieves the current watchdog timer settings and +** configuration. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource, which contains the +** watchdog timer being addressed. +** WatchdogNum - [in] The watchdog number that specifies the watchdog +** timer on a resource. +** Watchdog - [out] Pointer to watchdog data structure. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** See the description of the SaHpiWatchdogT structure in 7.11, +** "Watchdogs" on page 96 for details on what information is returned by +** this function. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiWatchdogTimerGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiWatchdogNumT WatchdogNum, + SAHPI_OUT SaHpiWatchdogT *Watchdog +); + + +/******************************************************************************* +** +** Name: saHpiWatchdogTimerSet +** +** Description: +** This function provides a method for initializing the watchdog timer +** configuration. Once the appropriate configuration has be set using +** saHpiWatchdogTimerSet(), the user must then call +** saHpiWatchdogTimerReset() to initially start the watchdog timer. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the resource that contains the +** watchdog timer being addressed. +** WatchdogNum - [in] The watchdog number specifying the specific +** watchdog timer on a resource. +** Watchdog - [in] Pointer to watchdog data structure. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** If the initial counter value in the SaHpiWatchdogT structure is set to +** 0, the Watchdog will immediately time out and take the pre-timeout and +** timeout actions, as well as log an event. This provides a mechanism +** for software to force an immediate recovery action should that be +** dependent on a Watchdog timeout occurring. See the description of the +** SaHpiWatchdogT structure for more details on the effects of this +** command related to specific data passed in that structure. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiWatchdogTimerSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiWatchdogNumT WatchdogNum, + SAHPI_IN SaHpiWatchdogT *Watchdog +); + + +/******************************************************************************* +** +** Name: saHpiWatchdogTimerReset +** +** Description: +** This function provides a method to start or restart the watchdog timer +** from the initial countdown value. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID for the resource that contains the +** watchdog timer being addressed. +** WatchdogNum - [in] The watchdog number specifying the specific +** watchdog timer on a resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** If the Watchdog has been configured to issue a Pre-Timeout interrupt, +** and that interrupt has already occurred, the saHpiWatchdogTimerReset() +** function will not reset the watchdog counter. The only way to stop a +** Watchdog from timing out once a Pre-Timeout interrupt has occurred is +** to use the saHpiWatchdogTimerSet() function to reset and/or stop the +** timer. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiWatchdogTimerReset ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiWatchdogNumT WatchdogNum +); + + +/******************************************************************************* +** +** Name: saHpiHotSwapControlRequest +** +** Description: +** A resource supporting hot swap typically supports default policies for +** insertion and extraction. On insertion, the default policy may be for +** the resource to turn the associated FRU's local power on and to +** de-assert reset. On extraction, the default policy may be for the +** resource to immediately power off the FRU and turn on a hot swap +** indicator. This function allows a caller, after receiving a hot swap +** event with HotSwapState equal to SAHPI_HS_STATE_INSERTION_PENDING or +** SAHPI_HS_STATE_EXTRACTION_PENDING, to request control of the hot swap +** policy and prevent the default policy from being invoked. Because a +** resource that supports the simplified hot swap model will never +** transition into Insertion Pending or Extraction Pending states, this +** function is not applicable to those resources. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapControlRequest ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + + +/******************************************************************************* +** +** Name: saHpiResourceActiveSet +** +** Description: +** During insertion, a resource supporting hot swap will generate an +** event to indicate that it is in the INSERTION PENDING state. If the +** management middleware or other user software calls +** saHpiHotSwapControlRequest() before the resource begins an auto-insert +** operation, then the resource will remain in INSERTION PENDING state +** while the user acts on the resource to integrate it into the system. +** During this state, the user can instruct the resource to power on the +** associated FRU, to de-assert reset, or to turn off its hot swap +** indicator using the saHpiResourcePowerStateSet(), +** saHpiResourceResetStateSet(), or saHpiHotSwapIndicatorStateSet() +** functions, respectively. Once the user has completed with the +** integration of the FRU, this function must be called to signal that +** the resource should now transition into ACTIVE/HEALTHY or +** ACTIVE/UNHEALTHY state (depending on whether or not there are active +** faults). The user may also use this function to request a resource to +** return to the ACTIVE/HEALTHY or ACTIVE/UNHEALTHY state from the +** EXTRACTION PENDING state in order to reject an extraction request. +** Because a resource that supports the simplified hot swap model will +** never transition into Insertion Pending or Extraction Pending states, +** this function is not applicable to those resources. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Only valid if resource is in INSERTION PENDING or EXTRACTION PENDING +** state and an auto-insert or auto-extract policy action has not been +** initiated. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceActiveSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + + +/******************************************************************************* +** +** Name: saHpiResourceInactiveSet +** +** Description: +** During extraction, a resource supporting hot swap will generate an +** event to indicate that it is in the EXTRACTION PENDING state. If the +** management middleware or other user software calls +** saHpiHotSwapControlRequest() before the resource begins an +** auto-extract operation, then the resource will remain in EXTRACTION +** PENDING state while the user acts on the resource to isolate the +** associated FRU from the system. During this state, the user can +** instruct the resource to power off the FRU, to assert reset, or to +** turn on its hot swap indicator using the saHpiResourcePowerStateSet(), +** saHpiResourceResetStateSet(), or saHpiHotSwapIndicatorStateSet() +** functions, respectively. Once the user has completed the shutdown of +** the FRU, this function must be called to signal that the resource +** should now transition into INACTIVE state. The user may also use this +** function to request a resource to return to the INACTIVE state from +** the INSERTION PENDING state to abort a hot-swap insertion action. +** Because a resource that supports the simplified hot swap model will +** never transition into Insertion Pending or Extraction Pending states, +** this function is not applicable to those resources. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Only valid if resource is in EXTRACTION PENDING or INSERTION PENDING +** state and an auto-extract or auto-insert policy action has not been +** initiated. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceInactiveSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + + +/******************************************************************************* +** +** Name: saHpiAutoInsertTimeoutGet +** +** Description: +** This function allows the caller to request the auto-insert timeout +** value. This value indicates how long the HPI implementation will wait +** before the default auto-insertion policy is invoked. Further +** information on the auto-insert timeout can be found in the function +** saHpiAutoInsertTimeoutSet(). +** +** Parameters: +** SessionId - [in] Handle to session context. +** Timeout - [out] Pointer to location to store the number of nanoseconds +** to wait before autonomous handling of the hotswap event. Reserved time +** out values: SAHPI_TIMEOUT_IMMEDIATE indicates autonomous handling is +** immediate. SAHPI_TIMEOUT_BLOCK indicates autonomous handling does not +** occur. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoInsertTimeoutGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiTimeoutT *Timeout +); + + +/******************************************************************************* +** +** Name: saHpiAutoInsertTimeoutSet +** +** Description: +** This function allows the caller to configure a timeout for how long to +** wait before the default auto-insertion policy is invoked. This +** function accepts a parameter instructing the implementation to impose +** a delay before a resource will perform its default hot swap policy for +** auto-insertion. The parameter may be set to SAHPI_TIMEOUT_IMMEDIATE to +** direct resources to proceed immediately to auto-insertion, or to +** SAHPI_TIMEOUT_BLOCK to prevent auto-insertion from ever occurring. If +** the parameter is set to another value, then it defines the number of +** nanoseconds between the time a hot swap event with HotSwapState = +** SAHPI_HS_STATE_INSERTION_PENDING is generated, and the time that the +** auto-insertion policy will be invoked for that resource. If, during +** this time period, a saHpiHotSwapControlRequest() function is +** processed, the timer will be stopped, and the auto-insertion policy +** will not be invoked. Once the auto-insertion process begins, the user +** software will not be allowed to take control of the insertion process; +** hence, the timeout should be set appropriately to allow for this +** condition. Note that the timeout period begins when the hot swap event +** with HotSwapState = SAHPI_HS_STATE_INSERTION_PENDING is initially +** generated; not when it is received by a caller with a saHpiEventGet() +** function call, or even when it is placed in a session event queue. +** +** Parameters: +** SessionId - [in] Handle to session context. +** Timeout - [in] The number of nanoseconds to wait before autonomous +** handling of the hotswap event. Reserved time out values: +** SAHPI_TIMEOUT_IMMEDIATE indicates proceed immediately to autonomous +** handling. SAHPI_TIMEOUT_BLOCK indicates prevent autonomous handling. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoInsertTimeoutSet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiTimeoutT Timeout +); + + +/******************************************************************************* +** +** Name: saHpiAutoExtractTimeoutGet +** +** Description: +** This function allows the caller to request the timeout for how long +** the implementation will wait before the default auto-extraction policy +** is invoked. Further information on auto-extract time outs is detailed +** in saHpiAutoExtractTimeoutSet(). +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** Timeout - [out] Pointer to location to store the number of nanoseconds +** to wait before autonomous handling of the hotswap event. Reserved time +** out values: SAHPI_TIMEOUT_IMMEDIATE indicates autonomous handling is +** immediate. SAHPI_TIMEOUT_BLOCK indicates autonomous handling does not +** occur. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoExtractTimeoutGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiTimeoutT *Timeout +); + + +/******************************************************************************* +** +** Name: saHpiAutoExtractTimeoutSet +** +** Description: +** This function allows the caller to configure a timeout for how long to +** wait before the default auto-extraction policy is invoked. This +** function accepts a parameter instructing the implementation to impose +** a delay before a resource will perform its default hot swap policy for +** auto-extraction. The parameter may be set to SAHPI_TIMEOUT_IMMEDIATE +** to direct the resource to proceed immediately to auto-extraction, or +** to SAHPI_TIMEOUT_BLOCK to prevent auto-extraction from ever occurring +** on a resource. If the parameter is set to another value, then it +** defines the number of nanoseconds between the time a hot swap event +** with HotSwapState = SAHPI_HS_STATE_EXTRACTION_PENDING is generated, +** and the time that the auto- extraction policy will be invoked for the +** resource. If, during this time period, a saHpiHotSwapControlRequest() +** function is processed, the timer will be stopped, and the +** auto-extraction policy will not be invoked. Once the auto-extraction +** process begins, the user software will not be allowed to take control +** of the extraction process; hence, the timeout should be set +** appropriately to allow for this condition. Note that the timeout +** period begins when the hot swap event with HotSwapState = +** SAHPI_HS_STATE_EXTRACTION_PENDING is initially generated; not when it +** is received by a caller with a saHpiEventGet() function call, or even +** when it is placed in a session event queue. The auto-extraction policy +** is set at the resource level and is only supported by resources +** supporting the "Managed Hot Swap" capability. After discovering that a +** newly inserted resource supports "Managed Hot Swap," middleware or +** other user software may use this function to change the default +** auto-extraction policy for that resource. If a resource supports the +** simplified hot-swap model, setting this timer has no effect since the +** resource will transition directly to "Not Present" state on an +** extraction. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** Timeout - [in] The number of nanoseconds to wait before autonomous +** handling of the hotswap event. Reserved time out values: +** SAHPI_TIMEOUT_IMMEDIATE indicates proceed immediately to autonomous +** handling. SAHPI_TIMEOUT_BLOCK indicates prevent autonomous handling. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoExtractTimeoutSet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiTimeoutT Timeout +); + + +/******************************************************************************* +** +** Name: saHpiHotSwapStateGet +** +** Description: +** This function allows the caller to retrieve the current hot swap state +** of a resource. The returned state will be one of the following five +** states: ? SAHPI_HS_STATE_INSERTION_PENDING ? +** SAHPI_HS_STATE_ACTIVE_HEALTHY ? SAHPI_HS_STATE_ACTIVE_UNHEALTHY ? +** SAHPI_HS_STATE_EXTRACTION_PENDING ? SAHPI_HS_STATE_INACTIVE The state +** SAHPI_HS_STATE_NOT_PRESENT will never be returned, because a resource +** that is not present cannot be addressed by this function in the first +** place. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** State - [out] Pointer to location to store returned state information. +** +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiHsStateT *State +); + + +/******************************************************************************* +** +** Name: saHpiHotSwapActionRequest +** +** Description: +** A resource supporting hot swap typically requires a physical action on +** the associated FRU to invoke an insertion or extraction process. An +** insertion process is invoked by physically inserting the FRU into a +** chassis. Physically opening an ejector latch or pressing a button +** invokes the extraction process. This function allows the caller to +** invoke an insertion or extraction process via software. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** Action - [in] Requested action: SAHPI_HS_ACTION_INSERTION or +** SAHPI_HS_ACTION_EXTRACTION +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** There may be limitations on when saHpiHotSwapActionRequest() may be +** called, and what value may be used for the "Action" parameter +** depending on what state the resource is currently in. At the least, +** this function may be called: ? To request an Insertion action when the +** resource is in INACTIVE state ? To request an Extraction action when +** the resource is in the ACTIVE/HEALTHY or ACTIVE/ UNHEALTHY state. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapActionRequest ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiHsActionT Action +); + + +/******************************************************************************* +** +** Name: saHpiResourcePowerStateGet +** +** Description: +** A typical resource supporting hot swap will have the ability to +** control local power on the FRU associated with the resource. During +** insertion, the FRU can be instructed to power on. During extraction +** the FRU can be requested to power off. This function allows the caller +** to retrieve the current power state of the FRU associated with the +** specified resource. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** State - [out] The current power state of the resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** This function returns the actual low-level power state of the FRU, +** regardless of what hot-swap state the resource is in. Not all +** resources supporting managed hot swap will necessarily support this +** function. In particular, resources that use the simplified hot swap +** model may not have the ability to control FRU power. An appropriate +** error code will be returned if the resource does not support power +** control on the FRU. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourcePowerStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiHsPowerStateT *State +); + + +/******************************************************************************* +** +** Name: saHpiResourcePowerStateSet +** +** Description: +** A typical resource supporting hot swap will have to ability to control +** local power on the FRU associated with the resource. During insertion, +** the FRU can be instructed to power on. During extraction the FRU can +** be requested to power off. This function allows the caller to set the +** current power state of the FRU associated with the specified resource. +** +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** State - [in] the new power state that the specified resource will be +** set to. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** This function controls the hardware power on the FRU of what hot-swap +** state the resource is in. For example, it is legal (and may be +** desirable) to cycle power on the FRU even while it is in ACTIVE state +** in order to attempt to clear a fault condition. Similarly, a resource +** could be instructed to power on a FRU even while it is in INACTIVE +** state, for example, in order to run off-line diagnostics. Not all +** resources supporting managed hot swap will necessarily support this +** function. In particular, resources that use the simplified hot swap +** model may not have the ability to control FRU power. An appropriate +** error code will be returned if the resource does not support power +** control on the FRU. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourcePowerStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiHsPowerStateT State +); + + +/******************************************************************************* +** +** Name: saHpiHotSwapIndicatorStateGet +** +** Description: +** A FRU associated with a hot-swappable resource may include a hot swap +** indicator such as a blue LED. This indicator signifies that the FRU is +** ready for removal.. This function allows the caller to retrieve the +** state of this indicator. The returned state is either +** SAHPI_HS_INDICATOR_OFF or SAHPI_HS_INDICATOR_ON. This function will +** return the state of the indicator, regardless of what hot swap state +** the resource is in. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** State - [out] Pointer to location to store state of hot swap +** indicator. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Not all resources supporting managed hot swap will necessarily support +** this function. In particular, resources that use the simplified hot +** swap model may not have the ability to control a FRU hot swap +** indicator (it is likely that none exists). An appropriate error code +** will be returned if the resource does not support control of a hot +** swap indicator on the FRU. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapIndicatorStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiHsIndicatorStateT *State +); + + +/******************************************************************************* +** +** Name: saHpiHotSwapIndicatorStateSet +** +** Description: +** A FRU associated with a hot-swappable resource may include a hot swap +** indicator such as a blue LED. This indicator signifies that the FRU is +** ready for removal. This function allows the caller to set the state of +** this indicator. Valid states include SAHPI_HS_INDICATOR_OFF or +** SAHPI_HS_INDICATOR_ON. This function will set the indicator regardless +** of what hot swap state the resource is in, though it is recommended +** that this function be used only in conjunction with moving the +** resource to the appropriate hot swap state. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource +** State - [in] State of hot swap indicator to be set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Not all resources supporting managed hot swap will necessarily support +** this function. In particular, resources that use the simplified hot +** swap model may not have the ability to control a FRU hot swap +** indicator (it is likely that none exists). An appropriate error code +** will be returned if the resource does not support control of a hot +** swap indicator on the FRU. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapIndicatorStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiHsIndicatorStateT State +); + + +/******************************************************************************* +** +** Name: saHpiParmControl +** +** Description: +** This function allows the user to save and restore parameters +** associated with a specific resource. Valid actions for this function +** include: SAHPI_DEFAULT_PARM Restores the factory default settings for +** a specific resource. Factory defaults include sensor thresholds and +** configurations, and resource- specific configuration parameters. +** SAHPI_SAVE_PARM Stores the resource configuration parameters in +** non-volatile storage. Resource configuration parameters stored in +** non-volatile storage will survive power cycles and resource resets. +** SAHPI_RESTORE_PARM Restores resource configuration parameters from +** non-volatile storage. Resource configuration parameters include sensor +** thresholds and sensor configurations, as well as resource-specific +** parameters. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** Action - [in] Action to perform on resource parameters. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code +** is returned. +** +** Remarks: +** Resource-specific parameters should be documented in an implementation +** guide for the HPI implementation. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiParmControl ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiParmActionT Action +); + + +/******************************************************************************* +** +** Name: saHpiResourceResetStateGet +** +** Description: +** This function gets the reset state of an entity, allowing the user to +** determine if the entity is being held with its reset asserted. If a +** resource manages multiple entities, this function will address the +** entity which is identified in the RPT entry for the resource. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** ResetAction - [out] The current reset state of the entity. Valid reset +** states are: SAHPI_RESET_ASSERT: The entity's reset is asserted, e.g., +** for hot swap insertion/extraction purposes SAHPI_RESET_DEASSERT: The +** entity's reset is not asserted +** +** Return Value: +** SA_OK is returned if the resource has reset control, and the reset +** state has successfully been determined; otherwise, an error code is +** returned. SA_ERR_HPI_INVALID_CMD is returned if the resource has no +** reset control. +** +** Remarks: +** SAHPI_RESET_COLD and SAHPI_RESET_WARM are pulsed resets, and are not +** valid return values for ResetAction. If the entity is not being held +** in reset (using SAHPI_RESET_ASSERT), the appropriate return value is +** SAHPI_RESET_DEASSERT. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceResetStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiResetActionT *ResetAction +); + + +/******************************************************************************* +** +** Name: saHpiResourceResetStateSet +** +** Description: +** This function directs the resource to perform the specified reset type +** on the entity that it manages. If a resource manages multiple +** entities, this function addresses the entity that is identified in the +** RPT entry for the resource. Entities may be reset for a variety of +** reasons. A misbehaving entity may be reset to bring it to a known +** state. In these cases, either a warm reset or a cold reset may be +** performed. A warm reset preserves entity state, whereas a cold reset +** does not. Both of these reset types are pulsed asserted and then +** de-asserted by the HPI implementation. This allows the HPI +** implementation to hold the reset asserted for the appropriate length +** of time, as needed by each entity. saHpiResourceResetStateSet() can +** also be used for insertion and extraction scenarios. A typical +** resource supporting hot swap will have to ability to control local +** reset within the FRU. During insertion, a resource can be instructed +** to assert reset, while the FRU powers on. During extraction a resource +** can be requested to assert reset before the FRU is powered off. This +** function allows the caller to set the reset state of the specified +** FRU. SAHPI_RESET_ASSERT is used to hold the resource in reset; the FRU +** is brought out of the reset state by using either SAHPI_COLD_RESET or +** SAHPI_WARM_RESET. +** +** Parameters: +** SessionId - [in] Handle to session context. +** ResourceId - [in] Resource ID of the addressed resource. +** ResetAction - [in] Type of reset to perform on the entity. Valid reset +** actions are: SAHPI_COLD_RESET: Perform a 'Cold Reset' on the entity +** (pulse), leaving reset de-asserted SAHPI_WARM_RESET: Perform a 'Warm +** Reset' on the entity (pulse), leaving reset de-asserted +** SAHPI_RESET_ASSERT: Put the entity into reset state and hold reset +** asserted, e.g., for hot swap insertion/extraction purposes +** +** Return Value: +** SA_OK is returned if the resource has reset control, and the requested +** reset action has succeeded; otherwise, an error code is returned. +** SA_ERR_HPI_INVALID_CMD is returned if the resource has no reset +** control, or if the requested reset action is not supported by the +** resource. +** +** Remarks: +** Some resources may not support reset, or may only support a subset of +** the defined reset action types. Also, on some resources, cold and warm +** resets may be equivalent. 7 Data Type Definitions +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceResetStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiResetActionT ResetAction +); + + + +#endif + diff --git a/hpiutil/SaHpi.h-B b/hpiutil/SaHpi.h-B new file mode 100644 index 0000000..38d666b --- /dev/null +++ b/hpiutil/SaHpi.h-B @@ -0,0 +1,6785 @@ +/******************************************************************************* +** +** FILE: +** SaHpi.h +** +** DESCRIPTION: +** This file provides the C language binding for the Service +** Availability(TM) Forum Platform Interface. It contains all of +** the prototypes and type definitions. Note, this file was +** generated from the Platform Interface specification document. +** +** SPECIFICATION VERSION: +** SAI-HPI-B.01.01 +** +** DATE: +** Tue Jun 1 2004 09:33 +** +** LEGAL: +** OWNERSHIP OF SPECIFICATION AND COPYRIGHTS. +** The Specification and all worldwide copyrights therein are +** the exclusive property of Licensor. You may not remove, obscure, or +** alter any copyright or other proprietary rights notices that are in or +** on the copy of the Specification you download. You must reproduce all +** such notices on all copies of the Specification you make. Licensor +** may make changes to the Specification, or to items referenced therein, +** at any time without notice. Licensor is not obligated to support or +** update the Specification. +** +** Copyright(c) 2004, Service Availability(TM) Forum. All rights +** reserved. +** +*******************************************************************************/ + +#ifndef __SAHPI_H +#define __SAHPI_H + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Basic Data Types and Values ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* General Types - need to be specified correctly for the host architecture */ + +/* +** It is recommended that these types be defined such that the data sizes +** and alignment of each data type are as indicated. The only requirement +** for source compatibility is that the types be defined to be able to +** contain at least the required data (e.g., at least signed 8-bit values +** must be contained in the data type defined as SaHpiInt8T, etc.) +** Following the full recommendations for data size and alignment, however, +** may promote more binary compatibility. +*/ + +/* The following definitions produce the recommended sizes and alignments +** using the gcc compiler for the i386 (IA-32) platform. +** +** Note, some recent versions of the gcc compiler exhibit an apparent bug +** that makes the __attribute__ statements applied to the typdef's on +** the 64-bit types below ineffective when those types are used in structures. +** To workaround that bug, it may be required to add similar __attribute__ +** statements on the typedefs of the derived types SaHpiTimeT and +** SaHpiTimeoutT, plus on individual 64-bit data items within structure and +** union definitions in order to align the HPI structures as recommended. +** The structures and unions that contain 64-bit data items are: +** SaHpiSensorReadingUnionT, SaHpiSensorDataFormatT, SaHpiEventT, +** SaHpiAnnouncementT, SaHpiDomainInfoT, SaHpiAlarmT, SaHpiEventLogInfoT, +** and SaHpiEventLogEntryT. For more information, see: +** https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109911 +*/ + + +/* unsigned 8-bit data, 1-byte alignment */ +typedef unsigned char SaHpiUint8T; + +/* unsigned 16-bit data, 2-byte alignment */ +typedef unsigned short SaHpiUint16T; + +/* unsigned 32-bit data, 4-byte alignment */ +typedef unsigned int SaHpiUint32T; + +/* unsigned 64-bit data, 8-byte alignment */ +typedef unsigned long long int SaHpiUint64T __attribute__((__aligned__(8))); + +/* signed 8-bit data, 1-byte alignment */ +typedef signed char SaHpiInt8T; + +/* signed 16-bit data, 2-byte alignment */ +typedef signed short SaHpiInt16T; + +/* signed 32-bit data, 4-byte alignment */ +typedef signed int SaHpiInt32T; + +/* signed 64-bit data, 8-byte alignment */ +typedef signed long long int SaHpiInt64T __attribute__((__aligned__(8))); + +/* 64-bit floating point, 8-byte alignment */ +typedef double SaHpiFloat64T __attribute__((__aligned__(8))); + + +typedef SaHpiUint8T SaHpiBoolT; +#define SAHPI_TRUE 1 /* While SAHPI_TRUE = 1, any non-zero + value is also considered to be True + and HPI Users/Implementers of this + specification should not test for + equality against SAHPI_TRUE. */ + +#define SAHPI_FALSE 0 + +/* Platform, O/S, or Vendor dependent */ +#define SAHPI_API +#define SAHPI_IN +#define SAHPI_OUT +#define SAHPI_INOUT + +/* +** Identifier for the manufacturer +** +** This is the IANA-assigned private enterprise number for the +** manufacturer of the resource or FRU, or of the manufacturer +** defining an OEM control or event type. A list of current +** IANA-assigned private enterprise numbers may be obtained at +** +** http://www.iana.org/assignments/enterprise-numbers +** +** If a manufacturer does not currently have an assigned number, one +** may be obtained by following the instructions located at +** +** http://www.iana.org/cgi-bin/enterprise.pl +*/ +typedef SaHpiUint32T SaHpiManufacturerIdT; +#define SAHPI_MANUFACTURER_ID_UNSPECIFIED (SaHpiManufacturerIdT)0 + +/* Version Types */ +typedef SaHpiUint32T SaHpiVersionT; + +/* +** Interface Version +** +** The interface version is the version of the actual interface and not the +** version of the implementation. It is a 24 bit value where +** the most significant 8 bits represent the compatibility level +** (with letters represented as the corresponding numbers); +** the next 8 bits represent the major version number; and +** the least significant 8 bits represent the minor version number. +*/ +#define SAHPI_INTERFACE_VERSION (SaHpiVersionT)0x020101 /* B.01.01 */ + +/* +** Return Codes +** +** SaErrorT is defined in the HPI specification. In the future a +** common SAF types definition may be created to contain this type. At +** that time, this typedef should be removed. Each of the return codes +** is defined in Section 4.1 of the specification. +*/ +typedef SaHpiInt32T SaErrorT; /* Return code */ + +/* +** SA_OK: +*/ +#define SA_OK (SaErrorT)0x0000 + +/* This value is the base for all HPI-specific error codes. */ +#define SA_HPI_ERR_BASE -1000 + +#define SA_ERR_HPI_ERROR (SaErrorT)(SA_HPI_ERR_BASE - 1) +#define SA_ERR_HPI_UNSUPPORTED_API (SaErrorT)(SA_HPI_ERR_BASE - 2) +#define SA_ERR_HPI_BUSY (SaErrorT)(SA_HPI_ERR_BASE - 3) +#define SA_ERR_HPI_INTERNAL_ERROR (SaErrorT)(SA_HPI_ERR_BASE - 4) +#define SA_ERR_HPI_INVALID_CMD (SaErrorT)(SA_HPI_ERR_BASE - 5) +#define SA_ERR_HPI_TIMEOUT (SaErrorT)(SA_HPI_ERR_BASE - 6) +#define SA_ERR_HPI_OUT_OF_SPACE (SaErrorT)(SA_HPI_ERR_BASE - 7) +#define SA_ERR_HPI_OUT_OF_MEMORY (SaErrorT)(SA_HPI_ERR_BASE - 8) +#define SA_ERR_HPI_INVALID_PARAMS (SaErrorT)(SA_HPI_ERR_BASE - 9) +#define SA_ERR_HPI_INVALID_DATA (SaErrorT)(SA_HPI_ERR_BASE - 10) +#define SA_ERR_HPI_NOT_PRESENT (SaErrorT)(SA_HPI_ERR_BASE - 11) +#define SA_ERR_HPI_NO_RESPONSE (SaErrorT)(SA_HPI_ERR_BASE - 12) +#define SA_ERR_HPI_DUPLICATE (SaErrorT)(SA_HPI_ERR_BASE - 13) +#define SA_ERR_HPI_INVALID_SESSION (SaErrorT)(SA_HPI_ERR_BASE - 14) +#define SA_ERR_HPI_INVALID_DOMAIN (SaErrorT)(SA_HPI_ERR_BASE - 15) +#define SA_ERR_HPI_INVALID_RESOURCE (SaErrorT)(SA_HPI_ERR_BASE - 16) +#define SA_ERR_HPI_INVALID_REQUEST (SaErrorT)(SA_HPI_ERR_BASE - 17) +#define SA_ERR_HPI_ENTITY_NOT_PRESENT (SaErrorT)(SA_HPI_ERR_BASE - 18) +#define SA_ERR_HPI_READ_ONLY (SaErrorT)(SA_HPI_ERR_BASE - 19) +#define SA_ERR_HPI_CAPABILITY (SaErrorT)(SA_HPI_ERR_BASE - 20) +#define SA_ERR_HPI_UNKNOWN (SaErrorT)(SA_HPI_ERR_BASE - 21) + +/* +** Domain, Session and Resource Type Definitions +*/ + +/* Domain ID. */ +typedef SaHpiUint32T SaHpiDomainIdT; + +/* The SAHPI_UNSPECIFIED_DOMAIN_ID value is used to specify the default +** domain. +*/ +#define SAHPI_UNSPECIFIED_DOMAIN_ID (SaHpiDomainIdT) 0xFFFFFFFF + +/* Session ID. */ +typedef SaHpiUint32T SaHpiSessionIdT; + +/* Resource identifier. */ +typedef SaHpiUint32T SaHpiResourceIdT; + +/* The SAHPI_UNSPECIFIED_RESOURCE_ID value is used to specify the Domain +** Event Log and to specify that there is no resource for such things as HPI +** User events/alarms. +*/ +#define SAHPI_UNSPECIFIED_RESOURCE_ID (SaHpiResourceIdT) 0xFFFFFFFF + +/* Table Related Type Definitions */ +typedef SaHpiUint32T SaHpiEntryIdT; +#define SAHPI_FIRST_ENTRY (SaHpiEntryIdT)0x00000000 +#define SAHPI_LAST_ENTRY (SaHpiEntryIdT)0xFFFFFFFF +#define SAHPI_ENTRY_UNSPECIFIED SAHPI_FIRST_ENTRY + +/* +** Time Related Type Definitions +** +** An HPI time value represents the local time as the number of nanoseconds +** from 00:00:00, January 1, 1970, in a 64-bit signed integer. This format +** is sufficient to represent times with nano-second resolution from the +** year 1678 to 2262. Every API which deals with time values must define +** the timezone used. +** +** It should be noted that although nano-second resolution is supported +** in the data type, the actual resolution provided by an implementation +** may be more limited than this. +** +** The value -2**63, which is 0x8000000000000000, is used to indicate +** "unknown/unspecified time". +** +** Conversion to/from POSIX and other common time representations is +** relatively straightforward. The following code framgment converts +** between SaHpiTimeT and time_t: +** +** time_t tt1, tt2; +** SaHpiTimeT saHpiTime; +** +** time(&tt1); +** saHpiTime = (SaHpiTimeT) tt1 * 1000000000; +** tt2 = saHpiTime / 1000000000; +** +** The following fragment converts between SaHpiTimeT and a struct timeval: +** +** struct timeval tv1, tv2; +** SaHpiTimeT saHpiTime; +** +** gettimeofday(&tv1, NULL); +** saHpiTime = (SaHpiTimeT) tv1.tv_sec * 1000000000 + tv1.tv_usec * 1000; +** tv2.tv_sec = saHpiTime / 1000000000; +** tv2.tv_usec = saHpiTime % 1000000000 / 1000; +** +** The following fragment converts between SaHpiTimeT and a struct timespec: +** +** struct timespec ts1, ts2; +** SaHpiTimeT saHpiTime; +** +** clock_gettime(CLOCK_REALTIME, &ts1); +** saHpiTime = (SaHpiTimeT) ts1.tv_sec * 1000000000 + ts1.tv_nsec; +** ts2.tv_sec = saHpiTime / 1000000000; +** ts2.tv_nsec = saHpiTime % 1000000000; +** +** Note, however, that since time_t is (effectively) universally 32 bits, +** all of these conversions will cease to work on January 18, 2038. +** +** Some subsystems may need the flexibility to report either absolute or +** relative (eg. to system boot) times. This will typically be in the +** case of a board which may or may not, depending on the system setup, +** have an idea of absolute time. For example, some boards may have +** "time of day" clocks which start at zero, and never get set to the +** time of day. +** +** In these cases, times which represent "current" time (in events, for +** example) can be reported based on the clock value, whether it has been +** set to the actual date/time, or whether it represents the elapsed time +** since boot. If it is the time since boot, the value will be (for 27 +** years) less than 0x0C00000000000000, which is Mon May 26 16:58:48 1997. +** If the value is greater than this, then it can be assumed to be an +** absolute time. +** +** There is no practical need within the interface for expressing dates prior +** to the publication of this specification (which is more than five years +** after the "break point" between relative and absolute time). Thus, in all +** instances a time value should be interpreted as "relative" times if the +** value is less than or equal to SAHPI_TIME_MAX_RELATIVE (but not equal to +** SAHPI_TIME_UNSPECIFIED which always means the time is not available), or +** "absolute" times if the value is greater than SAHPI_TIME_MAX_RELATIVE. +*/ +typedef SaHpiInt64T SaHpiTimeT; /* Time in nanoseconds */ + +/* Unspecified or unknown time */ +#define SAHPI_TIME_UNSPECIFIED (SaHpiTimeT) 0x8000000000000000LL + +/* Maximum time that can be specified as relative */ +#define SAHPI_TIME_MAX_RELATIVE (SaHpiTimeT) 0x0C00000000000000LL +typedef SaHpiInt64T SaHpiTimeoutT; /* Timeout in nanoseconds */ + +/* Non-blocking call */ +#define SAHPI_TIMEOUT_IMMEDIATE (SaHpiTimeoutT) 0x0000000000000000LL + +/* Blocking call, wait indefinitely for call to complete */ +#define SAHPI_TIMEOUT_BLOCK (SaHpiTimeoutT) -1LL + +/* +** Language +** +** This enumeration lists all of the languages that can be associated with text. +** +** SAHPI_LANG_UNDEF indicates that the language is unspecified or +** unknown. +*/ +typedef enum { + SAHPI_LANG_UNDEF = 0, SAHPI_LANG_AFAR, SAHPI_LANG_ABKHAZIAN, + SAHPI_LANG_AFRIKAANS, SAHPI_LANG_AMHARIC, SAHPI_LANG_ARABIC, + SAHPI_LANG_ASSAMESE, SAHPI_LANG_AYMARA, SAHPI_LANG_AZERBAIJANI, + SAHPI_LANG_BASHKIR, SAHPI_LANG_BYELORUSSIAN, SAHPI_LANG_BULGARIAN, + SAHPI_LANG_BIHARI, SAHPI_LANG_BISLAMA, SAHPI_LANG_BENGALI, + SAHPI_LANG_TIBETAN, SAHPI_LANG_BRETON, SAHPI_LANG_CATALAN, + SAHPI_LANG_CORSICAN, SAHPI_LANG_CZECH, SAHPI_LANG_WELSH, + SAHPI_LANG_DANISH, SAHPI_LANG_GERMAN, SAHPI_LANG_BHUTANI, + SAHPI_LANG_GREEK, SAHPI_LANG_ENGLISH, SAHPI_LANG_ESPERANTO, + SAHPI_LANG_SPANISH, SAHPI_LANG_ESTONIAN, SAHPI_LANG_BASQUE, + SAHPI_LANG_PERSIAN, SAHPI_LANG_FINNISH, SAHPI_LANG_FIJI, + SAHPI_LANG_FAEROESE, SAHPI_LANG_FRENCH, SAHPI_LANG_FRISIAN, + SAHPI_LANG_IRISH, SAHPI_LANG_SCOTSGAELIC, SAHPI_LANG_GALICIAN, + SAHPI_LANG_GUARANI, SAHPI_LANG_GUJARATI, SAHPI_LANG_HAUSA, + SAHPI_LANG_HINDI, SAHPI_LANG_CROATIAN, SAHPI_LANG_HUNGARIAN, + SAHPI_LANG_ARMENIAN, SAHPI_LANG_INTERLINGUA, SAHPI_LANG_INTERLINGUE, + SAHPI_LANG_INUPIAK, SAHPI_LANG_INDONESIAN, SAHPI_LANG_ICELANDIC, + SAHPI_LANG_ITALIAN, SAHPI_LANG_HEBREW, SAHPI_LANG_JAPANESE, + SAHPI_LANG_YIDDISH, SAHPI_LANG_JAVANESE, SAHPI_LANG_GEORGIAN, + SAHPI_LANG_KAZAKH, SAHPI_LANG_GREENLANDIC, SAHPI_LANG_CAMBODIAN, + SAHPI_LANG_KANNADA, SAHPI_LANG_KOREAN, SAHPI_LANG_KASHMIRI, + SAHPI_LANG_KURDISH, SAHPI_LANG_KIRGHIZ, SAHPI_LANG_LATIN, + SAHPI_LANG_LINGALA, SAHPI_LANG_LAOTHIAN, SAHPI_LANG_LITHUANIAN, + SAHPI_LANG_LATVIANLETTISH, SAHPI_LANG_MALAGASY, SAHPI_LANG_MAORI, + SAHPI_LANG_MACEDONIAN, SAHPI_LANG_MALAYALAM, SAHPI_LANG_MONGOLIAN, + SAHPI_LANG_MOLDAVIAN, SAHPI_LANG_MARATHI, SAHPI_LANG_MALAY, + SAHPI_LANG_MALTESE, SAHPI_LANG_BURMESE, SAHPI_LANG_NAURU, + SAHPI_LANG_NEPALI, SAHPI_LANG_DUTCH, SAHPI_LANG_NORWEGIAN, + SAHPI_LANG_OCCITAN, SAHPI_LANG_AFANOROMO, SAHPI_LANG_ORIYA, + SAHPI_LANG_PUNJABI, SAHPI_LANG_POLISH, SAHPI_LANG_PASHTOPUSHTO, + SAHPI_LANG_PORTUGUESE, SAHPI_LANG_QUECHUA, SAHPI_LANG_RHAETOROMANCE, + SAHPI_LANG_KIRUNDI, SAHPI_LANG_ROMANIAN, SAHPI_LANG_RUSSIAN, + SAHPI_LANG_KINYARWANDA, SAHPI_LANG_SANSKRIT, SAHPI_LANG_SINDHI, + SAHPI_LANG_SANGRO, SAHPI_LANG_SERBOCROATIAN, SAHPI_LANG_SINGHALESE, + SAHPI_LANG_SLOVAK, SAHPI_LANG_SLOVENIAN, SAHPI_LANG_SAMOAN, + SAHPI_LANG_SHONA, SAHPI_LANG_SOMALI, SAHPI_LANG_ALBANIAN, + SAHPI_LANG_SERBIAN, SAHPI_LANG_SISWATI, SAHPI_LANG_SESOTHO, + SAHPI_LANG_SUDANESE, SAHPI_LANG_SWEDISH, SAHPI_LANG_SWAHILI, + SAHPI_LANG_TAMIL, SAHPI_LANG_TELUGU, SAHPI_LANG_TAJIK, + SAHPI_LANG_THAI, SAHPI_LANG_TIGRINYA, SAHPI_LANG_TURKMEN, + SAHPI_LANG_TAGALOG, SAHPI_LANG_SETSWANA, SAHPI_LANG_TONGA, + SAHPI_LANG_TURKISH, SAHPI_LANG_TSONGA, SAHPI_LANG_TATAR, + SAHPI_LANG_TWI, SAHPI_LANG_UKRAINIAN, SAHPI_LANG_URDU, + SAHPI_LANG_UZBEK, SAHPI_LANG_VIETNAMESE, SAHPI_LANG_VOLAPUK, + SAHPI_LANG_WOLOF, SAHPI_LANG_XHOSA, SAHPI_LANG_YORUBA, + SAHPI_LANG_CHINESE, SAHPI_LANG_ZULU +} SaHpiLanguageT; + +/* +** Text Buffers +** +** These structures are used for defining the type of data in the text buffer +** and the length of the buffer. Text buffers are used in the inventory data, +** RDR, RPT, etc. for variable length strings of data. +** +** The encoding of the Data field in the SaHpiTextBufferT structure is defined +** by the value of the DataType field in the buffer. The following table +** describes the various encodings: +** +** DataType Encoding +** -------- -------- +** +** SAHPI_TL_TYPE_UNICODE 16-bit Unicode, least significant byte first. +** Buffer must contain even number of bytes. +** +** SAHPI_TL_TYPE_BCDPLUS 8-bit ASCII, '0'-'9' or space, dash, period, +** colon, comma, or underscore only. +** +** SAHPI_TL_TYPE_ASCII6 8-bit ASCII, reduced set, 0x20=0x5f only. +** +** SAHPI_TL_TYPE_TEXT 8-bit ASCII+Latin 1 +** +** SAHPI_TL_TYPE_BINARY 8-bit bytes, any values legal +** +** Note: "ASCII+Latin 1" is derived from the first 256 characters of +** Unicode 2.0. The first 256 codes of Unicode follow ISO 646 (ASCII) +** and ISO 8859/1 (Latin 1). The Unicode "C0 Controls and Basic Latin" +** set defines the first 128 8-bit characters (00h-7Fh) and the +** "C1 Controls and Latin 1 Supplement" defines the second 128 (80h-FFh). +** +** Note: The SAHPI_TL_TYPE_BCDPLUS and SAHPI_TL_TYPE_ASCII6 encodings +** use normal ASCII character encodings, but restrict the allowed +** characters to a subset of the entire ASCII character set. These +** encodings are used when the target device contains restrictions +** on which characters it can store or display. SAHPI_TL_TYPE_BCDPLUS +** data may be stored externally as 4-bit values, and +** SAHPI_TL_TYPE_ASCII6 may be stored externally as 6-bit values. +** But, regardless of how the data is stored externally, it is +** encoded as 8-bit ASCII in the SaHpiTextBufferT structure passed +** across the HPI. +*/ + +#define SAHPI_MAX_TEXT_BUFFER_LENGTH 255 + +typedef enum { + SAHPI_TL_TYPE_UNICODE = 0, /* 2-byte UNICODE characters; DataLength + must be even. */ + SAHPI_TL_TYPE_BCDPLUS, /* String of ASCII characters, '0'-'9', space, + dash, period, colon, comma or underscore + ONLY */ + SAHPI_TL_TYPE_ASCII6, /* Reduced ASCII character set: 0x20-0x5F + ONLY */ + SAHPI_TL_TYPE_TEXT, /* ASCII+Latin 1 */ + SAHPI_TL_TYPE_BINARY /* Binary data, any values legal */ +} SaHpiTextTypeT; + +typedef struct { + SaHpiTextTypeT DataType; + SaHpiLanguageT Language; /* Language the text is in. */ + SaHpiUint8T DataLength; /* Bytes used in Data buffer */ + SaHpiUint8T Data[SAHPI_MAX_TEXT_BUFFER_LENGTH]; /* Data buffer */ +} SaHpiTextBufferT; + +/* +** Instrument Id +** +** The following data type is used for all management instrument identifiers - +** sensor numbers, control numbers, watchdog timer numbers, etc. +** +*/ + +typedef SaHpiUint32T SaHpiInstrumentIdT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Entities ********** +********** ********** +******************************************************************************** +*******************************************************************************/ +/* +** Entity Types +** +** Entities are used to associate specific hardware components with sensors, +** controls, watchdogs, or resources. Entities are defined with an entity +** type enumeration, and an entity location number (to identify +** the physical location of a particular type of entity). +** +** Entities are uniquely identified in a system with an ordered series of +** Entity Type / Entity Location pairs called an "Entity Path". Each subsequent +** Entity Type/Entity Location in the path is the next higher "containing" +** entity. The "root" of the Entity Path (the outermost level of containment) +** is designated with an Entity Type of SAHPI_ENT_ROOT if the entire Entity Path +** is fewer than SAHPI_MAX_ENTITY_PATH entries in length. +** +** Enumerated Entity Types include those types enumerated by the IPMI Consortium +** for IPMI-managed entities, as well as additional types defined by the +** HPI specification. Room is left in the enumeration for the inclusion of +** Entity Types taken from other lists, if needed in the future. +*/ +/* Base values for entity types from various sources. */ +#define SAHPI_ENT_IPMI_GROUP 0 +#define SAHPI_ENT_SAFHPI_GROUP 0x10000 +#define SAHPI_ENT_ROOT_VALUE 0xFFFF +typedef enum +{ + SAHPI_ENT_UNSPECIFIED = SAHPI_ENT_IPMI_GROUP, + SAHPI_ENT_OTHER, + SAHPI_ENT_UNKNOWN, + SAHPI_ENT_PROCESSOR, + SAHPI_ENT_DISK_BAY, /* Disk or disk bay */ + SAHPI_ENT_PERIPHERAL_BAY, + SAHPI_ENT_SYS_MGMNT_MODULE, /* System management module */ + SAHPI_ENT_SYSTEM_BOARD, /* Main system board, may also be + processor board and/or internal + expansion board */ + SAHPI_ENT_MEMORY_MODULE, /* Board holding memory devices */ + SAHPI_ENT_PROCESSOR_MODULE, /* Holds processors, use this + designation when processors are not + mounted on system board */ + SAHPI_ENT_POWER_SUPPLY, /* Main power supply (supplies) for the + system */ + SAHPI_ENT_ADD_IN_CARD, + SAHPI_ENT_FRONT_PANEL_BOARD, /* Control panel */ + SAHPI_ENT_BACK_PANEL_BOARD, + SAHPI_ENT_POWER_SYSTEM_BOARD, + SAHPI_ENT_DRIVE_BACKPLANE, + SAHPI_ENT_SYS_EXPANSION_BOARD, /* System internal expansion board + (contains expansion slots). */ + SAHPI_ENT_OTHER_SYSTEM_BOARD, /* Part of board set */ + SAHPI_ENT_PROCESSOR_BOARD, /* Holds 1 or more processors. Includes + boards that hold SECC modules) */ + SAHPI_ENT_POWER_UNIT, /* Power unit / power domain (typically + used as a pre-defined logical entity + for grouping power supplies)*/ + SAHPI_ENT_POWER_MODULE, /* Power module / DC-to-DC converter. + Use this value for internal + converters. Note: You should use + entity ID (power supply) for the + main power supply even if the main + supply is a DC-to-DC converter */ + SAHPI_ENT_POWER_MGMNT, /* Power management/distribution + board */ + SAHPI_ENT_CHASSIS_BACK_PANEL_BOARD, + SAHPI_ENT_SYSTEM_CHASSIS, + SAHPI_ENT_SUB_CHASSIS, + SAHPI_ENT_OTHER_CHASSIS_BOARD, + SAHPI_ENT_DISK_DRIVE_BAY, + SAHPI_ENT_PERIPHERAL_BAY_2, + SAHPI_ENT_DEVICE_BAY, + SAHPI_ENT_COOLING_DEVICE, /* Fan/cooling device */ + SAHPI_ENT_COOLING_UNIT, /* Can be used as a pre-defined logical + entity for grouping fans or other + cooling devices. */ + SAHPI_ENT_INTERCONNECT, /* Cable / interconnect */ + SAHPI_ENT_MEMORY_DEVICE, /* This Entity ID should be used for + replaceable memory devices, e.g. + DIMM/SIMM. It is recommended that + Entity IDs not be used for + individual non-replaceable memory + devices. Rather, monitoring and + error reporting should be associated + with the FRU [e.g. memory card] + holding the memory. */ + SAHPI_ENT_SYS_MGMNT_SOFTWARE, /* System Management Software */ + SAHPI_ENT_BIOS, + SAHPI_ENT_OPERATING_SYSTEM, + SAHPI_ENT_SYSTEM_BUS, + SAHPI_ENT_GROUP, /* This is a logical entity for use with + Entity Association records. It is + provided to allow a sensor data + record to point to an entity- + association record when there is no + appropriate pre-defined logical + entity for the entity grouping. + This Entity should not be used as a + physical entity. */ + SAHPI_ENT_REMOTE, /* Out of band management communication + device */ + SAHPI_ENT_EXTERNAL_ENVIRONMENT, + SAHPI_ENT_BATTERY, + SAHPI_ENT_CHASSIS_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0x90, + SAHPI_ENT_BOARD_SET_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0xB0, + SAHPI_ENT_OEM_SYSINT_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0xD0, + SAHPI_ENT_ROOT = SAHPI_ENT_ROOT_VALUE, + SAHPI_ENT_RACK = SAHPI_ENT_SAFHPI_GROUP, + SAHPI_ENT_SUBRACK, + SAHPI_ENT_COMPACTPCI_CHASSIS, + SAHPI_ENT_ADVANCEDTCA_CHASSIS, + SAHPI_ENT_RACK_MOUNTED_SERVER, + SAHPI_ENT_SYSTEM_BLADE, + SAHPI_ENT_SWITCH, /* Network switch, such as a + rack-mounted ethernet or fabric + switch. */ + SAHPI_ENT_SWITCH_BLADE, /* Network switch, as above, but in + a bladed system. */ + SAHPI_ENT_SBC_BLADE, + SAHPI_ENT_IO_BLADE, + SAHPI_ENT_DISK_BLADE, + SAHPI_ENT_DISK_DRIVE, + SAHPI_ENT_FAN, + SAHPI_ENT_POWER_DISTRIBUTION_UNIT, + SAHPI_ENT_SPEC_PROC_BLADE, /* Special Processing Blade, + including DSP */ + SAHPI_ENT_IO_SUBBOARD, /* I/O Sub-Board, including + PMC I/O board */ + SAHPI_ENT_SBC_SUBBOARD, /* SBC Sub-Board, including PMC + SBC board */ + SAHPI_ENT_ALARM_MANAGER, /* Chassis alarm manager board */ + SAHPI_ENT_SHELF_MANAGER, /* Blade-based shelf manager */ + SAHPI_ENT_DISPLAY_PANEL, /* Display panel, such as an + alarm display panel. */ + SAHPI_ENT_SUBBOARD_CARRIER_BLADE, /* Includes PMC Carrier Blade -- + Use only if "carrier" is only + function of blade. Else use + primary function (SBC_BLADE, + DSP_BLADE, etc.). */ + SAHPI_ENT_PHYSICAL_SLOT /* Indicates the physical slot into + which a blade is inserted. */ +} SaHpiEntityTypeT; + +typedef SaHpiUint32T SaHpiEntityLocationT; + +typedef struct { + SaHpiEntityTypeT EntityType; + SaHpiEntityLocationT EntityLocation; +} SaHpiEntityT; + + +#define SAHPI_MAX_ENTITY_PATH 16 + +typedef struct { + SaHpiEntityT Entry[SAHPI_MAX_ENTITY_PATH]; +} SaHpiEntityPathT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Events, part 1 ********** +********** ********** +******************************************************************************** +*******************************************************************************/ +/* +** Category +** +** Sensor events contain an event category and event state. Depending on the +** event category, the event states take on different meanings for events +** generated by specific sensors. +** +** It is recommended that implementations map their sensor specific +** event categories into the set of categories listed here. When such a mapping +** is impractical or impossible, the SAHPI_EC_SENSOR_SPECIFIC category should +** be used. +** +** The SAHPI_EC_GENERIC category can be used for discrete sensors which have +** state meanings other than those identified with other event categories. +*/ +typedef SaHpiUint8T SaHpiEventCategoryT; + +#define SAHPI_EC_UNSPECIFIED (SaHpiEventCategoryT)0x00 /* Unspecified */ +#define SAHPI_EC_THRESHOLD (SaHpiEventCategoryT)0x01 /* Threshold + events */ +#define SAHPI_EC_USAGE (SaHpiEventCategoryT)0x02 /* Usage state + events */ +#define SAHPI_EC_STATE (SaHpiEventCategoryT)0x03 /* Generic state + events */ +#define SAHPI_EC_PRED_FAIL (SaHpiEventCategoryT)0x04 /* Predictive fail + events */ +#define SAHPI_EC_LIMIT (SaHpiEventCategoryT)0x05 /* Limit events */ +#define SAHPI_EC_PERFORMANCE (SaHpiEventCategoryT)0x06 /* Performance + events */ +#define SAHPI_EC_SEVERITY (SaHpiEventCategoryT)0x07 /* Severity + indicating + events */ +#define SAHPI_EC_PRESENCE (SaHpiEventCategoryT)0x08 /* Device presence + events */ +#define SAHPI_EC_ENABLE (SaHpiEventCategoryT)0x09 /* Device enabled + events */ +#define SAHPI_EC_AVAILABILITY (SaHpiEventCategoryT)0x0A /* Availability + state events */ +#define SAHPI_EC_REDUNDANCY (SaHpiEventCategoryT)0x0B /* Redundancy + state events */ +#define SAHPI_EC_SENSOR_SPECIFIC (SaHpiEventCategoryT)0x7E /* Sensor- + specific events */ +#define SAHPI_EC_GENERIC (SaHpiEventCategoryT)0x7F /* OEM defined + events */ + +/* +** Event States +** +** The following event states are specified relative to the categories listed +** above. The event types are only valid for their given category. Each set of +** events is labeled as to which category it belongs to. +** Each event will have only one event state associated with it. When retrieving +** the event status or event enabled status a bit mask of all applicable event +** states is used. Similarly, when setting the event enabled status a bit mask +** of all applicable event states is used. +*/ +typedef SaHpiUint16T SaHpiEventStateT; + +/* +** SaHpiEventCategoryT == +*/ +#define SAHPI_ES_UNSPECIFIED (SaHpiEventStateT)0x0000 + +/* +** SaHpiEventCategoryT == SAHPI_EC_THRESHOLD +** When using these event states, the event state should match +** the event severity (for example SAHPI_ES_LOWER_MINOR should have an +** event severity of SAHPI_MINOR). +*/ +#define SAHPI_ES_LOWER_MINOR (SaHpiEventStateT)0x0001 +#define SAHPI_ES_LOWER_MAJOR (SaHpiEventStateT)0x0002 +#define SAHPI_ES_LOWER_CRIT (SaHpiEventStateT)0x0004 +#define SAHPI_ES_UPPER_MINOR (SaHpiEventStateT)0x0008 +#define SAHPI_ES_UPPER_MAJOR (SaHpiEventStateT)0x0010 +#define SAHPI_ES_UPPER_CRIT (SaHpiEventStateT)0x0020 + +/* SaHpiEventCategoryT == SAHPI_EC_USAGE */ +#define SAHPI_ES_IDLE (SaHpiEventStateT)0x0001 +#define SAHPI_ES_ACTIVE (SaHpiEventStateT)0x0002 +#define SAHPI_ES_BUSY (SaHpiEventStateT)0x0004 + +/* SaHpiEventCategoryT == SAHPI_EC_STATE */ +#define SAHPI_ES_STATE_DEASSERTED (SaHpiEventStateT)0x0001 +#define SAHPI_ES_STATE_ASSERTED (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_PRED_FAIL */ +#define SAHPI_ES_PRED_FAILURE_DEASSERT (SaHpiEventStateT)0x0001 +#define SAHPI_ES_PRED_FAILURE_ASSERT (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_LIMIT */ +#define SAHPI_ES_LIMIT_NOT_EXCEEDED (SaHpiEventStateT)0x0001 +#define SAHPI_ES_LIMIT_EXCEEDED (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_PERFORMANCE */ +#define SAHPI_ES_PERFORMANCE_MET (SaHpiEventStateT)0x0001 +#define SAHPI_ES_PERFORMANCE_LAGS (SaHpiEventStateT)0x0002 + +/* +** SaHpiEventCategoryT == SAHPI_EC_SEVERITY +** When using these event states, the event state should match +** the event severity +*/ +#define SAHPI_ES_OK (SaHpiEventStateT)0x0001 +#define SAHPI_ES_MINOR_FROM_OK (SaHpiEventStateT)0x0002 +#define SAHPI_ES_MAJOR_FROM_LESS (SaHpiEventStateT)0x0004 +#define SAHPI_ES_CRITICAL_FROM_LESS (SaHpiEventStateT)0x0008 +#define SAHPI_ES_MINOR_FROM_MORE (SaHpiEventStateT)0x0010 +#define SAHPI_ES_MAJOR_FROM_CRITICAL (SaHpiEventStateT)0x0020 +#define SAHPI_ES_CRITICAL (SaHpiEventStateT)0x0040 +#define SAHPI_ES_MONITOR (SaHpiEventStateT)0x0080 +#define SAHPI_ES_INFORMATIONAL (SaHpiEventStateT)0x0100 + +/* SaHpiEventCategoryT == SAHPI_EC_PRESENCE */ +#define SAHPI_ES_ABSENT (SaHpiEventStateT)0x0001 +#define SAHPI_ES_PRESENT (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_ENABLE */ +#define SAHPI_ES_DISABLED (SaHpiEventStateT)0x0001 +#define SAHPI_ES_ENABLED (SaHpiEventStateT)0x0002 + +/* SaHpiEventCategoryT == SAHPI_EC_AVAILABILITY */ +#define SAHPI_ES_RUNNING (SaHpiEventStateT)0x0001 +#define SAHPI_ES_TEST (SaHpiEventStateT)0x0002 +#define SAHPI_ES_POWER_OFF (SaHpiEventStateT)0x0004 +#define SAHPI_ES_ON_LINE (SaHpiEventStateT)0x0008 +#define SAHPI_ES_OFF_LINE (SaHpiEventStateT)0x0010 +#define SAHPI_ES_OFF_DUTY (SaHpiEventStateT)0x0020 +#define SAHPI_ES_DEGRADED (SaHpiEventStateT)0x0040 +#define SAHPI_ES_POWER_SAVE (SaHpiEventStateT)0x0080 +#define SAHPI_ES_INSTALL_ERROR (SaHpiEventStateT)0x0100 + +/* SaHpiEventCategoryT == SAHPI_EC_REDUNDANCY */ +#define SAHPI_ES_FULLY_REDUNDANT (SaHpiEventStateT)0x0001 +#define SAHPI_ES_REDUNDANCY_LOST (SaHpiEventStateT)0x0002 +#define SAHPI_ES_REDUNDANCY_DEGRADED (SaHpiEventStateT)0x0004 +#define SAHPI_ES_REDUNDANCY_LOST_SUFFICIENT_RESOURCES \ + (SaHpiEventStateT)0x0008 +#define SAHPI_ES_NON_REDUNDANT_SUFFICIENT_RESOURCES \ + (SaHpiEventStateT)0x0010 +#define SAHPI_ES_NON_REDUNDANT_INSUFFICIENT_RESOURCES \ + (SaHpiEventStateT)0x0020 +#define SAHPI_ES_REDUNDANCY_DEGRADED_FROM_FULL (SaHpiEventStateT)0x0040 +#define SAHPI_ES_REDUNDANCY_DEGRADED_FROM_NON (SaHpiEventStateT)0x0080 + +/* +** SaHpiEventCategoryT == SAHPI_EC_GENERIC || SAHPI_EC_SENSOR_SPECIFIC +** These event states are implementation-specific. +*/ +#define SAHPI_ES_STATE_00 (SaHpiEventStateT)0x0001 +#define SAHPI_ES_STATE_01 (SaHpiEventStateT)0x0002 +#define SAHPI_ES_STATE_02 (SaHpiEventStateT)0x0004 +#define SAHPI_ES_STATE_03 (SaHpiEventStateT)0x0008 +#define SAHPI_ES_STATE_04 (SaHpiEventStateT)0x0010 +#define SAHPI_ES_STATE_05 (SaHpiEventStateT)0x0020 +#define SAHPI_ES_STATE_06 (SaHpiEventStateT)0x0040 +#define SAHPI_ES_STATE_07 (SaHpiEventStateT)0x0080 +#define SAHPI_ES_STATE_08 (SaHpiEventStateT)0x0100 +#define SAHPI_ES_STATE_09 (SaHpiEventStateT)0x0200 +#define SAHPI_ES_STATE_10 (SaHpiEventStateT)0x0400 +#define SAHPI_ES_STATE_11 (SaHpiEventStateT)0x0800 +#define SAHPI_ES_STATE_12 (SaHpiEventStateT)0x1000 +#define SAHPI_ES_STATE_13 (SaHpiEventStateT)0x2000 +#define SAHPI_ES_STATE_14 (SaHpiEventStateT)0x4000 + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Sensors ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Sensor Number */ +typedef SaHpiInstrumentIdT SaHpiSensorNumT; +/* The following specifies the named range for standard sensor numbers. */ +#define SAHPI_STANDARD_SENSOR_MIN (SaHpiSensorNumT)0x00000100 +#define SAHPI_STANDARD_SENSOR_MAX (SaHpiSensorNumT)0x000001FF + +/* Type of Sensor */ +typedef enum { + SAHPI_TEMPERATURE = 0x01, + SAHPI_VOLTAGE, + SAHPI_CURRENT, + SAHPI_FAN, + SAHPI_PHYSICAL_SECURITY, + SAHPI_PLATFORM_VIOLATION, + SAHPI_PROCESSOR, + SAHPI_POWER_SUPPLY, + SAHPI_POWER_UNIT, + SAHPI_COOLING_DEVICE, + SAHPI_OTHER_UNITS_BASED_SENSOR, + SAHPI_MEMORY, + SAHPI_DRIVE_SLOT, + SAHPI_POST_MEMORY_RESIZE, + SAHPI_SYSTEM_FW_PROGRESS, + SAHPI_EVENT_LOGGING_DISABLED, + SAHPI_RESERVED1, + SAHPI_SYSTEM_EVENT, + SAHPI_CRITICAL_INTERRUPT, + SAHPI_BUTTON, + SAHPI_MODULE_BOARD, + SAHPI_MICROCONTROLLER_COPROCESSOR, + SAHPI_ADDIN_CARD, + SAHPI_CHASSIS, + SAHPI_CHIP_SET, + SAHPI_OTHER_FRU, + SAHPI_CABLE_INTERCONNECT, + SAHPI_TERMINATOR, + SAHPI_SYSTEM_BOOT_INITIATED, + SAHPI_BOOT_ERROR, + SAHPI_OS_BOOT, + SAHPI_OS_CRITICAL_STOP, + SAHPI_SLOT_CONNECTOR, + SAHPI_SYSTEM_ACPI_POWER_STATE, + SAHPI_RESERVED2, + SAHPI_PLATFORM_ALERT, + SAHPI_ENTITY_PRESENCE, + SAHPI_MONITOR_ASIC_IC, + SAHPI_LAN, + SAHPI_MANAGEMENT_SUBSYSTEM_HEALTH, + SAHPI_BATTERY, + SAHPI_OPERATIONAL = 0xA0, + SAHPI_OEM_SENSOR=0xC0 +} SaHpiSensorTypeT; + +/* +** Sensor Reading Type +** +** These definitions list the available data types that can be +** used for sensor readings. +** +*/ + +#define SAHPI_SENSOR_BUFFER_LENGTH 32 + +typedef enum { + SAHPI_SENSOR_READING_TYPE_INT64, + SAHPI_SENSOR_READING_TYPE_UINT64, + SAHPI_SENSOR_READING_TYPE_FLOAT64, + SAHPI_SENSOR_READING_TYPE_BUFFER /* 32 byte array. The format of + the buffer is implementation- + specific. Sensors that use + this reading type may not have + thresholds that are settable + or readable. */ +} SaHpiSensorReadingTypeT; + +typedef union { + SaHpiInt64T SensorInt64; + SaHpiUint64T SensorUint64; + SaHpiFloat64T SensorFloat64; + SaHpiUint8T SensorBuffer[SAHPI_SENSOR_BUFFER_LENGTH]; +} SaHpiSensorReadingUnionT; + +/* +** Sensor Reading +** +** The sensor reading data structure is returned from a call to get +** sensor reading. The structure is also used when setting and getting sensor +** threshold values and reporting sensor ranges. +** +** IsSupported is set when a sensor reading/threshold value is available. +** Otherwise, if no reading or threshold is supported, this flag is set to +** False. +** +*/ + +typedef struct { + SaHpiBoolT IsSupported; + SaHpiSensorReadingTypeT Type; + SaHpiSensorReadingUnionT Value; +} SaHpiSensorReadingT; + + +/* Sensor Event Mask Actions - used with saHpiSensorEventMasksSet() */ + +typedef enum { + SAHPI_SENS_ADD_EVENTS_TO_MASKS, + SAHPI_SENS_REMOVE_EVENTS_FROM_MASKS +} SaHpiSensorEventMaskActionT; + +/* Value to use for AssertEvents or DeassertEvents parameter + in saHpiSensorEventMasksSet() to set or clear all supported + event states for a sensor in the mask */ + +#define SAHPI_ALL_EVENT_STATES (SaHpiEventStateT)0xFFFF + +/* +** Threshold Values +** This structure encompasses all of the thresholds that can be set. +** These are set and read with the same units as sensors report in +** saHpiSensorReadingGet(). When hysteresis is not constant over the +** range of sensor values, it is calculated at the nominal sensor reading, +** as given in the Range field of the sensor RDR. +** +** Thresholds are required to be set in-order (such that the setting for +** UpCritical is greater than or equal to the setting for UpMajor, etc.).*/ + +typedef struct { + SaHpiSensorReadingT LowCritical; /* Lower Critical Threshold */ + SaHpiSensorReadingT LowMajor; /* Lower Major Threshold */ + SaHpiSensorReadingT LowMinor; /* Lower Minor Threshold */ + SaHpiSensorReadingT UpCritical; /* Upper critical Threshold */ + SaHpiSensorReadingT UpMajor; /* Upper major Threshold */ + SaHpiSensorReadingT UpMinor; /* Upper minor Threshold */ + SaHpiSensorReadingT PosThdHysteresis; /* Positive Threshold Hysteresis */ + SaHpiSensorReadingT NegThdHysteresis; /* Negative Threshold Hysteresis */ +}SaHpiSensorThresholdsT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Sensor Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** Sensor Range +** Sensor range values can include minimum, maximum, normal minimum, normal +** maximum, and nominal values. +** +** Sensor thresholds cannot be set outside of the range defined by SAHPI_SRF_MIN +** through SAHPI_SRF_MAX, if these limits are present (as indicated by the +** SaHpiSensorRangeFlagsT). If the MIN limit is not present, no lower bound +** will be enforced on sensor thresholds. If the MAX limit is not present, no +** upper bound will be enforced on sensor thresholds. +*/ +typedef SaHpiUint8T SaHpiSensorRangeFlagsT; +#define SAHPI_SRF_MIN (SaHpiSensorRangeFlagsT)0x10 +#define SAHPI_SRF_MAX (SaHpiSensorRangeFlagsT)0x08 +#define SAHPI_SRF_NORMAL_MIN (SaHpiSensorRangeFlagsT)0x04 +#define SAHPI_SRF_NORMAL_MAX (SaHpiSensorRangeFlagsT)0x02 +#define SAHPI_SRF_NOMINAL (SaHpiSensorRangeFlagsT)0x01 + +typedef struct { + SaHpiSensorRangeFlagsT Flags; + SaHpiSensorReadingT Max; + SaHpiSensorReadingT Min; + SaHpiSensorReadingT Nominal; + SaHpiSensorReadingT NormalMax; + SaHpiSensorReadingT NormalMin; +} SaHpiSensorRangeT; + +/* +** Sensor Units +** This is a list of all the sensor units supported by HPI. +*/ +typedef enum { + SAHPI_SU_UNSPECIFIED = 0, SAHPI_SU_DEGREES_C, SAHPI_SU_DEGREES_F, + SAHPI_SU_DEGREES_K, SAHPI_SU_VOLTS, SAHPI_SU_AMPS, + SAHPI_SU_WATTS, SAHPI_SU_JOULES, SAHPI_SU_COULOMBS, + SAHPI_SU_VA, SAHPI_SU_NITS, SAHPI_SU_LUMEN, + SAHPI_SU_LUX, SAHPI_SU_CANDELA, SAHPI_SU_KPA, + SAHPI_SU_PSI, SAHPI_SU_NEWTON, SAHPI_SU_CFM, + SAHPI_SU_RPM, SAHPI_SU_HZ, SAHPI_SU_MICROSECOND, + SAHPI_SU_MILLISECOND, SAHPI_SU_SECOND, SAHPI_SU_MINUTE, + SAHPI_SU_HOUR, SAHPI_SU_DAY, SAHPI_SU_WEEK, + SAHPI_SU_MIL, SAHPI_SU_INCHES, SAHPI_SU_FEET, + SAHPI_SU_CU_IN, SAHPI_SU_CU_FEET, SAHPI_SU_MM, + SAHPI_SU_CM, SAHPI_SU_M, SAHPI_SU_CU_CM, + SAHPI_SU_CU_M, SAHPI_SU_LITERS, SAHPI_SU_FLUID_OUNCE, + SAHPI_SU_RADIANS, SAHPI_SU_STERADIANS, SAHPI_SU_REVOLUTIONS, + SAHPI_SU_CYCLES, SAHPI_SU_GRAVITIES, SAHPI_SU_OUNCE, + SAHPI_SU_POUND, SAHPI_SU_FT_LB, SAHPI_SU_OZ_IN, + SAHPI_SU_GAUSS, SAHPI_SU_GILBERTS, SAHPI_SU_HENRY, + SAHPI_SU_MILLIHENRY, SAHPI_SU_FARAD, SAHPI_SU_MICROFARAD, + SAHPI_SU_OHMS, SAHPI_SU_SIEMENS, SAHPI_SU_MOLE, + SAHPI_SU_BECQUEREL, SAHPI_SU_PPM, SAHPI_SU_RESERVED, + SAHPI_SU_DECIBELS, SAHPI_SU_DBA, SAHPI_SU_DBC, + SAHPI_SU_GRAY, SAHPI_SU_SIEVERT, SAHPI_SU_COLOR_TEMP_DEG_K, + SAHPI_SU_BIT, SAHPI_SU_KILOBIT, SAHPI_SU_MEGABIT, + SAHPI_SU_GIGABIT, SAHPI_SU_BYTE, SAHPI_SU_KILOBYTE, + SAHPI_SU_MEGABYTE, SAHPI_SU_GIGABYTE, SAHPI_SU_WORD, + SAHPI_SU_DWORD, SAHPI_SU_QWORD, SAHPI_SU_LINE, + SAHPI_SU_HIT, SAHPI_SU_MISS, SAHPI_SU_RETRY, + SAHPI_SU_RESET, SAHPI_SU_OVERRUN, SAHPI_SU_UNDERRUN, + SAHPI_SU_COLLISION, SAHPI_SU_PACKETS, SAHPI_SU_MESSAGES, + SAHPI_SU_CHARACTERS, SAHPI_SU_ERRORS, SAHPI_SU_CORRECTABLE_ERRORS, + SAHPI_SU_UNCORRECTABLE_ERRORS +} SaHpiSensorUnitsT; + +/* +** Modifier Unit Use +** This type defines how the modifier unit is used. For example: base unit == +** meter, modifier unit == seconds, and modifier unit use == +** SAHPI_SMUU_BASIC_OVER_MODIFIER. The resulting unit would be meters per +** second. +*/ +typedef enum { + SAHPI_SMUU_NONE = 0, + SAHPI_SMUU_BASIC_OVER_MODIFIER, /* Basic Unit / Modifier Unit */ + SAHPI_SMUU_BASIC_TIMES_MODIFIER /* Basic Unit * Modifier Unit */ +} SaHpiSensorModUnitUseT; + +/* +** Data Format +** When IsSupported is False, the sensor does not support data readings +** (it only supports event states). A False setting for this flag +** indicates that the rest of the structure is not meaningful. +** +** This structure encapsulates all of the various types that make up the +** definition of sensor data. For reading type of +** SAHPI_SENSOR_READING_TYPE_BUFFER, the rest of the structure +** (beyond ReadingType) is not meaningful. +** +** The Accuracy Factor is expressed as a floating point percentage +** (e.g. 0.05 = 5%) and represents statistically how close the measured +** reading is to the actual value. It is an interpreted value that +** figures in all sensor accuracies, resolutions, and tolerances. +*/ + +typedef struct { + SaHpiBoolT IsSupported; /* Indicates if sensor data + readings are supported.*/ + SaHpiSensorReadingTypeT ReadingType; /* Type of value for sensor + reading. */ + SaHpiSensorUnitsT BaseUnits; /* Base units (meters, etc.) */ + SaHpiSensorUnitsT ModifierUnits; /* Modifier unit (second, etc.)*/ + SaHpiSensorModUnitUseT ModifierUse; /* Modifier use(m/sec, etc.) */ + SaHpiBoolT Percentage; /* Is value a percentage */ + SaHpiSensorRangeT Range; /* Valid range of sensor */ + SaHpiFloat64T AccuracyFactor; /* Accuracy */ +} SaHpiSensorDataFormatT; + +/* +** Threshold Support +** +** These types define what threshold values are readable and writable. +** Thresholds are read/written in the same ReadingType as is used for sensor +** readings. +*/ +typedef SaHpiUint8T SaHpiSensorThdMaskT; +#define SAHPI_STM_LOW_MINOR (SaHpiSensorThdMaskT)0x01 +#define SAHPI_STM_LOW_MAJOR (SaHpiSensorThdMaskT)0x02 +#define SAHPI_STM_LOW_CRIT (SaHpiSensorThdMaskT)0x04 +#define SAHPI_STM_UP_MINOR (SaHpiSensorThdMaskT)0x08 +#define SAHPI_STM_UP_MAJOR (SaHpiSensorThdMaskT)0x10 +#define SAHPI_STM_UP_CRIT (SaHpiSensorThdMaskT)0x20 +#define SAHPI_STM_UP_HYSTERESIS (SaHpiSensorThdMaskT)0x40 +#define SAHPI_STM_LOW_HYSTERESIS (SaHpiSensorThdMaskT)0x80 + +typedef struct { + SaHpiBoolT IsAccessible; /* True if the sensor + supports readable or writable + thresholds. If False, + rest of structure is not + meaningful. Sensors that have the + IsAccessible flag set must also + support the threshold event category + A sensor of reading type SAHPI_ + SENSOR_READING_TYPE_BUFFER cannot + have accessible thresholds.*/ + SaHpiSensorThdMaskT ReadThold; /* Readable thresholds */ + SaHpiSensorThdMaskT WriteThold; /* Writable thresholds */ + SaHpiBoolT Nonlinear; /* If this flag is set, hysteresis + values are calculated at the nominal + sensor value. */ +} SaHpiSensorThdDefnT; + +/* +** Event Control +** +** This type defines how sensor event messages can be controlled (can be turned +** off and on for each type of event, etc.). +*/ +typedef enum { + SAHPI_SEC_PER_EVENT = 0, /* Event message control per event, + or by entire sensor; sensor event enable + status can be changed, and assert/deassert + masks can be changed */ + SAHPI_SEC_READ_ONLY_MASKS, /* Control for entire sensor only; sensor + event enable status can be changed, but + assert/deassert masks cannot be changed */ + SAHPI_SEC_READ_ONLY /* Event control not supported; sensor event + enable status cannot be changed and + assert/deassert masks cannot be changed */ +} SaHpiSensorEventCtrlT; + +/* +** Record +** +** This is the sensor resource data record which describes all of the static +** data associated with a sensor. +*/ +typedef struct { + SaHpiSensorNumT Num; /* Sensor Number/Index */ + SaHpiSensorTypeT Type; /* General Sensor Type */ + SaHpiEventCategoryT Category; /* Event category */ + SaHpiBoolT EnableCtrl; /* True if HPI User can enable + or disable sensor via + saHpiSensorEnableSet() */ + SaHpiSensorEventCtrlT EventCtrl; /* How events can be controlled */ + SaHpiEventStateT Events; /* Bit mask of event states + supported */ + SaHpiSensorDataFormatT DataFormat; /* Format of the data */ + SaHpiSensorThdDefnT ThresholdDefn; /* Threshold Definition */ + SaHpiUint32T Oem; /* Reserved for OEM use */ +} SaHpiSensorRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Aggregate Status ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* These are the default sensor numbers for aggregate status. */ +#define SAHPI_DEFAGSENS_OPER (SaHpiSensorNumT)0x00000100 +#define SAHPI_DEFAGSENS_PWR (SaHpiSensorNumT)0x00000101 +#define SAHPI_DEFAGSENS_TEMP (SaHpiSensorNumT)0x00000102 + +/* The following specifies the named range for aggregate status. */ +#define SAHPI_DEFAGSENS_MIN (SaHpiSensorNumT)0x00000100 +#define SAHPI_DEFAGSENS_MAX (SaHpiSensorNumT)0x0000010F + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Controls ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Control Number */ +typedef SaHpiInstrumentIdT SaHpiCtrlNumT; + +/* +** Type of Control +** +** This enumerated type defines the different types of generic controls. +*/ +typedef enum { + SAHPI_CTRL_TYPE_DIGITAL = 0x00, + SAHPI_CTRL_TYPE_DISCRETE, + SAHPI_CTRL_TYPE_ANALOG, + SAHPI_CTRL_TYPE_STREAM, + SAHPI_CTRL_TYPE_TEXT, + SAHPI_CTRL_TYPE_OEM = 0xC0 +} SaHpiCtrlTypeT; + +/* +** Control State Type Definitions +*/ + +/* +** Digital Control State Definition +** +** Defines the types of digital control states. +** Any of the four states may be set using saHpiControlSet(). +** Only ON or OFF are appropriate returns from saHpiControlGet(). +** (PULSE_ON and PULSE_OFF are transitory and end in OFF and ON states, +** respectively.) +** OFF - the control is off +** ON - the control is on +** PULSE_OFF - the control is briefly turned off, and then turned back on +** PULSE_ON - the control is briefly turned on, and then turned back off +** +*/ +typedef enum { + SAHPI_CTRL_STATE_OFF = 0, + SAHPI_CTRL_STATE_ON, + SAHPI_CTRL_STATE_PULSE_OFF, + SAHPI_CTRL_STATE_PULSE_ON +} SaHpiCtrlStateDigitalT; + +/* +** Discrete Control State Definition +*/ +typedef SaHpiUint32T SaHpiCtrlStateDiscreteT; + +/* +** Analog Control State Definition +*/ +typedef SaHpiInt32T SaHpiCtrlStateAnalogT; + +/* +** Stream Control State Definition +*/ +#define SAHPI_CTRL_MAX_STREAM_LENGTH 4 +typedef struct { + SaHpiBoolT Repeat; /* Repeat flag */ + SaHpiUint32T StreamLength; /* Length of the data, in bytes, + stored in the stream. */ + SaHpiUint8T Stream[SAHPI_CTRL_MAX_STREAM_LENGTH]; +} SaHpiCtrlStateStreamT; + +/* +** Text Control State Definition +*/ +typedef SaHpiUint8T SaHpiTxtLineNumT; + +/* Reserved number for sending output to all lines */ +#define SAHPI_TLN_ALL_LINES (SaHpiTxtLineNumT)0x00 + +typedef struct { + SaHpiTxtLineNumT Line; /* Operate on line # */ + SaHpiTextBufferT Text; /* Text to display */ +} SaHpiCtrlStateTextT; + +/* +** OEM Control State Definition +*/ +#define SAHPI_CTRL_MAX_OEM_BODY_LENGTH 255 +typedef struct { + SaHpiManufacturerIdT MId; + SaHpiUint8T BodyLength; + SaHpiUint8T Body[SAHPI_CTRL_MAX_OEM_BODY_LENGTH]; /* OEM Specific */ +} SaHpiCtrlStateOemT; + +typedef union { + SaHpiCtrlStateDigitalT Digital; + SaHpiCtrlStateDiscreteT Discrete; + SaHpiCtrlStateAnalogT Analog; + SaHpiCtrlStateStreamT Stream; + SaHpiCtrlStateTextT Text; + SaHpiCtrlStateOemT Oem; +} SaHpiCtrlStateUnionT; + +typedef struct { + SaHpiCtrlTypeT Type; /* Type of control */ + SaHpiCtrlStateUnionT StateUnion; /* Data for control type */ +} SaHpiCtrlStateT; +/* +** Control Mode Type Definition +** +** Controls may be in either AUTO mode or MANUAL mode. +** +*/ +typedef enum { + SAHPI_CTRL_MODE_AUTO, + SAHPI_CTRL_MODE_MANUAL +} SaHpiCtrlModeT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Control Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** Output Type +** +** This enumeration defines the what the control's output will be. +*/ +typedef enum { + SAHPI_CTRL_GENERIC = 0, + SAHPI_CTRL_LED, + SAHPI_CTRL_FAN_SPEED, + SAHPI_CTRL_DRY_CONTACT_CLOSURE, + SAHPI_CTRL_POWER_SUPPLY_INHIBIT, + SAHPI_CTRL_AUDIBLE, + SAHPI_CTRL_FRONT_PANEL_LOCKOUT, + SAHPI_CTRL_POWER_INTERLOCK, + SAHPI_CTRL_POWER_STATE, + SAHPI_CTRL_LCD_DISPLAY, + SAHPI_CTRL_OEM +} SaHpiCtrlOutputTypeT; + +/* +** Specific Record Types +** These types represent the specific types of control resource data records. +*/ +typedef struct { + SaHpiCtrlStateDigitalT Default; +} SaHpiCtrlRecDigitalT; + +typedef struct { + SaHpiCtrlStateDiscreteT Default; +} SaHpiCtrlRecDiscreteT; + +typedef struct { + SaHpiCtrlStateAnalogT Min; /* Minimum Value */ + SaHpiCtrlStateAnalogT Max; /* Maximum Value */ + SaHpiCtrlStateAnalogT Default; +} SaHpiCtrlRecAnalogT; + +typedef struct { + SaHpiCtrlStateStreamT Default; +} SaHpiCtrlRecStreamT; + +typedef struct { + SaHpiUint8T MaxChars; /* Maximum chars per line. + If the control DataType is + SAHPI_TL_TYPE_UNICODE, there will + be two bytes required for each + character. This field reports the + number of characters per line- not the + number of bytes. MaxChars must not be + larger than the number of characters + that can be placed in a single + SaHpiTextBufferT structure. */ + SaHpiUint8T MaxLines; /* Maximum # of lines */ + SaHpiLanguageT Language; /* Language Code */ + SaHpiTextTypeT DataType; /* Permitted Data */ + SaHpiCtrlStateTextT Default; +} SaHpiCtrlRecTextT; + +#define SAHPI_CTRL_OEM_CONFIG_LENGTH 10 +typedef struct { + SaHpiManufacturerIdT MId; + SaHpiUint8T ConfigData[SAHPI_CTRL_OEM_CONFIG_LENGTH]; + SaHpiCtrlStateOemT Default; +} SaHpiCtrlRecOemT; + +typedef union { + SaHpiCtrlRecDigitalT Digital; + SaHpiCtrlRecDiscreteT Discrete; + SaHpiCtrlRecAnalogT Analog; + SaHpiCtrlRecStreamT Stream; + SaHpiCtrlRecTextT Text; + SaHpiCtrlRecOemT Oem; +} SaHpiCtrlRecUnionT; + +/* +** Default Control Mode Structure +** This structure tells an HPI User if the control comes up in Auto mode or +** in Manual mode, by default. It also indicates if the mode can be +** changed (using saHpiControlSet()). When ReadOnly is False, the mode +** can be changed from its default setting; otherwise attempting to +** change the mode will result in an error. +*/ +typedef struct { + SaHpiCtrlModeT Mode; /* Auto or Manual */ + SaHpiBoolT ReadOnly; /* Indicates if mode is read-only */ +} SaHpiCtrlDefaultModeT; + +/* +** Record Definition +** Definition of the control resource data record. +*/ +typedef struct { + SaHpiCtrlNumT Num; /* Control Number/Index */ + SaHpiCtrlOutputTypeT OutputType; + SaHpiCtrlTypeT Type; /* Type of control */ + SaHpiCtrlRecUnionT TypeUnion; /* Specific control record */ + SaHpiCtrlDefaultModeT DefaultMode; /*Indicates if the control comes up + in Auto or Manual mode. */ + SaHpiBoolT WriteOnly; /* Indicates if the control is + write-only. */ + SaHpiUint32T Oem; /* Reserved for OEM use */ +} SaHpiCtrlRecT; + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Inventory Data Repositories ********** +********** ********** +******************************************************************************** +*******************************************************************************/ +/* +** These structures are used to read and write inventory data to entity +** inventory data repositories within a resource. +*/ +/* +** Inventory Data Repository ID +** Identifier for an inventory data repository. +*/ +typedef SaHpiInstrumentIdT SaHpiIdrIdT; +#define SAHPI_DEFAULT_INVENTORY_ID (SaHpiIdrIdT)0x00000000 + +/* Inventory Data Area type definitions */ +typedef enum { + SAHPI_IDR_AREATYPE_INTERNAL_USE = 0xB0, + SAHPI_IDR_AREATYPE_CHASSIS_INFO, + SAHPI_IDR_AREATYPE_BOARD_INFO, + SAHPI_IDR_AREATYPE_PRODUCT_INFO, + SAHPI_IDR_AREATYPE_OEM = 0xC0, + SAHPI_IDR_AREATYPE_UNSPECIFIED = 0xFF +} SaHpiIdrAreaTypeT; + +/* Inventory Data Field type definitions */ +typedef enum { + SAHPI_IDR_FIELDTYPE_CHASSIS_TYPE, + SAHPI_IDR_FIELDTYPE_MFG_DATETIME, + SAHPI_IDR_FIELDTYPE_MANUFACTURER, + SAHPI_IDR_FIELDTYPE_PRODUCT_NAME, + SAHPI_IDR_FIELDTYPE_PRODUCT_VERSION, + SAHPI_IDR_FIELDTYPE_SERIAL_NUMBER, + SAHPI_IDR_FIELDTYPE_PART_NUMBER, + SAHPI_IDR_FIELDTYPE_FILE_ID, + SAHPI_IDR_FIELDTYPE_ASSET_TAG, + SAHPI_IDR_FIELDTYPE_CUSTOM, + SAHPI_IDR_FIELDTYPE_UNSPECIFIED = 0xFF +} SaHpiIdrFieldTypeT; + +/* Inventory Data Field structure definition */ +typedef struct { + SaHpiEntryIdT AreaId; /* AreaId for the IDA to which */ + /* the Field belongs */ + SaHpiEntryIdT FieldId; /* Field Identifier */ + SaHpiIdrFieldTypeT Type; /* Field Type */ + SaHpiBoolT ReadOnly; /* Describes if a field is read-only. */ + /* All fields in a read-only area are */ + /* flagged as read-only as well.*/ + SaHpiTextBufferT Field; /* Field Data */ +} SaHpiIdrFieldT; + +/* Inventory Data Area header structure definition */ +typedef struct { + SaHpiEntryIdT AreaId; /* Area Identifier */ + SaHpiIdrAreaTypeT Type; /* Type of area */ + SaHpiBoolT ReadOnly; /* Describes if an area is read-only. */ + /* All area headers in a read-only IDR */ + /* are flagged as read-only as well.*/ + SaHpiUint32T NumFields; /* Number of Fields contained in Area */ +} SaHpiIdrAreaHeaderT; + +/* Inventory Data Repository Information structure definition */ +typedef struct { + SaHpiIdrIdT IdrId; /* Repository Identifier */ + SaHpiUint32T UpdateCount; /* The count is incremented any time the */ + /* IDR is changed. It rolls over to zero */ + /* when the maximum value is reached */ + SaHpiBoolT ReadOnly; /* Describes if the IDR is read-only. */ + /* All area headers and fields in a */ + /* read-only IDR are flagged as */ + /* read-only as well.*/ + SaHpiUint32T NumAreas; /* Number of Area contained in IDR */ +} SaHpiIdrInfoT; + + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Inventory Data Repository Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** All inventory data contained in an inventory data repository +** must be represented in the RDR repository +** with an SaHpiInventoryRecT. +*/ +typedef struct { + SaHpiIdrIdT IdrId; + SaHpiBoolT Persistent; /* True indicates that updates to IDR are + automatically and immediately persisted. + False indicates that updates are not + immediately persisted; but optionally may be + persisted via saHpiParmControl() function, as + defined in implementation documentation.*/ + SaHpiUint32T Oem; +} SaHpiInventoryRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Watchdogs ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** This section defines all of the data types associated with watchdog timers. +*/ + +/* Watchdog Number - Identifier for a watchdog timer. */ +typedef SaHpiInstrumentIdT SaHpiWatchdogNumT; +#define SAHPI_DEFAULT_WATCHDOG_NUM (SaHpiWatchdogNumT)0x00000000 + +/* +** Watchdog Timer Action +** +** These enumerations represent the possible actions to be taken upon watchdog +** timer timeout and the events that are generated for watchdog actions. +*/ +typedef enum { + SAHPI_WA_NO_ACTION = 0, + SAHPI_WA_RESET, + SAHPI_WA_POWER_DOWN, + SAHPI_WA_POWER_CYCLE +} SaHpiWatchdogActionT; + +typedef enum { + SAHPI_WAE_NO_ACTION = 0, + SAHPI_WAE_RESET, + SAHPI_WAE_POWER_DOWN, + SAHPI_WAE_POWER_CYCLE, + SAHPI_WAE_TIMER_INT=0x08 /* Used if Timer Preinterrupt only */ +} SaHpiWatchdogActionEventT; + +/* +** Watchdog Pre-timer Interrupt +** +** These enumerations represent the possible types of interrupts that may be +** triggered by a watchdog pre-timer event. The actual meaning of these +** operations may differ depending on the hardware architecture. +*/ +typedef enum { + SAHPI_WPI_NONE = 0, + SAHPI_WPI_SMI, + SAHPI_WPI_NMI, + SAHPI_WPI_MESSAGE_INTERRUPT, + SAHPI_WPI_OEM = 0x0F +} SaHpiWatchdogPretimerInterruptT; + +/* +** Watchdog Timer Use +** +** These enumerations represent the possible watchdog users that may have caused +** the watchdog to expire. For instance, if watchdog is being used during power +** on self test (POST), and it expires, the SAHPI_WTU_BIOS_POST expiration type +** will be set. Most specific uses for Watchdog timer by users of HPI should +** indicate SAHPI_WTU_SMS_OS if the use is to provide an OS-healthy heartbeat, +** or SAHPI_WTU_OEM if it is used for some other purpose. +*/ +typedef enum { + SAHPI_WTU_NONE = 0, + SAHPI_WTU_BIOS_FRB2, + SAHPI_WTU_BIOS_POST, + SAHPI_WTU_OS_LOAD, + SAHPI_WTU_SMS_OS, /* System Management System providing + heartbeat for OS */ + SAHPI_WTU_OEM, + SAHPI_WTU_UNSPECIFIED = 0x0F +} SaHpiWatchdogTimerUseT; + +/* +** Timer Use Expiration Flags +** These values are used for the Watchdog Timer Use Expiration flags in the +** SaHpiWatchdogT structure. +*/ +typedef SaHpiUint8T SaHpiWatchdogExpFlagsT; +#define SAHPI_WATCHDOG_EXP_BIOS_FRB2 (SaHpiWatchdogExpFlagsT)0x02 +#define SAHPI_WATCHDOG_EXP_BIOS_POST (SaHpiWatchdogExpFlagsT)0x04 +#define SAHPI_WATCHDOG_EXP_OS_LOAD (SaHpiWatchdogExpFlagsT)0x08 +#define SAHPI_WATCHDOG_EXP_SMS_OS (SaHpiWatchdogExpFlagsT)0x10 +#define SAHPI_WATCHDOG_EXP_OEM (SaHpiWatchdogExpFlagsT)0x20 + +/* +** Watchdog Structure +** +** This structure is used by the saHpiWatchdogTimerGet() and +** saHpiWatchdogTimerSet() functions. The use of the structure varies slightly +** by each function. +** +** For saHpiWatchdogTimerGet() : +** +** Log - indicates whether or not the Watchdog is configured to +** issue events. True=events will be generated. +** Running - indicates whether or not the Watchdog is currently +** running or stopped. True=Watchdog is running. +** TimerUse - indicates the current use of the timer; one of the +** enumerated preset uses which was included on the last +** saHpiWatchdogTimerSet() function call, or through some +** other implementation-dependent means to start the +** Watchdog timer. +** TimerAction - indicates what action will be taken when the Watchdog +** times out. +** PretimerInterrupt - indicates which action will be taken +** "PreTimeoutInterval" milliseconds prior to Watchdog +** timer expiration. +** PreTimeoutInterval - indicates how many milliseconds prior to timer time +** out the PretimerInterrupt action will be taken. If +** "PreTimeoutInterval" = 0, the PretimerInterrupt action +** will occur concurrently with "TimerAction." HPI +** implementations may not be able to support millisecond +** resolution, and because of this may have rounded the +** set value to whatever resolution could be supported. +** The HPI implementation will return this rounded value. +** TimerUseExpFlags - set of five bit flags which indicate that a Watchdog +** timer timeout has occurred while the corresponding +** TimerUse value was set. Once set, these flags stay +** set until specifically cleared with a +** saHpiWatchdogTimerSet() call, or by some other +** implementation-dependent means. +** InitialCount - The time, in milliseconds, before the timer will time +** out after the watchdog is started/restarted, or some +** other implementation-dependent strobe is +** sent to the Watchdog. HPI implementations may not be +** able to support millisecond resolution, and because +** of this may have rounded the set value to whatever +** resolution could be supported. The HPI implementation +** will return this rounded value. +** PresentCount - The remaining time in milliseconds before the timer +** will time out unless a saHpiWatchdogTimerReset() +** function call is made, or some other implementation- +** dependent strobe is sent to the Watchdog. +** HPI implementations may not be able to support +** millisecond resolution on watchdog timers, but will +** return the number of clock ticks remaining times the +** number of milliseconds between each tick. +** +** For saHpiWatchdogTimerSet(): +** +** Log - indicates whether or not the Watchdog should issue +** events. True=event will be generated. +** Running - indicates whether or not the Watchdog should be +** stopped before updating. +** True = Watchdog is not stopped. If it is +** already stopped, it will remain stopped, +** but if it is running, it will continue +** to run, with the countown timer reset +** to the new InitialCount. Note that +** there is a race condition possible +** with this setting, so it should be used +** with care. +** False = Watchdog is stopped. After +** saHpiWatchdogTimerSet() is called, a +** subsequent call to +** saHpiWatchdogTimerReset() is required +** to start the timer. +** TimerUse - indicates the current use of the timer. Will control +** which TimerUseExpFlag is set if the timer expires. +** TimerAction - indicates what action will be taken when the Watchdog +** times out. +** PretimerInterrupt - indicates which action will be taken +** "PreTimeoutInterval" milliseconds prior to Watchdog +** timer expiration. +** PreTimeoutInterval - indicates how many milliseconds prior to timer time +** out the PretimerInterrupt action will be taken. If +** "PreTimeoutInterval" = 0, the PretimerInterrupt action +** will occur concurrently with "TimerAction." HPI +** implementations may not be able to support millisecond +** resolution and may have a maximum value restriction. +** These restrictions should be documented by the +** provider of the HPI interface. +** TimerUseExpFlags - Set of five bit flags corresponding to the five +** TimerUse values. For each bit set, the corresponding +** Timer Use Expiration Flag will be CLEARED. Generally, +** a program should only clear the Timer Use Expiration +** Flag corresponding to its own TimerUse, so that other +** software, which may have used the timer for another +** purpose in the past can still read its TimerUseExpFlag +** to determine whether or not the timer expired during +** that use. +** InitialCount - The time, in milliseconds, before the timer will time +** out after a saHpiWatchdogTimerReset() function call is +** made, or some other implementation-dependent strobe is +** sent to the Watchdog. HPI implementations may not be +** able to support millisecond resolution and may have a +** maximum value restriction. These restrictions should +** be documented by the provider of the HPI interface. +** PresentCount - Not used on saHpiWatchdogTimerSet() function. Ignored. +** +*/ + +typedef struct { + SaHpiBoolT Log; + SaHpiBoolT Running; + SaHpiWatchdogTimerUseT TimerUse; + SaHpiWatchdogActionT TimerAction; + SaHpiWatchdogPretimerInterruptT PretimerInterrupt; + SaHpiUint32T PreTimeoutInterval; + SaHpiWatchdogExpFlagsT TimerUseExpFlags; + SaHpiUint32T InitialCount; + SaHpiUint32T PresentCount; +} SaHpiWatchdogT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Watchdog Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** When the "Watchdog" capability is set in a resource, a watchdog with an +** identifier of SAHPI_DEFAULT_WATCHDOG_NUM is required. All watchdogs must be +** represented in the RDR repository with an SaHpiWatchdogRecT, including the +** watchdog with an identifier of SAHPI_DEFAULT_WATCHDOG_NUM. +*/ +typedef struct { + SaHpiWatchdogNumT WatchdogNum; + SaHpiUint32T Oem; +} SaHpiWatchdogRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Hot Swap ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Hot Swap Indicator State */ +typedef enum { + SAHPI_HS_INDICATOR_OFF = 0, + SAHPI_HS_INDICATOR_ON +} SaHpiHsIndicatorStateT; + +/* Hot Swap Action */ +typedef enum { + SAHPI_HS_ACTION_INSERTION = 0, + SAHPI_HS_ACTION_EXTRACTION +} SaHpiHsActionT; + +/* Hot Swap State */ +typedef enum { + SAHPI_HS_STATE_INACTIVE = 0, + SAHPI_HS_STATE_INSERTION_PENDING, + SAHPI_HS_STATE_ACTIVE, + SAHPI_HS_STATE_EXTRACTION_PENDING, + SAHPI_HS_STATE_NOT_PRESENT +} SaHpiHsStateT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Events, Part 2 ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* Event Data Structures */ + +typedef enum { + SAHPI_CRITICAL = 0, + SAHPI_MAJOR, + SAHPI_MINOR, + SAHPI_INFORMATIONAL, + SAHPI_OK, + SAHPI_DEBUG = 0xF0, + SAHPI_ALL_SEVERITIES = 0xFF /* Only used with DAT and Annunciator */ + /* functions. This is not a valid */ + /* severity for events or alarms */ +} SaHpiSeverityT; + + +typedef enum { + SAHPI_RESE_RESOURCE_FAILURE, + SAHPI_RESE_RESOURCE_RESTORED, + SAHPI_RESE_RESOURCE_ADDED +} SaHpiResourceEventTypeT; + + +typedef struct { + SaHpiResourceEventTypeT ResourceEventType; +} SaHpiResourceEventT; + + +/* +** Domain events are used to announce the addition of domain references +** and the removal of domain references to the DRT. +*/ +typedef enum { + SAHPI_DOMAIN_REF_ADDED, + SAHPI_DOMAIN_REF_REMOVED +} SaHpiDomainEventTypeT; + +typedef struct { + SaHpiDomainEventTypeT Type; /* Type of domain event */ + SaHpiDomainIdT DomainId; /* Domain Id of domain added + to or removed from DRT. */ +} SaHpiDomainEventT; + + +/* +** Sensor Optional Data +** +** Sensor events may contain optional data items passed and stored with the +** event. If these optional data items are present, they will be included with +** the event data returned in response to a saHpiEventGet() or +** saHpiEventLogEntryGet() function call. Also, the optional data items may be +** included with the event data passed to the saHpiEventLogEntryAdd() function. +** +** Specific implementations of HPI may have restrictions on how much data may +** be passed to saHpiEventLogEntryAdd(). These restrictions should be documented +** by the provider of the HPI interface. +*/ +typedef SaHpiUint8T SaHpiSensorOptionalDataT; + +#define SAHPI_SOD_TRIGGER_READING (SaHpiSensorOptionalDataT)0x01 +#define SAHPI_SOD_TRIGGER_THRESHOLD (SaHpiSensorOptionalDataT)0x02 +#define SAHPI_SOD_OEM (SaHpiSensorOptionalDataT)0x04 +#define SAHPI_SOD_PREVIOUS_STATE (SaHpiSensorOptionalDataT)0x08 +#define SAHPI_SOD_CURRENT_STATE (SaHpiSensorOptionalDataT)0x10 +#define SAHPI_SOD_SENSOR_SPECIFIC (SaHpiSensorOptionalDataT)0x20 +typedef struct { + SaHpiSensorNumT SensorNum; + SaHpiSensorTypeT SensorType; + SaHpiEventCategoryT EventCategory; + SaHpiBoolT Assertion; /* True = Event State + asserted + False = deasserted */ + SaHpiEventStateT EventState; /* single state being asserted + or deasserted*/ + SaHpiSensorOptionalDataT OptionalDataPresent; + /* the following fields are only valid if the corresponding flag is set + in the OptionalDataPresent field */ + SaHpiSensorReadingT TriggerReading; /* Reading that triggered + the event */ + SaHpiSensorReadingT TriggerThreshold; /* Value of the threshold + that was crossed. Will not + be present if threshold is + not readable. */ + SaHpiEventStateT PreviousState; /* Previous set of asserted + event states. If multiple + event states change at once, + multiple events may be + generated for each changing + event state. This field + should indicate the status of + the sensor event states prior + to any of the simultaneous + changes. + + Thus, it will be the same in + each event generated due to + multiple simultaneous event + state changes. */ + + SaHpiEventStateT CurrentState; /* Current set of asserted + event states. */ + SaHpiUint32T Oem; + SaHpiUint32T SensorSpecific; +} SaHpiSensorEventT; + +typedef SaHpiUint8T SaHpiSensorEnableOptDataT; + +#define SAHPI_SEOD_CURRENT_STATE (SaHpiSensorEnableOptDataT)0x10 + +typedef struct { + SaHpiSensorNumT SensorNum; + SaHpiSensorTypeT SensorType; + SaHpiEventCategoryT EventCategory; + SaHpiBoolT SensorEnable; /* current sensor enable status */ + SaHpiBoolT SensorEventEnable; /* current evt enable status */ + SaHpiEventStateT AssertEventMask; /* current assert event mask */ + SaHpiEventStateT DeassertEventMask; /* current deassert evt mask */ + SaHpiSensorEnableOptDataT OptionalDataPresent; + /* the following fields are only valid if the corresponding flag is set + in the OptionalDataPresent field */ + SaHpiEventStateT CurrentState; /* Current set of asserted + Event states. */ +} SaHpiSensorEnableChangeEventT; + +typedef struct { + SaHpiHsStateT HotSwapState; + SaHpiHsStateT PreviousHotSwapState; +} SaHpiHotSwapEventT; + +typedef struct { + SaHpiWatchdogNumT WatchdogNum; + SaHpiWatchdogActionEventT WatchdogAction; + SaHpiWatchdogPretimerInterruptT WatchdogPreTimerAction; + SaHpiWatchdogTimerUseT WatchdogUse; +} SaHpiWatchdogEventT; + +/* +** The following type defines the types of events that can be reported +** by the HPI software implementation. +** +** Audit events report a discrepancy in the audit process. Audits are typically +** performed by HA software to detect problems. Audits may look for such things +** as corrupted data stores, inconsistent RPT information, or improperly managed +** queues. +** +** Startup events report a failure to start-up properly, or inconsistencies in +** persisted data. +*/ +typedef enum { + SAHPI_HPIE_AUDIT, + SAHPI_HPIE_STARTUP, + SAHPI_HPIE_OTHER +} SaHpiSwEventTypeT; + +typedef struct { + SaHpiManufacturerIdT MId; + SaHpiSwEventTypeT Type; + SaHpiTextBufferT EventData; +} SaHpiHpiSwEventT; + +typedef struct { + SaHpiManufacturerIdT MId; + SaHpiTextBufferT OemEventData; +} SaHpiOemEventT; + +/* +** User events may be used for storing custom events created by an HPI User +** when injecting events into the Event Log using saHpiEventLogEntryAdd(). +*/ +typedef struct { + SaHpiTextBufferT UserEventData; +} SaHpiUserEventT; + +typedef enum { + SAHPI_ET_RESOURCE, + SAHPI_ET_DOMAIN, + SAHPI_ET_SENSOR, + SAHPI_ET_SENSOR_ENABLE_CHANGE, + SAHPI_ET_HOTSWAP, + SAHPI_ET_WATCHDOG, + SAHPI_ET_HPI_SW, + SAHPI_ET_OEM, + SAHPI_ET_USER +} SaHpiEventTypeT; + +typedef union { + SaHpiResourceEventT ResourceEvent; + SaHpiDomainEventT DomainEvent; + SaHpiSensorEventT SensorEvent; + SaHpiSensorEnableChangeEventT SensorEnableChangeEvent; + SaHpiHotSwapEventT HotSwapEvent; + SaHpiWatchdogEventT WatchdogEvent; + SaHpiHpiSwEventT HpiSwEvent; + SaHpiOemEventT OemEvent; + SaHpiUserEventT UserEvent; +} SaHpiEventUnionT; + +typedef struct { + SaHpiResourceIdT Source; + SaHpiEventTypeT EventType; + SaHpiTimeT Timestamp; /*Equal to SAHPI_TIME_UNSPECIFED if time is + not available; Absolute time if greater + than SAHPI_TIME_MAX_RELATIVE, Relative + time if less than or equal to + SAHPI_TIME_MAX_RELATIVE */ + SaHpiSeverityT Severity; + SaHpiEventUnionT EventDataUnion; +} SaHpiEventT; + +/* +** Event Queue Status +** +** This status word is returned to HPI Users that request it +** when saHpiEventGet() is called. +** +*/ + +typedef SaHpiUint32T SaHpiEvtQueueStatusT; + +#define SAHPI_EVT_QUEUE_OVERFLOW (SaHpiEvtQueueStatusT)0x0001 + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Annunciators ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** Annunciator Number +** Identifier for an Annunciator management instrument. +*/ +typedef SaHpiInstrumentIdT SaHpiAnnunciatorNumT; + +/* +** The following data type is equivalent to the AIS data type SaNameT. +** it is defined in this header file, so that inclusion of the AIS +** header file is not required. This data type is based on version 1.0 +** of the AIS specification +*/ +#define SA_HPI_MAX_NAME_LENGTH 256 + +typedef struct { + SaHpiUint16T Length; + unsigned char Value[SA_HPI_MAX_NAME_LENGTH]; +} SaHpiNameT; + +/* +** Enumeration of Announcement Types +*/ +typedef enum { + SAHPI_STATUS_COND_TYPE_SENSOR, + SAHPI_STATUS_COND_TYPE_RESOURCE, + SAHPI_STATUS_COND_TYPE_OEM, + SAHPI_STATUS_COND_TYPE_USER +} SaHpiStatusCondTypeT; + + +/* Condition structure definition */ +typedef struct { + + SaHpiStatusCondTypeT Type; /* Status Condition Type */ + SaHpiEntityPathT Entity; /* Entity assoc. with status condition */ + SaHpiDomainIdT DomainId; /* Domain associated with status. + May be SAHPI_UNSPECIFIED_DOMAIND_ID + meaning current domain, or domain + not meaningful for status condition*/ + SaHpiResourceIdT ResourceId; /* Resource associated with status. + May be SAHPI_UNSPECIFIED_RESOURCE_ID + if Type is SAHPI_STATUS_COND_USER. + Must be set to valid ResourceId in + domain specified by DomainId, + or in current domain, if DomainId + is SAHPI_UNSPECIFIED_DOMAIN_ID */ + SaHpiSensorNumT SensorNum; /* Sensor associated with status + Only valid if Type is + SAHPI_STATUS_COND_TYPE_SENSOR */ + SaHpiEventStateT EventState; /* Sensor event state. + Only valid if Type is + SAHPI_STATUS_COND_TYPE_SENSOR. */ + SaHpiNameT Name; /* AIS compatible identifier associated + with Status condition */ + SaHpiManufacturerIdT Mid; /* Manufacturer Id associated with + status condition, required when type + is SAHPI_STATUS_COND_TYPE_OEM. */ + SaHpiTextBufferT Data; /* Optional Data associated with + Status condition */ +} SaHpiConditionT; + + +/* Announcement structure definition */ +typedef struct { + SaHpiEntryIdT EntryId; /* Announcment Entry Id */ + SaHpiTimeT Timestamp; /* Time when announcement added to set */ + SaHpiBoolT AddedByUser; /* True if added to set by HPI User, + False if added automatically by + HPI implementation */ + SaHpiSeverityT Severity; /* Severity of announcement */ + SaHpiBoolT Acknowledged; /* Acknowledged flag */ + SaHpiConditionT StatusCond; /* Detailed status condition */ +} SaHpiAnnouncementT; + + +/* Annunciator Mode - defines who may add or delete entries in set. */ + +typedef enum { + SAHPI_ANNUNCIATOR_MODE_AUTO, + SAHPI_ANNUNCIATOR_MODE_USER, + SAHPI_ANNUNCIATOR_MODE_SHARED +} SaHpiAnnunciatorModeT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Annunciator Resource Data Records ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** The following enumerated type defines the possible output types +** which can be associated with an Annunciator Management Instrument +*/ +typedef enum { + SAHPI_ANNUNCIATOR_TYPE_LED = 0, + SAHPI_ANNUNCIATOR_TYPE_DRY_CONTACT_CLOSURE, + SAHPI_ANNUNCIATOR_TYPE_AUDIBLE, + SAHPI_ANNUNCIATOR_TYPE_LCD_DISPLAY, + SAHPI_ANNUNCIATOR_TYPE_MESSAGE, + SAHPI_ANNUNCIATOR_TYPE_COMPOSITE, + SAHPI_ANNUNCIATOR_TYPE_OEM +} SaHpiAnnunciatorTypeT; + + +/* +** All annunciator management instruments +** must be represented in the RDR repository +** with an SaHpiAnnunciatorRecT. +*/ +typedef struct { + SaHpiAnnunciatorNumT AnnunciatorNum; + SaHpiAnnunciatorTypeT AnnunciatorType; /* Annunciator Output Type */ + SaHpiBoolT ModeReadOnly; /* if True, Mode may + not be changed by HPI User */ + SaHpiUint32T MaxConditions; /* maximum number of conditions + that can be held in current + set. 0 means no fixed + limit. */ + SaHpiUint32T Oem; +} SaHpiAnnunciatorRecT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Resource Data Record ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* +** The following describes the different types of records that exist within a +** RDR repository and the RDR super-structure to all of the specific RDR types +** (sensor, inventory data, watchdog, etc.). +*/ +typedef enum { + SAHPI_NO_RECORD, + SAHPI_CTRL_RDR, + SAHPI_SENSOR_RDR, + SAHPI_INVENTORY_RDR, + SAHPI_WATCHDOG_RDR, + SAHPI_ANNUNCIATOR_RDR +} SaHpiRdrTypeT; + +typedef union { + SaHpiCtrlRecT CtrlRec; + SaHpiSensorRecT SensorRec; + SaHpiInventoryRecT InventoryRec; + SaHpiWatchdogRecT WatchdogRec; + SaHpiAnnunciatorRecT AnnunciatorRec; +} SaHpiRdrTypeUnionT; + +typedef struct { + SaHpiEntryIdT RecordId; + SaHpiRdrTypeT RdrType; + SaHpiEntityPathT Entity; /* Entity to which this RDR relates. */ + SaHpiBoolT IsFru; /* Entity is a FRU. This field is + Only valid if the Entity path given + in the "Entity" field is different + from the Entity path in the RPT + entry for the resource. */ + SaHpiRdrTypeUnionT RdrTypeUnion; + SaHpiTextBufferT IdString; +} SaHpiRdrT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Parameter Control ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +typedef enum { + SAHPI_DEFAULT_PARM = 0, + SAHPI_SAVE_PARM, + SAHPI_RESTORE_PARM +} SaHpiParmActionT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Reset ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +typedef enum { + SAHPI_COLD_RESET = 0, + SAHPI_WARM_RESET, + SAHPI_RESET_ASSERT, + SAHPI_RESET_DEASSERT +} SaHpiResetActionT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Power ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +typedef enum { + SAHPI_POWER_OFF = 0, + SAHPI_POWER_ON, + SAHPI_POWER_CYCLE +} SaHpiPowerStateT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Resource Presence Table ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* This section defines the types associated with the RPT. */ + +/* +** GUID - Globally Unique Identifier +** +** The format if the ID follows that specified by the Wired for Management +** Baseline, Version 2.0 specification. HPI uses version 1 of the GUID +** format, with a 3-bit variant field of 10x (where x indicates 'don't care') +*/ +typedef SaHpiUint8T SaHpiGuidT[16]; + +/* +** Resource Info Type Definitions +** +** +** SaHpiResourceInfoT contains static configuration data concerning the +** management controller associated with the resource, or the resource itself. +** Note this information is used to describe the resource; that is, the piece of +** infrastructure which manages an entity (or multiple entities) - NOT the +** entities for which the resource provides management. The purpose of the +** SaHpiResourceInfoT structure is to provide information that an HPI User may +** need in order to interact correctly with the resource (e.g., recognize a +** specific management controller which may have defined OEM fields in sensors, +** OEM controls, etc.). +** +** The GUID is used to uniquely identify a Resource. A GUID value of zero is not +** valid and indicates that the Resource does not have an associated GUID. +** +** All of the fields in the following structure may or may not be used by a +** given resource. +*/ +typedef struct { + SaHpiUint8T ResourceRev; + SaHpiUint8T SpecificVer; + SaHpiUint8T DeviceSupport; + SaHpiManufacturerIdT ManufacturerId; + SaHpiUint16T ProductId; + SaHpiUint8T FirmwareMajorRev; + SaHpiUint8T FirmwareMinorRev; + SaHpiUint8T AuxFirmwareRev; + SaHpiGuidT Guid; +} SaHpiResourceInfoT; + +/* +** Resource Capabilities +** +** This definition defines the capabilities of a given resource. One resource +** may support any number of capabilities using the bit mask. Because each entry +** in an RPT will have the SAHPI_CAPABILITY_RESOURCE bit set, zero is not a +** valid value for the capability flag, and is thus used to indicate "no RPT +** entry present" in some function calls. +** +** SAHPI_CAPABILITY_RESOURCE +** SAHPI_CAPABILITY_EVT_DEASSERTS +** Indicates that all sensors on the resource have the property that their +** Assertion and Deassertion event enable flags are the same. That is, +** for all event states whose assertion triggers an event, it is +** guaranteed that the deassertion of that event will also +** trigger an event. Thus, an HPI User may track the state of sensors on the +** resource by monitoring events rather than polling for state changes. +** SAHPI_CAPABILITY_AGGREGATE_STATUS +** SAHPI_CAPABILITY_CONFIGURATION +** SAHPI_CAPABILITY_MANAGED_HOTSWAP +** Indicates that the resource supports the full managed hot swap model. +** Since hot swap only makes sense for field-replaceable units, the +** SAHPI_CAPABILITY_FRU capability bit must also be set for this resource. +** SAHPI_CAPABILITY_WATCHDOG +** SAHPI_CAPABILITY_CONTROL +** SAHPI_CAPABILITY_FRU +** Indicates that the resource is a field-replaceable unit; i.e., it is +** capable of being removed and replaced in a live system. If +** SAHPI_CAPABILITY_MANAGED_HOTSWAP is also set, the resource supports +** the full hot swap model. If SAHPI_CAPABILITY_MANAGED_HOTSWAP is not +** set, the resource supports the simplified hot swap model. +** SAHPI_CAPABILITY_ANNUNCIATOR +** SAHPI_CAPABILITY_POWER +** SAHPI_CAPABILITY_RESET +** SAHPI_CAPABILITY_INVENTORY_DATA +** SAHPI_CAPABILITY_EVENT_LOG +** SAHPI_CAPABILITY_RDR +** Indicates that a resource data record (RDR) repository is supplied +** by the resource. Since the existence of an RDR is mandatory for all +** management instruments, this +** capability must be asserted if the resource +** contains any sensors, controls, watchdog timers, or inventory +** data repositories. +** SAHPI_CAPABILITY_SENSOR +*/ + +typedef SaHpiUint32T SaHpiCapabilitiesT; +#define SAHPI_CAPABILITY_RESOURCE (SaHpiCapabilitiesT)0X40000000 +#define SAHPI_CAPABILITY_EVT_DEASSERTS (SaHpiCapabilitiesT)0x00008000 +#define SAHPI_CAPABILITY_AGGREGATE_STATUS (SaHpiCapabilitiesT)0x00002000 +#define SAHPI_CAPABILITY_CONFIGURATION (SaHpiCapabilitiesT)0x00001000 +#define SAHPI_CAPABILITY_MANAGED_HOTSWAP (SaHpiCapabilitiesT)0x00000800 +#define SAHPI_CAPABILITY_WATCHDOG (SaHpiCapabilitiesT)0x00000400 +#define SAHPI_CAPABILITY_CONTROL (SaHpiCapabilitiesT)0x00000200 +#define SAHPI_CAPABILITY_FRU (SaHpiCapabilitiesT)0x00000100 +#define SAHPI_CAPABILITY_ANNUNCIATOR (SaHpiCapabilitiesT)0x00000040 +#define SAHPI_CAPABILITY_POWER (SaHpiCapabilitiesT)0x00000020 +#define SAHPI_CAPABILITY_RESET (SaHpiCapabilitiesT)0x00000010 +#define SAHPI_CAPABILITY_INVENTORY_DATA (SaHpiCapabilitiesT)0x00000008 +#define SAHPI_CAPABILITY_EVENT_LOG (SaHpiCapabilitiesT)0x00000004 +#define SAHPI_CAPABILITY_RDR (SaHpiCapabilitiesT)0x00000002 +#define SAHPI_CAPABILITY_SENSOR (SaHpiCapabilitiesT)0x00000001 + +/* +** Resource Managed Hot Swap Capabilities +** +** This definition defines the managed hot swap capabilities of a given +** resource. +** +** SAHPI_HS_CAPABILITY_AUTOEXTRACT_READ_ONLY +** This capability indicates if the hot swap autoextract timer is read-only. +** SAHPI_HS_CAPABILITY_INDICATOR_SUPPORTED +** Indicates whether or not the resource has a hot swap indicator. +*/ + +typedef SaHpiUint32T SaHpiHsCapabilitiesT; +#define SAHPI_HS_CAPABILITY_AUTOEXTRACT_READ_ONLY \ + (SaHpiHsCapabilitiesT)0x80000000 +#define SAHPI_HS_CAPABILITY_INDICATOR_SUPPORTED \ + (SaHpiHsCapabilitiesT)0X40000000 +/* +** RPT Entry +** +** This structure is used to store the RPT entry information. +** +** The ResourceCapabilities field definies the capabilities of the resource. +** This field must be non-zero for all valid resources. +** +** The HotSwapCapabilities field denotes the capabilities of the resource, +** specifically related to hot swap. This field is only valid if the +** resource supports managed hot swap, as indicated by the +** SAHPI_CAPABILITY_MANAGED_HOT_SWAP resource capability. +** +** The ResourceTag is a data field within an RPT entry available to the HPI +** User for associating application specific data with a resource. The HPI +** User supplied data is purely informational and is not used by the HPI +** implementation, domain, or associated resource. For example, an HPI User +** can set the resource tag to a "descriptive" value, which can be used to +** identify the resource in messages to a human operator. +*/ +typedef struct { + SaHpiEntryIdT EntryId; + SaHpiResourceIdT ResourceId; + SaHpiResourceInfoT ResourceInfo; + SaHpiEntityPathT ResourceEntity; /* If resource manages a FRU, entity + path of the FRU */ + /* If resource manages a single + entity, entity path of that + entity. */ + /* If resource manages multiple + entities, the entity path of the + "primary" entity managed by the + resource */ + /* Must be set to the same value in + every domain which contains this + resource */ + SaHpiCapabilitiesT ResourceCapabilities; /* Must be non-0. */ + SaHpiHsCapabilitiesT HotSwapCapabilities; /* Indicates the hot swap + capabilities of the resource */ + SaHpiSeverityT ResourceSeverity; /* Indicates the criticality that + should be raised when the resource + is not responding */ + SaHpiBoolT ResourceFailed; /* Indicates that the resource is not + currently functional */ + SaHpiTextBufferT ResourceTag; +} SaHpiRptEntryT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Domain Information ********** +********** ********** +******************************************************************************** +*******************************************************************************/ + +/* This section defines the types associated with the domain controller. */ + +/* +** Domain Capabilities +** +** This definition defines the capabilities of a given domain. A domain +** may support any number of capabilities using the bit mask. +** +** SAHPI_DOMAIN_CAP_AUTOINSERT_READ_ONLY +** Indicates that the domain auto insert timeout value is read-only +** and may not be modified using the saHpiHotSwapAutoInsertTimeoutSet() +** function. +*/ + +typedef SaHpiUint32T SaHpiDomainCapabilitiesT; +#define SAHPI_DOMAIN_CAP_AUTOINSERT_READ_ONLY \ + (SaHpiDomainCapabilitiesT)0X00000001 + +/* +** Domain Info +** +** This structure is used to store the information regarding the domain +** including information regarding the domain reference table (DRT) and +** the resource presence table (RPT). +** +** The DomainTag field is an informational value that supplies an HPI User +** with naming information for the domain. +** +** NOTE: Regarding timestamps - If the implementation cannot supply an absolute +** timestamp, then it may supply a timestamp relative to some system-defined +** epoch, such as system boot. The value SAHPI_TIME_UNSPECIFIED indicates that +** the time of the update cannot be determined. Otherwise, If the value is less +** than or equal to SAHPI_TIME_MAX_RELATIVE, then it is relative; if it is +** greater than SAHPI_TIME_MAX_RELATIVE, then it is absolute. +** +** The GUID is used to uniquely identify a domain. A GUID value of zero is not +** valid and indicates that the domain does not have an associated GUID. +*/ + +typedef struct { + SaHpiDomainIdT DomainId; /* Unique Domain Id associated with + domain */ + SaHpiDomainCapabilitiesT DomainCapabilities; /* Domain Capabilities */ + SaHpiBoolT IsPeer; /* Indicates that this domain + participates in a peer + relationship. */ + SaHpiTextBufferT DomainTag; /* Information tag associated with + domain */ + SaHpiUint32T DrtUpdateCount; /* This count is incremented any time the + table is changed. It rolls over to + zero when the maximum value is + reached */ + SaHpiTimeT DrtUpdateTimestamp; /* This timestamp is set any time the + DRT table is changed. */ + SaHpiUint32T RptUpdateCount; /* This count is incremented any time + the RPT is changed. It rolls over + to zero when the maximum value is + reached */ + SaHpiTimeT RptUpdateTimestamp; /* This timestamp is set any time the + RPT table is changed. */ + SaHpiUint32T DatUpdateCount; /* This count is incremented any time + the DAT is changed. It rolls over to + zero when the maximum value is + reached */ + SaHpiTimeT DatUpdateTimestamp; /* This timestamp is set any time the + DAT is changed. */ + SaHpiUint32T ActiveAlarms; /* Count of active alarms in the DAT */ + SaHpiUint32T CriticalAlarms; /* Count of active critical alarms in + the DAT */ + SaHpiUint32T MajorAlarms; /* Count of active major alarms in the + DAT */ + SaHpiUint32T MinorAlarms; /* Count of active minor alarms in the + DAT */ + SaHpiUint32T DatUserAlarmLimit; /* Maximum User Alarms that can be + added to DAT. 0=no fixed limit */ + SaHpiBoolT DatOverflow; /* Set to True if there are one + or more non-User Alarms that + are missing from the DAT because + of space limitations */ + SaHpiGuidT Guid; /* GUID associated with domain.*/ +} SaHpiDomainInfoT; + +/* +** DRT Entry +** +** This structure is used to store the DRT entry information. +** +*/ +typedef struct { + SaHpiEntryIdT EntryId; + SaHpiDomainIdT DomainId; /* The Domain ID referenced by this entry */ + SaHpiBoolT IsPeer; /* Indicates if this domain reference + is a peer. If not, the domain reference + is a tier. */ +} SaHpiDrtEntryT; + + +/* +** DAT Entry +** +** This structure is used to store alarm informatin in the DAT +** +*/ + + +typedef SaHpiEntryIdT SaHpiAlarmIdT; + +typedef struct { + SaHpiAlarmIdT AlarmId; /* Alarm Id */ + SaHpiTimeT Timestamp; /* Time when alarm added to DAT */ + SaHpiSeverityT Severity; /* Severity of alarm */ + SaHpiBoolT Acknowledged; /* Acknowledged flag */ + SaHpiConditionT AlarmCond; /* Detailed alarm condition */ +} SaHpiAlarmT; + +/******************************************************************************* +******************************************************************************** +********** ********** +********** Event Log ********** +********** ********** +******************************************************************************** +*******************************************************************************/ +/* This section defines the types associated with the Event Log. */ +/* +** Event Log Information +** +** The Entries entry denotes the number of active entries contained in the Event +** Log. +** The Size entry denotes the total number of entries the Event Log is able to +** hold. +** The UserEventMaxSize entry indicates the maximum size of the text buffer +** data field in an HPI User event that is supported by the Event Log +** implementation. If the implementation does not enforce a more restrictive +** data length, it should be set to SAHPI_MAX_TEXT_BUFFER_LENGTH. +** The UpdateTimestamp entry denotes the time of the last update to the Event +** Log. +** The CurrentTime entry denotes the Event Log's idea of the current time; i.e +** the timestamp that would be placed on an entry if it was added now. +** The Enabled entry indicates whether the Event Log is enabled. If the Event +** Log is "disabled" no events generated within the HPI implementation will be +** added to the Event Log. Events may still be added to the Event Log with +** the saHpiEventLogEntryAdd() function. When the Event Log is "enabled" +** events may be automatically added to the Event Log as they are generated +** in a resource or a domain, however, it is implementation-specific which +** events are automatically added to any Event Log. +** The OverflowFlag entry indicates the Event Log has overflowed. Events have +** been dropped or overwritten due to a table overflow. +** The OverflowAction entry indicates the behavior of the Event Log when an +** overflow occurs. +** The OverflowResetable entry indicates if the overflow flag can be +** cleared by an HPI User with the saHpiEventLogOverflowReset() function. +*/ +typedef enum { + SAHPI_EL_OVERFLOW_DROP, /* New entries are dropped when Event Log is + full*/ + SAHPI_EL_OVERFLOW_OVERWRITE /* Event Log overwrites existing entries + when Event Log is full */ +} SaHpiEventLogOverflowActionT; + +typedef struct { + SaHpiUint32T Entries; + SaHpiUint32T Size; + SaHpiUint32T UserEventMaxSize; + SaHpiTimeT UpdateTimestamp; + SaHpiTimeT CurrentTime; + SaHpiBoolT Enabled; + SaHpiBoolT OverflowFlag; + SaHpiBoolT OverflowResetable; + SaHpiEventLogOverflowActionT OverflowAction; +} SaHpiEventLogInfoT; +/* +** Event Log Entry +** These types define the Event Log entry. +*/ +typedef SaHpiUint32T SaHpiEventLogEntryIdT; +/* Reserved values for Event Log entry IDs */ +#define SAHPI_OLDEST_ENTRY (SaHpiEventLogEntryIdT)0x00000000 +#define SAHPI_NEWEST_ENTRY (SaHpiEventLogEntryIdT)0xFFFFFFFF +#define SAHPI_NO_MORE_ENTRIES (SaHpiEventLogEntryIdT)0xFFFFFFFE + +typedef struct { + SaHpiEventLogEntryIdT EntryId; /* Entry ID for record */ + SaHpiTimeT Timestamp; /* Time at which the event was placed + in the Event Log. If less than or equal to + SAHPI_TIME_MAX_RELATIVE, then it is + relative; if it is greater than SAHPI_TIME_ + MAX_RELATIVE, then it is absolute. */ + SaHpiEventT Event; /* Logged Event */ +} SaHpiEventLogEntryT; + + +/******************************************************************************* +** +** Name: saHpiVersionGet() +** +** Description: +** This function returns the version identifier of the SaHpi specification +** version supported by the HPI implementation. +** +** Parameters: +** None. +** +** Return Value: +** The interface version identifier, of type SaHpiVersionT is returned. +** +** Remarks: +** This function differs from all other interface functions in that it +** returns the version identifier rather than a standard return code. This is +** because the version itself is necessary in order for an HPI User to +** properly interpret subsequent API return codes. Thus, the +** saHpiVersionGet() function returns the interface version identifier +** unconditionally. +** +** This function returns the value of the header file symbol +** SAHPI_INTERFACE_VERSION in the SaHpi.h header file used when the library +** was compiled. An HPI User may compare the returned value to the +** SAHPI_INTERFACE_VERSION symbol in the SaHpi.h header file used by the +** calling program to determine if the accessed library is compatible with the +** calling program. +** +*******************************************************************************/ +SaHpiVersionT SAHPI_API saHpiVersionGet ( void ); + +/******************************************************************************* +** +** Name: saHpiSessionOpen() +** +** Description: +** This function opens an HPI session for a given domain and set of security +** characteristics (future). +** +** Parameters: +** DomainId - [in] Domain identifier of the domain to be accessed by the HPI +** User. A domain identifier of SAHPI_UNSPECIFIED_DOMAIN_ID requests that +** a session be opened to a default domain. +** SessionId - [out] Pointer to a location to store an identifier for the +** newly opened session. This identifier is used for subsequent access to +** domain resources and events. +** SecurityParams - [in] Pointer to security and permissions data structure. +** This parameter is reserved for future use, and must be set to NULL. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_DOMAIN is returned if no domain matching the specified +** domain identifier exists. +** SA_ERR_HPI_INVALID_PARAMS is returned if: +** * A non-null SecurityParams pointer is passed. +** * The SessionId pointer is passed in as NULL. +** SA_ERR_HPI_OUT_OF_SPACE is returned if no more sessions can be opened. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSessionOpen ( + SAHPI_IN SaHpiDomainIdT DomainId, + SAHPI_OUT SaHpiSessionIdT *SessionId, + SAHPI_IN void *SecurityParams +); + +/******************************************************************************* +** +** Name: saHpiSessionClose() +** +** Description: +** This function closes an HPI session. After closing a session, the SessionId +** will no longer be valid. +** +** Parameters: +** SessionId - [in] Session identifier previously obtained using +** saHpiSessionOpen(). +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSessionClose ( + SAHPI_IN SaHpiSessionIdT SessionId +); + +/******************************************************************************* +** +** Name: saHpiDiscover() +** +** Description: +** This function requests the underlying management service to discover +** information about resources and associated domains. +** +** This function may be called during operation to update the DRT table and +** the RPT table. An HPI implementation may exhibit latency between when +** hardware changes occur and when the domain DRT and RPT are updated. To +** overcome this latency, the saHpiDiscover() function may be called. When +** this function returns, the DRT and RPT should be updated to reflect the +** current system configuration and status. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained +** using saHpiSessionOpen(). +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiDiscover ( + SAHPI_IN SaHpiSessionIdT SessionId +); + +/******************************************************************************* +** +** Name: saHpiDomainInfoGet() +** +** Description: +** This function is used for requesting information about the domain, the +** Domain Reference Table (DRT), the Resource Presence Table (RPT), and the +** Domain Alarm Table (DAT), such as table update counters and timestamps, and +** the unique domain identifier associated with the domain. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained +** using saHpiSessionOpen(). +** DomainInfo - [out] Pointer to the information describing the domain and +** DRT. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_PARAMS is returned if the DomainInfo pointer is passed +** in as NULL. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiDomainInfoGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiDomainInfoT *DomainInfo +); + +/******************************************************************************* +** +** Name: saHpiDrtEntryGet() +** +** Description: +** This function retrieves domain information for the specified entry of the +** DRT. This function allows an HPI User to read the DRT entry-by-entry. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** EntryId - [in] Identifier of the DRT entry to retrieve. Reserved EntryId +** values: +** * SAHPI_FIRST_ENTRY Get first entry +** * SAHPI_LAST_ENTRY Reserved as delimiter for end of list. Not a +** valid entry identifier. +** NextEntryId - [out] Pointer to location to store the EntryId of next entry +** in DRT. +** DrtEntry - [out] Pointer to the structure to hold the returned DRT entry. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_NOT_PRESENT is returned if the: +** * Entry identified by EntryId is not present. +** * EntryId is SAHPI_FIRST_ENTRY and the DRT is empty. +** SA_ERR_HPI_INVALID_PARAMS is returned if the: +** * DrtEntry pointer is passed in as NULL. +** * NextEntryId pointer is passed in as NULL. +** * EntryId is an invalid reserved value such as SAHPI_LAST_ENTRY. +** +** Remarks: +** If the EntryId parameter is set to SAHPI_FIRST_ENTRY, the first entry in +** the DRT will be returned. When an entry is successfully retrieved, +** NextEntryId will be set to the identifier of the next valid entry; however, +** when the last entry has been retrieved, NextEntryId will be set to +** SAHPI_LAST_ENTRY. To retrieve an entire list of entries, call this function +** first with an EntryId of SAHPI_FIRST_ENTRY and then use the returned +** NextEntryId in the next call. Proceed until the NextEntryId returned is +** SAHPI_LAST_ENTRY. +** +** If an HPI User has not subscribed to receive events and a DRT entry is +** added while the DRT is being read, that new entry may be missed. The +** update counter provides a means for insuring that no domains are missed +** when stepping through the DRT. In order to use this feature, an HPI User +** should call saHpiDomainInfoGet() to get the update counter value before +** retrieving the first DRT entry. After reading the last entry, the HPI User +** should again call saHpiDomainInfoGet() to get the update counter value. If +** the update counter has not been incremented, no new entries have been +** added. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiDrtEntryGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiEntryIdT EntryId, + SAHPI_OUT SaHpiEntryIdT *NextEntryId, + SAHPI_OUT SaHpiDrtEntryT *DrtEntry +); + +/******************************************************************************* +** +** Name: saHpiDomainTagSet() +** +** Description: +** This function allows an HPI User to set a descriptive tag for a particular +** domain. The domain tag is an informational value that supplies an HPI User +** with naming information for the domain. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** DomainTag - [in] Pointer to SaHpiTextBufferT containing the domain tag. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_PARAMS is returned if the SaHpiTextBufferT structure +** passed as DomainTag is not valid. This would occur when: +** * The DataType is not one of the enumerated values for that type, or +** * The data field contains characters that are not legal according to +** the value of DataType, or +** * The Language is not one of the enumerated values for that type when +** the DataType is SAHPI_TL_TYPE_UNICODE or SAHPI_TL_TYPE_TEXT. +** SA_ERR_HPI_INVALID_PARAMS is returned if the DomainTag pointer is passed in +** as NULL. +** +** Remarks: +** Typically, the HPI implementation will provide an appropriate default value +** for the domain tag; this function is provided so that an HPI User can +** override the default, if desired. The value of the domain tag may be +** retrieved from the domain's information structure. +** +** The domain tag is not necessarily persistent, and may return to its default +** value if the domain controller function for the domain restarts. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiDomainTagSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiTextBufferT *DomainTag +); + +/******************************************************************************* +** +** Name: saHpiRptEntryGet() +** +** Description: +** This function retrieves resource information for the specified entry of the +** resource presence table. This function allows an HPI User to read the RPT +** entry-by-entry. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** EntryId - [in] Identifier of the RPT entry to retrieve. Reserved EntryId +** values: +** * SAHPI_FIRST_ENTRY Get first entry. +** * SAHPI_LAST_ENTRY Reserved as delimiter for end of list. Not a +** valid entry identifier. +** NextEntryId - [out] Pointer to location to store the EntryId of next entry +** in RPT. +** RptEntry - [out] Pointer to the structure to hold the returned RPT entry. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_NOT_PRESENT is returned when the: +** * Entry identified by EntryId is not present. +** * EntryId is SAHPI_FIRST_ENTRY and the RPT is empty. +** SA_ERR_HPI_INVALID_PARAMS is returned if the: +** * RptEntry pointer is passed in as NULL. +** * NextEntryId pointer is passed in as NULL. +** * EntryId is an invalid reserved value such as SAHPI_LAST_ENTRY. +** +** Remarks: +** If the EntryId parameter is set to SAHPI_FIRST_ENTRY, the first entry in +** the RPT will be returned. When an entry is successfully retrieved, +** NextEntryId will be set to the identifier of the next valid entry; however, +** when the last entry has been retrieved, NextEntryId will be set to +** SAHPI_LAST_ENTRY. To retrieve an entire list of entries, call this function +** first with an EntryId of SAHPI_FIRST_ENTRY and then use the returned +** NextEntryId in the next call. Proceed until the NextEntryId returned is +** SAHPI_LAST_ENTRY. +** +** At initialization, an HPI User may not wish to turn on eventing, since the +** context of the events, as provided by the RPT, is not known. In this +** instance, if a FRU is inserted into the system while the RPT is being read +** entry by entry, the resource associated with that FRU may be missed. (Keep +** in mind that there is no specified ordering for the RPT entries.) The +** update counter provides a means for insuring that no resources are missed +** when stepping through the RPT. In order to use this feature, an HPI User +** should invoke saHpiDomainInfoGet(), and get the update counter value before +** retrieving the first RPT entry. After reading the last entry, an HPI User +** should again invoke the saHpiDomainInfoGet() to get the RPT update counter +** value. If the update counter has not been incremented, no new records have +** been added. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRptEntryGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiEntryIdT EntryId, + SAHPI_OUT SaHpiEntryIdT *NextEntryId, + SAHPI_OUT SaHpiRptEntryT *RptEntry +); + +/******************************************************************************* +** +** Name: saHpiRptEntryGetByResourceId() +** +** Description: +** This function retrieves resource information from the resource presence +** table for the specified resource using its ResourceId. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained +** using saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** RptEntry - [out] Pointer to structure to hold the returned RPT entry. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_PARAMS is returned if the RptEntry pointer is passed +** in as NULL. +** +** Remarks: +** Typically at start-up, the RPT is read entry-by-entry, using +** saHpiRptEntryGet(). From this, an HPI User can establish the set of +** ResourceIds to use for future calls to the HPI functions. +** +** However, there may be other ways of learning ResourceIds without first +** reading the RPT. For example, resources may be added to the domain while +** the system is running in response to a hot swap action. When a resource is +** added, the application will receive a hot swap event containing the +** ResourceId of the new resource. The application may then want to search the +** RPT for more detailed information on the newly added resource. In this +** case, the ResourceId can be used to locate the applicable RPT entry +** information. +** +** Note that saHpiRptEntryGetByResourceId() is valid in any hot swap state, +** except for SAHPI_HS_STATE_NOT_PRESENT. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRptEntryGetByResourceId ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiRptEntryT *RptEntry +); + +/******************************************************************************* +** +** Name: saHpiResourceSeveritySet() +** +** Description: +** This function allows an HPI User to set the severity level applied to an +** event issued if a resource unexpectedly becomes unavailable to the HPI. A +** resource may become unavailable for several reasons including: +** * The FRU associated with the resource is no longer present in the +** system (a surprise extraction has occurred.) +** * A catastrophic failure has occurred. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** Severity - [in] Severity level of event issued when the resource +** unexpectedly becomes unavailable to the HPI. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_PARAMS is returned when the value for Severity is not +** one of the valid enumerated values for this type. +** +** Remarks: +** Typically, the HPI implementation will provide an appropriate default value +** for the resource severity, which may vary by resource; an HPI User can +** override this default value by use of this function. +** +** If a resource is removed from, then re-added to the RPT (e.g., because of a +** hot swap action), the HPI implementation may reset the value of the +** resource severity. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceSeveritySet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSeverityT Severity +); + +/******************************************************************************* +** +** Name: saHpiResourceTagSet() +** +** Description: +** This function allows an HPI User to set the resource tag of an RPT entry +** for a particular resource. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** ResourceTag - [in] Pointer to SaHpiTextBufferT containing the resource tag. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_PARAMS is returned if the SaHpiTextBufferT structure +** passed as ResourceTag is not valid. This would occur when: +** * The DataType is not one of the enumerated values for that type, or +** * The data field contains characters that are not legal according to the +** value of DataType, or +** * The Language is not one of the enumerated values for that type when +** the DataType is SAHPI_TL_TYPE_UNICODE or SAHPI_TL_TYPE_TEXT. +** SA_ERR_HPI_INVALID_PARAMS is returned if the ResourceTag pointer is passed +** in as NULL. +** +** Remarks: +** The resource tag is a data field within an RPT entry available to an HPI +** User for associating application specific data with a resource. HPI User +** supplied data is purely informational and is not used by the HPI +** implementation, domain, or associated resource. For example, an HPI User +** can set the resource tag to a "descriptive" value, which can be used to +** identify the resource in messages to a human operator. +** +** Since the resource tag is contained within an RPT entry, its scope is +** limited to a single domain. A resource that exists in more than one domain +** will have independent resource tags within each domain. +** +** Typically, the HPI implementation will provide an appropriate default value +** for the resource tag; this function is provided so that an HPI User can +** override the default, if desired. The value of the resource tag may be +** retrieved from the resource's RPT entry. +** +** If a resource is removed from, then re-added to the RPT (e.g., because of a +** hot swap action), the HPI implementation may reset the value of the +** resource tag. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceTagSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiTextBufferT *ResourceTag +); + +/******************************************************************************* +** +** Name: saHpiResourceIdGet() +** +** Description: +** This function returns the ResourceId of the resource associated with the +** entity upon which the HPI User is running. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [out] Pointer to location to hold the returned ResourceId. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_PARAMS is returned if the ResourceId pointer is passed +** in as NULL. +** SA_ERR_HPI_NOT_PRESENT is returned if the entity the HPI User is running on +** is not manageable in the addressed domain. +** SA_ERR_HPI_UNKNOWN is returned if the domain controller cannot determine an +** appropriate response. That is, there may be an appropriate ResourceId in +** the domain to return, but it cannot be determined. +** +** Remarks: +** This function must be issued within a session to a domain that includes a +** resource associated with the entity upon which the HPI User is running, or +** the SA_ERR_HPI_NOT_PRESENT return will be issued. +** +** Since entities are contained within other entities, there may be multiple +** possible resources that could be returned to this call. For example, if +** there is a ResourceId associated with a particular compute blade upon which +** the HPI User is running, and another associated with the chassis which +** contains the compute blade, either could logically be returned as an +** indication of a resource associated with the entity upon which the HPI User +** was running. The function should return the ResourceId of the "smallest" +** resource that is associated with the HPI User. So, in the example above, +** the function should return the ResourceId of the compute blade. +** +** Once the function has returned the ResourceId, the HPI User may issue +** further HPI calls using that ResourceId to learn the type of resource that +** been identified. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceIdGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiResourceIdT *ResourceId +); + +/******************************************************************************* +** +** Name: saHpiEventLogInfoGet() +** +** Description: +** This function retrieves the current number of entries in the Event Log, +** total size of the Event Log, the time of the most recent update to the +** Event Log, the current value of the Event Log's clock (i.e., timestamp that +** would be placed on an entry at this moment), the enabled/disabled status of +** the Event Log (see Section 6.4.8 on page 57), the overflow flag, and the +** action taken by the Event Log if an overflow occurs. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Identifier for the Resource containing the Event Log. +** Set to SAHPI_UNSPECIFIED_RESOURCE_ID to address the Domain Event Log. +** Info - [out] Pointer to the returned Event Log information. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not have an Event +** Log capability (SAHPI_CAPABILITY_EVENT_LOG) set. Note this condition +** only applies to Resource Event Logs. Domain Event Logs are mandatory, +** and should not return this code. +** SA_ERR_HPI_INVALID_PARAMS is returned if the Info pointer is passed in as +** NULL. +** +** Remarks: +** The size field in the returned Event Log information indicates the maximum +** number of entries that can be held in the Event Log. This number should be +** constant for a particular Event Log. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogInfoGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiEventLogInfoT *Info +); + +/******************************************************************************* +** +** Name: saHpiEventLogEntryGet() +** +** Description: +** This function retrieves an Event Log entry. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Identifier for the Resource containing the Event Log. +** Set to SAHPI_UNSPECIFIED_RESOURCE_ID to address the Domain Event Log. +** EntryId - [in] Identifier of event log entry to retrieve. Reserved values: +** * SAHPI_OLDEST_ENTRY Oldest entry in the Event Log. +** * SAHPI_NEWEST_ENTRY Newest entry in the Event Log. +** * SAHPI_NO_MORE_ENTRIES Not valid for this parameter. Used only when +** retrieving the next and previous EntryIds. +** PrevEntryId - [out] Event Log entry identifier for the previous (older +** adjacent) entry. Reserved values: +** * SAHPI_OLDEST_ENTRY Not valid for this parameter. Used only for +** the EntryId parameter. +** * SAHPI_NEWEST_ENTRY Not valid for this parameter. Used only for +** the EntryId parameter. +** * SAHPI_NO_MORE_ENTRIES No more entries in the Event Log before the +** one referenced by the EntryId parameter. +** NextEntryId - [out] Event Log entry identifier for the next (newer +** adjacent) entry. Reserved values: +** * SAHPI_OLDEST_ENTRY Not valid for this parameter. Used only for +** the EntryId parameter. +** * SAHPI_NEWEST_ENTRY Not valid for this parameter. Used only for +** the EntryId parameter. +** * SAHPI_NO_MORE_ENTRIES No more entries in the Event Log after the one +** referenced by the EntryId parameter. +** EventLogEntry - [out] Pointer to retrieved Event Log entry. +** Rdr - [in/out] Pointer to structure to receive resource data record +** associated with the Event Log entry, if available. If NULL, no RDR data +** will be returned. +** RptEntry - [in/out] Pointer to structure to receive RPT entry associated +** with the Event Log entry, if available. If NULL, no RPT entry data will +** be returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not have an Event +** Log capability (SAHPI_CAPABILITY_EVENT_LOG) set. Note this condition +** only applies to Resource Event Logs. Domain Event Logs are mandatory, +** and should not return this code. +** SA_ERR_HPI_NOT_PRESENT is returned when: +** * The Event Log has no entries. +** * The entry identified by EntryId is not present. +** SA_ERR_HPI_INVALID_PARAMS is returned when: +** * Any of PrevEntryId, NextEntryId and EventLogEntry pointers are passed +** in as NULL. +** * SAHPI_NO_MORE_ENTRIES is passed in to EntryId. +** +** Remarks: +** The special EntryIds SAHPI_OLDEST_ENTRY and SAHPI_NEWEST_ENTRY are used to +** select the oldest and newest entries, respectively, in the Event Log being +** read. A returned NextEntryId of SAHPI_NO_MORE_ENTRIES indicates that the +** newest entry has been returned; there are no more entries going forward +** (time-wise) in the Event Log. A returned PrevEntryId of +** SAHPI_NO_MORE_ENTRIES indicates that the oldest entry has been returned. +** +** To retrieve an entire list of entries going forward (oldest entry to newest +** entry) in the Event Log, call this function first with an EntryId of +** SAHPI_OLDEST_ENTRY and then use the returned NextEntryId as the EntryId in +** the next call. Proceed until the NextEntryId returned is +** SAHPI_NO_MORE_ENTRIES. +** +** To retrieve an entire list of entries going backward (newest entry to +** oldest entry) in the Event Log, call this function first with an EntryId of +** SAHPI_NEWEST_ENTRY and then use the returned PrevEntryId as the EntryId in +** the next call. Proceed until the PrevEntryId returned is +** SAHPI_NO_MORE_ENTRIES. +** +** Event Logs may include RPT entries and resource data records associated +** with the resource and sensor issuing an event along with the basic event +** data in the Event Log. Because the system may be reconfigured after the +** event was entered in the Event Log, this stored information may be +** important to interpret the event. If the Event Log includes logged RPT +** entries and/or RDRs, and if an HPI User provides a pointer to a structure +** to receive this information, it will be returned along with the Event Log +** entry. +** +** If an HPI User provides a pointer for an RPT entry, but the Event Log does +** not include a logged RPT entry for the Event Log entry being returned, +** RptEntry->ResourceCapabilities will be set to zero. No valid RptEntry will +** have a zero Capabilities field value. +** +** If an HPI User provides a pointer for an RDR, but the Event Log does not +** include a logged RDR for the Event Log entry being returned, Rdr->RdrType +** will be set to SAHPI_NO_RECORD. +** +** The EntryIds returned via the PrevEntryId and NextEntryId parameters may +** not be in sequential order, but will reflect the previous and next entries +** in a chronological ordering of the Event Log, respectively. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogEntryGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiEventLogEntryIdT EntryId, + SAHPI_OUT SaHpiEventLogEntryIdT *PrevEntryId, + SAHPI_OUT SaHpiEventLogEntryIdT *NextEntryId, + SAHPI_OUT SaHpiEventLogEntryT *EventLogEntry, + SAHPI_INOUT SaHpiRdrT *Rdr, + SAHPI_INOUT SaHpiRptEntryT *RptEntry +); + +/******************************************************************************* +** +** Name: saHpiEventLogEntryAdd() +** +** Description: +** This function enables an HPI user to add entries to the Event Log. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Identifier for the Resource containing the Event Log. +** Set to SAHPI_UNSPECIFIED_RESOURCE_ID to address the Domain Event Log. +** EvtEntry - [in] Pointer to event data to write to the Event Log. The Event +** field must be of type SAHPI_ET_USER, and the Source field must be +** SAHPI_UNSPECIFIED_RESOURCE_ID. +** +** Return Value: +** SA_OK is returned if the event is successfully written in the Event Log; +** otherwise, an error code is returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not have an Event +** Log capability (SAHPI_CAPABILITY_EVENT_LOG) set. Note this condition +** only applies to Resource Event Logs. Domain Event Logs are mandatory, +** and should not return this code. +** SA_ERR_HPI_INVALID_DATA is returned if the event DataLength is larger than +** that supported by the implementation and reported in the Event Log info +** record. +** SA_ERR_HPI_INVALID_PARAMS is returned if the: +** * EvtEntry pointer is passed in as NULL. +** * Event structure passed via the EvtEntry parameter is not an event of +** type SAHPI_ET_USER with the Source field set to +** SAHPI_UNSPECIFIED_RESOURCE_ID. +** * The Severity is not one of the valid enumerated values for this type. +** * SaHpiTextBufferT structure passed as part of the User Event structure +** is not valid. This would occur when: +** * The DataType is not one of the enumerated values for that type, or +** * The data field contains characters that are not legal according to +** the value of DataType, or +** * The Language is not one of the enumerated values for that type when +** the DataType is SAHPI_TL_TYPE_UNICODE or SAHPI_TL_TYPE_TEXT. +** SA_ERR_HPI_OUT_OF_SPACE is returned if the event cannot be written to the +** Event Log because the Event Log is full, and the Event Log +** OverflowAction is SAHPI_EL_OVERFLOW_DROP. +** +** Remarks: +** This function writes an event in the addressed Event Log. Nothing else is +** done with the event. +** +** If the Event Log is full, overflow processing occurs as defined by the +** Event Log's OverflowAction setting, reported in the Event Log info record. +** If, due to an overflow condition, the event is not written, or if existing +** events are overwritten, then the OverflowFlag in the Event Log info record +** will be set, just as it would be if an internally generated event caused +** an overflow condition. If the Event Log's OverflowAction is +** SAHPI_EL_OVERFLOW_DROP, then an error will be returned +** (SA_ERR_HPI_OUT_OF_SPACE) indicating that the saHpiEventLogEntryAdd() +** function did not add the event to the Event Log. If the Event Log's +** OverflowAction is SAHPI_EL_OVERFLOW_OVERWRITE, then the +** saHpiEventLogEntryAdd() function will return SA_OK, indicating that the +** event was added to the Event Log, even though an overflow occurred as a +** side-effect of this operation. The overflow may be detected by checking +** the OverflowFlag in the Event Log info record. +** +** Specific implementations of HPI may have restrictions on how much data may +** be passed to the saHpiEventLogEntryAdd() function. The Event Log info +** record reports the maximum DataLength that is supported by the Event Log +** for User Events. If saHpiEventLogEntryAdd() is called with a User Event +** that has a larger DataLength than is supported, the event will not be added +** to the Event Log, and an error will be returned. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogEntryAdd ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiEventT *EvtEntry +); + +/******************************************************************************* +** +** Name: saHpiEventLogClear() +** +** Description: +** This function erases the contents of the specified Event Log. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Identifier for the Resource containing the Event Log. +** Set to SAHPI_UNSPECIFIED_RESOURCE_ID to address the Domain Event Log. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not have an Event +** Log capability (SAHPI_CAPABILITY_EVENT_LOG) set. Note this condition +** only applies to Resource Event Logs. Domain Event Logs are mandatory, +** and should not return this code +** +** Remarks: +** The OverflowFlag field in the Event Log info record will be reset when this +** function is called. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogClear ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + +/******************************************************************************* +** +** Name: saHpiEventLogTimeGet() +** +** Description: +** This function retrieves the current time from the Event Log's clock. This +** clock is used to timestamp entries written into the Event Log. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Identifier for the Resource containing the Event Log. +** Set to SAHPI_UNSPECIFIED_RESOURCE_ID to address the Domain Event Log. +** Time - [out] Pointer to the returned current Event Log time. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not have an Event +** Log capability (SAHPI_CAPABILITY_EVENT_LOG) set. Note this condition +** only applies to Resource Event Logs. Domain Event Logs are mandatory, +** and should not return this code. +** SA_ERR_HPI_INVALID_PARAMS is returned if the Time pointer is passed in as +** NULL. +** +** Remarks: +** If the implementation cannot supply an absolute time value, then it may +** supply a time relative to some system-defined epoch, such as system boot. +** If the time value is less than or equal to SAHPI_TIME_MAX_RELATIVE, then it +** is relative; if it is greater than SAHPI_TIME_MAX_RELATIVE, then it is +** absolute. The HPI implementation must provide valid timestamps for Event +** Log entries, using a default time base if no time has been set. Thus, the +** value SAHPI_TIME_UNSPECIFIED is never returned. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogTimeGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiTimeT *Time +); + +/******************************************************************************* +** +** Name: saHpiEventLogTimeSet() +** +** Description: +** This function sets the Event Log's clock, which is used to timestamp events +** written into the Event Log. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Identifier for the Resource containing the Event Log. +** Set to SAHPI_UNSPECIFIED_RESOURCE_ID to address the Domain Event Log. +** Time - [in] Time to which the Event Log clock should be set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not have an Event +** Log capability (SAHPI_CAPABILITY_EVENT_LOG) set. Note this condition +** only applies to Resource Event Logs. Domain Event Logs are mandatory, +** and should not return this code. +** SA_ERR_HPI_INVALID_PARAMS is returned when the Time parameter is set to +** SAHPI_TIME_UNSPECIFIED. +** For situations when the underlying implementation cannot represent a time +** value that is specified in Time, SA_ERR_HPI_INVALID_DATA is returned. +** +** Remarks: +** If the Time parameter value is less than or equal to +** SAHPI_TIME_MAX_RELATIVE, but not SAHPI_TIME_UNSPECIFIED, then it is +** relative; if it is greater than SAHPI_TIME_MAX_RELATIVE, then it is +** absolute. Setting this parameter to the value SAHPI_TIME_UNSPECIFIED is +** invalid and will result in an error return code of +** SA_ERR_HPI_INVALID_PARAMS. +** +** Entries placed in the Event Log after this function is called will have +** Event Log timestamps (i.e., the Timestamp field in the SaHpiEventLogEntryT +** structure) based on the new time. Setting the clock does not affect +** existing Event Log entries. If the time is set to a relative time, +** subsequent entries placed in the Event Log will have an Event Log timestamp +** expressed as a relative time; if the time is set to an absolute time, +** subsequent entries will have an Event Log timestamp expressed as an +** absolute time. +** +** This function only sets the Event Log time clock and does not have any +** direct bearing on the timestamps placed on events (i.e., the Timestamp +** field in the SaHpiEventT structure), or the timestamps placed in the domain +** RPT info record. Setting the clocks used to generate timestamps other than +** Event Log timestamps is implementation-dependent, and should be documented +** by the HPI implementation provider. +** +** Some underlying implementations may not be able to handle the same relative +** and absolute time ranges, as those defined in HPI. Such limitations will +** be documented. When a time value is set in a region that is not supported +** by the implementation, an error code of SA_ERR_HPI_INVALID_DATA will be +** returned. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogTimeSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiTimeT Time +); + +/******************************************************************************* +** +** Name: saHpiEventLogStateGet() +** +** Description: +** This function enables an HPI User to get the Event Log state. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Identifier for the Resource containing the Event Log. +** Set to SAHPI_UNSPECIFIED_RESOURCE_ID to address the Domain Event Log. +** EnableState - [out] Pointer to the current Event Log enable state. True +** indicates that the Event Log is enabled; False indicates that it is +** disabled. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not have an Event +** Log capability (SAHPI_CAPABILITY_EVENT_LOG) set. Note this condition +** only applies to Resource Event Logs. Domain Event Logs are mandatory, +** and should not return this code. +** SA_ERR_HPI_INVALID_PARAMS is returned if the EnableState pointer is passed +** in as NULL. +** +** Remarks: +** If the Event Log is disabled, no events generated within the HPI +** implementation will be added to the Event Log. Events may still be added to +** the Event Log with the saHpiEventLogEntryAdd() function. When the Event Log +** is enabled, events may be automatically added to the Event Log as they are +** generated in a resource or a domain, however, it is implementation-specific +** which events are automatically added to any Event Log. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiBoolT *EnableState +); + +/******************************************************************************* +** +** Name: saHpiEventLogStateSet() +** +** Description: +** This function enables an HPI User to set the Event Log enabled state. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Identifier for the Resource containing the Event Log. +** Set to SAHPI_UNSPECIFIED_RESOURCE_ID to address the Domain Event Log. +** EnableState - [in] Event Log state to be set. True indicates that the Event +** Log is to be enabled; False indicates that it is to be disabled. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not have an Event +** Log capability (SAHPI_CAPABILITY_EVENT_LOG) set. Note this condition +** only applies to Resource Event Logs. Domain Event Logs are mandatory, +** and should not return this code. +** +** Remarks: +** If the Event Log is disabled no events generated within the HPI +** implementation will be added to the Event Log. Events may still be added to +** the Event Log using the saHpiEventLogEntryAdd() function. When the Event +** Log is enabled events may be automatically added to the Event Log as they +** are generated in a resource or a domain. The actual set of events that are +** automatically added to any Event Log is implementation-specific. +** +** Typically, the HPI implementation will provide an appropriate default value +** for this parameter, which may vary by resource. This function is provided +** so that an HPI User can override the default, if desired. +** +** If a resource hosting an Event Log is re-initialized (e.g., because of a +** hot swap action), the HPI implementation may reset the value of this +** parameter. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiBoolT EnableState +); + +/******************************************************************************* +** +** Name: saHpiEventLogOverflowReset() +** +** Description: +** This function resets the OverflowFlag in the Event Log info record of the +** specified Event Log. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Identifier for the Resource containing the Event Log. +** Set to SAHPI_UNSPECIFIED_RESOURCE_ID to address the Domain Event Log. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_CMD is returned if the implementation does not support +** independent clearing of the OverflowFlag on this Event Log. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not have an Event +** Log capability (SAHPI_CAPABILITY_EVENT_LOG) set. Note this condition +** only applies to Resource Event Logs. Domain Event Logs are mandatory, +** and should not return this code. +** +** Remarks: +** The only effect of this function is to clear the OverflowFlag field in the +** Event Log info record for the specified Event Log. If the Event Log is +** still full, the OverflowFlag will be set again as soon as another entry +** needs to be added to the Event Log. +** +** Some Event Log implementations may not allow resetting of the OverflowFlag +** except as a by-product of clearing the entire Event Log with the +** saHpiEventLogClear() function. Such an implementation will return the +** error code, SA_ERR_HPI_INVALID_CMD to this function. The OverflowResetable +** flag in the Event Log info record indicates whether or not the +** implementation supports resetting the OverflowFlag without clearing the +** Event Log. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventLogOverflowReset ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + +/******************************************************************************* +** +** Name: saHpiSubscribe() +** +** Description: +** This function allows an HPI User to subscribe for events. This single call +** provides subscription to all session events, regardless of event type or +** event severity. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_DUPLICATE is returned when a subscription is already in place +** for this session. +** +** Remarks: +** Only one subscription is allowed per session, and additional subscribers +** will receive an appropriate error code. No event filtering will be done by +** the HPI implementation. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSubscribe ( + SAHPI_IN SaHpiSessionIdT SessionId +); + +/******************************************************************************* +** +** Name: saHpiUnsubscribe() +** +** Description: +** This function removes the event subscription for the session. +** +** Parameters: +** SessionId - [in] Session for which event subscription will be closed. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_REQUEST is returned if the session is not currently +** subscribed for events. +** +** Remarks: +** After removal of a subscription, additional saHpiEventGet() calls will not +** be allowed on the session unless an HPI User re-subscribes for events on +** the session first. Any events that are still in the event queue when this +** function is called will be cleared from it. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiUnsubscribe ( + SAHPI_IN SaHpiSessionIdT SessionId +); + +/******************************************************************************* +** +** Name: saHpiEventGet() +** +** Description: +** This function allows an HPI User to get an event. This call is only valid +** within a session that has subscribed for events. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** Timeout - [in] The number of nanoseconds to wait for an event to arrive. +** Reserved time out values: +** * SAHPI_TIMEOUT_IMMEDIATE Time out immediately if there are no events +** available (non-blocking call). +** * SAHPI_TIMEOUT_BLOCK Call should not return until an event is +** retrieved. +** Event - [out] Pointer to the next available event. +** Rdr - [in/out] Pointer to structure to receive the resource data associated +** with the event. If NULL, no RDR will be returned. +** RptEntry - [in/out] Pointer to structure to receive the RPT entry +** associated with the resource that generated the event. If NULL, no RPT +** entry will be returned. +** EventQueueStatus - [in/out] Pointer to location to store event queue +** status. If NULL, event queue status will not be returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_REQUEST is returned if an HPI User is not currently +** subscribed for events in this session. +** SA_ERR_HPI_INVALID_PARAMS is returned if the: +** * Event pointer is passed in as NULL. +** * Timeout parameter is not set to SAHPI_TIMEOUT_BLOCK, +** SAHPI_TIMEOUT_IMMEDIATE or a positive value. +** SA_ERR_HPI_TIMEOUT is returned if no event is available to return within +** the timeout period. If SAHPI_TIMEOUT_IMMEDIATE is passed in the +** Timeout parameter, this error return will be used if there is no event +** queued when the function is called. +** +** Remarks: +** SaHpiEventGet() will also return an EventQueueStatus flag to an HPI User. +** This flag indicates whether or not a queue overflow has occurred. The +** overflow flag is set if any events were unable to be queued because of +** space limitations in the interface implementation. The overflow flag is +** reset whenever saHpiEventGet() is called. +** +** If there are one or more events on the event queue when this function is +** called, it will immediately return the next event on the queue. Otherwise, +** if the Timeout parameter is SAHPI_TIMEOUT_IMMEDIATE, it will return +** SA_ERR_HPI_TIMEOUT immediately. Otherwise, it will block for time +** specified by the timeout parameter; if an event is added to the queue +** within that time it will be returned immediately; if not, saHpiEventGet() +** will return SA_ERR_HPI_TIMEOUT. If the Timeout parameter is +** SAHPI_TIMEOUT_BLOCK, the saHpiEventGet() will block indefinitely, until +** an event becomes available, and then return that event. This provides for +** notification of events as they occur. +** +** If an HPI User provides a pointer for an RPT entry, but the event does not +** include a valid ResourceId for a resource in the domain (e.g., OEM or USER +** type event), then the RptEntry->ResourceCapabilities field will be set to +** zero. No valid RPT entry will have a zero ResourceCapabilities. +** +** If an HPI User provides a pointer for an RDR, but there is no valid RDR +** associated with the event being returned (e.g., returned event is not a +** sensor event), then the Rdr->RdrType field will be set to SAHPI_NO_RECORD. +** +** The timestamp reported in the returned event structure is the best +** approximation an implementation has to when the event actually occurred. +** The implementation may need to make an approximation (such as the time the +** event was placed on the event queue) because it may not have access to the +** actual time the event occurred. The value SAHPI_TIME_UNSPECIFIED indicates +** that the time of the event cannot be determined. +** +** If the implementation cannot supply an absolute timestamp, then it may +** supply a timestamp relative to some system-defined epoch, such as system +** boot. If the timestamp value is less than or equal to +** SAHPI_TIME_MAX_RELATIVE, but not SAHPI_TIME_UNSPECIFIED, then it is +** relative; if it is greater than SAHPI_TIME_MAX_RELATIVE, then it is +** absolute. +** +** If an HPI User passes a NULL pointer for the returned EventQueueStatus +** pointer, the event status will not be returned, but the overflow flag, if +** set, will still be reset. Thus, if an HPI User needs to know about event +** queue overflows, the EventQueueStatus parameter should never be NULL, and +** the overflow flag should be checked after every call to saHpiEventGet(). +** +** If saHpiEventGet() is called with a timeout value other than +** SAHPI_TIMEOUT_IMMEDIATE, and the session is subsequently closed from +** another thread, this function will return with SA_ERR_HPI_INVALID_SESSION. +** If saHpiEventGet() is called with a timeout value other than +** SAHPI_TIMEOUT_IMMEDIATE, and an HPI User subsequently calls +** saHpiUnsubscribe() from another thread, this function will return with +** SA_ERR_HPI_INVALID_REQUEST. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiTimeoutT Timeout, + SAHPI_OUT SaHpiEventT *Event, + SAHPI_INOUT SaHpiRdrT *Rdr, + SAHPI_INOUT SaHpiRptEntryT *RptEntry, + SAHPI_INOUT SaHpiEvtQueueStatusT *EventQueueStatus +); + +/******************************************************************************* +** +** Name: saHpiEventAdd() +** +** Description: +** This function enables an HPI User to add events to the HPI domain +** identified by the SessionId. The domain controller processes an event +** added with this function as if the event originated from within the +** domain. The domain controller will attempt to publish events to all active +** event subscribers and will attempt to log events in the Domain Event Log, +** if room is available. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** EvtEntry - [in] Pointer to event to add to the domain. Event must be of +** type SAHPI_ET_USER, and the Source field must be +** SAHPI_UNSPECIFIED_RESOURCE_ID. +** +** Return Value: +** SA_OK is returned if the event is successfully added to the domain; +** otherwise, an error code is returned. +** SA_ERR_HPI_INVALID_PARAMS is returned if the: +** * EvtEntry parameter is NULL. +** * Event structure passed via the EvtEntry parameter is not an event of +** type SAHPI_ET_USER with the Source field being +** SAHPI_UNSPECIFIED_RESOURCE_ID. +** * Event structure passed via the EvtEntry parameter has an invalid +** Severity. +** * SaHpiTextBufferT structure passed as part of the User Event structure +** is not valid. This would occur when: +** * The DataType is not one of the enumerated values for that type, or +** * The data field contains characters that are not legal according to +** the value of DataType, or +** * The Language is not one of the enumerated values for that type when +** the DataType is SAHPI_TL_TYPE_UNICODE or SAHPI_TL_TYPE_TEXT. +** SA_ERR_HPI_INVALID_DATA is returned if the event data does not meet +** implementation-specific restrictions on how much event data may be +** provided in a SAHPI_ET_USER event. +** +** Remarks: +** Specific implementations of HPI may have restrictions on how much data may +** be included in a SAHPI_ET_USER event. If more event data is provided than +** can be processed, an error will be returned. The event data size +** restriction for the SAHPI_ET_USER event type is provided in the +** UserEventMaxSize field in the domain Event Log info structure. An HPI User +** should call the function saHpiEventLogInfoGet() to retrieve the Event +** Log info structure. +** +** The domain controller will attempt to publish the event to all sessions +** within the domain with active event subscriptions; however, a session's +** event queue may overflow due to the addition of the new event. +** +** The domain controller will attempt to log the event in the Domain Event +** Log; however, the Domain Event Log may overflow due to the addition of the +** new event +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiEventAdd ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiEventT *EvtEntry +); + +/******************************************************************************* +** +** Name: saHpiAlarmGetNext() +** +** Description: +** This function allows retrieval of an alarm from the current set of alarms +** held in the Domain Alarm Table (DAT). +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** Severity - [in] Severity level of alarms to retrieve. Set to +** SAHPI_ALL_SEVERITIES to retrieve alarms of any severity; otherwise, set +** to requested severity level. +** UnacknowledgedOnly - [in] Set to True to indicate only unacknowledged +** alarms should be returned. Set to False to indicate either an +** acknowledged or unacknowledged alarm may be returned. +** Alarm - [in/out] Pointer to the structure to hold the returned alarm entry. +** Also, on input, Alarm->AlarmId and Alarm->Timestamp are used to +** identify the previous alarm. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_PARAMS is returned when: +** * Severity is not one of the valid enumerated values for this type. +** * The Alarm parameter is passed in as NULL. +** SA_ERR_HPI_NOT_PRESENT is returned: +** * If there are no additional alarms in the DAT that meet the criteria +** specified by the Severity and UnacknowledgedOnly parameters. +** * If the passed Alarm->AlarmId field was set to SAHPI_FIRST_ENTRY and +** there are no alarms in the DAT that meet the criteria specified by +** the Severity and UnacknowledgedOnly parameters. +** SA_ERR_HPI_INVALID_DATA is returned if the passed Alarm->AlarmId matches an +** alarm in the DAT, but the passed Alarm->Timestamp does not match the +** timestamp of that alarm. +** +** Remarks: +** All alarms contained in the DAT are maintained in the order in which they +** were added. This function will return the next alarm meeting the +** specifications given by an HPI User that was added to the DAT after the +** alarm whose AlarmId and Timestamp is passed by an HPI User, even if the +** alarm associated with the AlarmId and Timestamp has been deleted. If +** SAHPI_FIRST_ENTRY is passed as the AlarmId, the first alarm in the DAT +** meeting the specifications given by an HPI User is returned. +** +** Alarm selection can be restricted to only alarms of a specified severity, +** and/or only unacknowledged alarms. +** +** To retrieve all alarms contained within the DAT meeting specific +** requirements, call saHpiAlarmGetNext() with the Alarm->AlarmId field set to +** SAHPI_FIRST_ENTRY and the Severity and UnacknowledgedOnly parameters set to +** select what alarms should be returned. Then, repeatedly call +** saHpiAlarmGetNext() passing the previously returned alarm as the Alarm +** parameter, and the same values for Severity and UnacknowledgedOnly until +** the function returns with the error code SA_ERR_HPI_NOT_PRESENT. +** +** SAHPI_FIRST_ENTRY and SAHPI_LAST_ENTRY are reserved AlarmId values, and +** will never be assigned to an alarm in the DAT. +** +** The elements AlarmId and Timestamp are used in the Alarm parameter to +** identify the previous alarm; the next alarm added to the table after this +** alarm that meets the Severity and UnacknowledgedOnly requirements will be +** returned. Alarm->AlarmId may be set to SAHPI_FIRST_ENTRY to select the +** first alarm in the DAT meeting the Severity and UnacknowledgedOnly +** requirements. If Alarm->AlarmId is SAHPI_FIRST_ENTRY, then +** Alarm->Timestamp is ignored. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAlarmGetNext( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiSeverityT Severity, + SAHPI_IN SaHpiBoolT UnacknowledgedOnly, + SAHPI_INOUT SaHpiAlarmT *Alarm +); + +/******************************************************************************* +** +** Name: saHpiAlarmGet() +** +** Description: +** This function allows retrieval of a specific alarm in the Domain Alarm +** Table (DAT) by referencing its AlarmId. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** AlarmId - [in] AlarmId of the alarm to be retrieved from the DAT. +** Alarm - [out] Pointer to the structure to hold the returned alarm entry. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_NOT_PRESENT is returned if the requested AlarmId does not +** correspond to an alarm contained in the DAT. +** SA_ERR_HPI_INVALID_PARAMS is returned when the Alarm parameter is passed in +** as NULL. +** +** Remarks: +** SAHPI_FIRST_ENTRY and SAHPI_LAST_ENTRY are reserved AlarmId values, and +** will never be assigned to an alarm in the DAT. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAlarmGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiAlarmIdT AlarmId, + SAHPI_OUT SaHpiAlarmT *Alarm +); + +/******************************************************************************* +** +** Name: saHpiAlarmAcknowledge() +** +** Description: +** This function allows an HPI User to acknowledge a single alarm entry or a +** group of alarm entries by severity. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** AlarmId - [in] Identifier of the alarm to be acknowledged. Reserved +** AlarmId values: +** * SAHPI_ENTRY_UNSPECIFIED Ignore this parameter. +** Severity - [in] Severity level of alarms to acknowledge. Ignored unless +** AlarmId is SAHPI_ENTRY_UNSPECIFIED. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_NOT_PRESENT is returned if an alarm entry identified by the +** AlarmId parameter does not exist in the DAT. +** SA_ERR_HPI_INVALID_PARAMS is returned if AlarmId is SAHPI_ENTRY_UNSPECIFIED +** and Severity is not one of the valid enumerated values for this type. +** +** Remarks: +** An HPI User acknowledges an alarm to indicate that it is aware of the alarm +** and to influence platform-specific alarm annunciation that may be provided +** by the implementation. Typically, an implementation ignores acknowledged +** alarms when announcing an alarm on annunciation devices such as audible +** sirens and dry contact closures. However, alarm annunciation is +** implementation-specific. +** +** An acknowledged alarm will have the Acknowledged field in the alarm entry +** set to True. +** +** Alarms are acknowledged by one of two ways: a single alarm entry by AlarmId +** regardless of severity or as a group of alarm entries by Severity +** regardless of AlarmId. +** +** To acknowledge all alarms contained within the DAT, set the Severity +** parameter to SAHPI_ALL_SEVERITIES, and set the AlarmId parameter to +** SAHPI_ENTRY_UNSPECIFIED. +** +** To acknowledge all alarms of a specific severity contained within the DAT, +** set the Severity parameter to the appropriate value, and set the AlarmId +** parameter to SAHPI_ENTRY_UNSPECIFIED. +** +** To acknowledge a single alarm entry, set the AlarmId parameter to a value +** other than SAHPI_ENTRY_UNSPECIFIED. The AlarmId must be a valid identifier +** for an alarm entry present in the DAT at the time of the function call. +** +** If an alarm has been previously acknowledged, acknowledging it again has no +** effect. However, this is not an error. +** +** If the AlarmId parameter has a value other than SAHPI_ENTRY_UNSPECIFIED, +** the Severity parameter is ignored. +** +** If the AlarmId parameter is passed as SAHPI_ENTRY_UNSPECIFIED, and no +** alarms are present that meet the requested Severity, this function will +** have no effect. However, this is not an error. +** +** SAHPI_ENTRY_UNSPECIFIED is defined as the same value as SAHPI_FIRST_ENTRY, +** so using either symbol will have the same effect. However, +** SAHPI_ENTRY_UNSPECIFIED should be used with this function for clarity. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAlarmAcknowledge( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiAlarmIdT AlarmId, + SAHPI_IN SaHpiSeverityT Severity +); + +/******************************************************************************* +** +** Name: saHpiAlarmAdd() +** +** Description: +** This function is used to add a User Alarm to the DAT. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** Alarm - [in/out] Pointer to the alarm entry structure that contains the new +** User Alarm to add to the DAT. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_PARAMS is returned when the Alarm pointer is passed in +** as NULL. +** SA_ERR_HPI_INVALID_PARAMS is returned when Alarm->Severity is not one of +** the following enumerated values: SAHPI_MINOR, SAHPI_MAJOR, or +** SAHPI_CRITICAL. +** SA_ERR_HPI_INVALID_PARAMS is returned when Alarm->AlarmCond.Type is not +** SAHPI_STATUS_COND_TYPE_USER. +** SA_ERR_HPI_OUT_OF_SPACE is returned if the DAT is not able to add an +** additional User Alarm due to space limits or limits imposed on the +** number of User Alarms permitted in the DAT. +** +** Remarks: +** The AlarmId, and Timestamp fields within the Alarm parameter are not used +** by this function. Instead, on successful completion, these fields are set +** to new values associated with the added alarm. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAlarmAdd( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_INOUT SaHpiAlarmT *Alarm +); + +/******************************************************************************* +** +** Name: saHpiAlarmDelete() +** +** Description: +** This function allows an HPI User to delete a single User Alarm or a group +** of User Alarms from the DAT. Alarms may be deleted individually by +** specifying a specific AlarmId, or they may be deleted as a group by +** specifying a Severity. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** AlarmId - [in] Alarm identifier of the alarm entry to delete. Reserved +** values: +** * SAHPI_ENTRY_UNSPECIFIED Ignore this parameter. +** Severity - [in] Severity level of alarms to delete. Ignored unless AlarmId +** is SAHPI_ENTRY_UNSPECIFIED. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_PARAMS is returned if AlarmId is SAHPI_ENTRY_UNSPECIFIED +** and Severity is not one of the valid enumerated values for this type. +** SA_ERR_HPI_NOT_PRESENT is returned if an alarm entry identified by the +** AlarmId parameter does not exist in the DAT. +** SA_ERR_HPI_READ_ONLY is returned if the AlarmId parameter indicates a +** non-User Alarm. +** +** Remarks: +** Only User Alarms added to the DAT can be deleted. When deleting alarms by +** severity, only User Alarms of the requested severity will be deleted. +** +** To delete a single, specific alarm, set the AlarmId parameter to a value +** representing an actual User Alarm in the DAT. The Severity parameter is +** ignored when the AlarmId parameter is set to a value other than +** SAHPI_ENTRY_UNSPECIFIED. +** +** To delete a group of User Alarms, set the AlarmId parameter to +** SAHPI_ENTRY_UNSPECIFIED, and set the Severity parameter to identify which +** severity of alarms should be deleted. To clear all User Alarms contained +** within the DAT, set the Severity parameter to SAHPI_ALL_SEVERITIES. +** +** If the AlarmId parameter is passed as SAHPI_ENTRY_UNSPECIFIED, and no User +** Alarms are present that meet the specified Severity, this function will +** have no effect. However, this is not an error. +** +** SAHPI_ENTRY_UNSPECIFIED is defined as the same value as SAHPI_FIRST_ENTRY, +** so using either symbol will have the same effect. However, +** SAHPI_ENTRY_UNSPECIFIED should be used with this function for clarity. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAlarmDelete( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiAlarmIdT AlarmId, + SAHPI_IN SaHpiSeverityT Severity +); + +/******************************************************************************* +** +** Name: saHpiRdrGet() +** +** Description: +** This function returns a resource data record from the addressed resource. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** EntryId - [in] Identifier of the RDR entry to retrieve. Reserved EntryId +** values: +** * SAHPI_FIRST_ENTRY Get first entry. +** * SAHPI_LAST_ENTRY Reserved as delimiter for end of list. Not a +** valid entry identifier. +** NextEntryId - [out] Pointer to location to store EntryId of next entry in +** RDR repository. +** Rdr - [out] Pointer to the structure to receive the requested resource data +** record. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource contains no RDR records +** (and thus does not have the SAHPI_CAPABILITY_RDR flag set in its RPT +** entry). +** SA_ERR_HPI_NOT_PRESENT is returned if an EntryId (other than +** SAHPI_FIRST_ENTRY) is passed that does not correspond to an actual +** EntryId in the resource's RDR repository. +** SA_ERR_HPI_INVALID_PARAMS is returned if: +** * SAHPI_LAST_ENTRY is passed in to EntryId. +** * NextEntryId pointer is passed in as NULL. +** * Rdr pointer is passed in as NULL. +** +** Remarks: +** Submitting an EntryId of SAHPI_FIRST_ENTRY results in the first RDR being +** read. A returned NextEntryId of SAHPI_LAST_ENTRY indicates the last RDR has +** been returned. A successful retrieval will include the next valid EntryId. +** To retrieve the entire list of RDRs, call this function first with an +** EntryId of SAHPI_FIRST_ENTRY and then use the returned NextEntryId in the +** next call. Proceed until the NextEntryId returned is SAHPI_LAST_ENTRY. +** +** A resource's RDR repository is static over the lifetime of the resource; +** therefore no precautions are required against changes to the content of the +** RDR repository while it is being accessed. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRdrGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiEntryIdT EntryId, + SAHPI_OUT SaHpiEntryIdT *NextEntryId, + SAHPI_OUT SaHpiRdrT *Rdr +); + +/******************************************************************************* +** +** Name: saHpiRdrGetByInstrumentId() +** +** Description: +** This function returns the Resource Data Record (RDR) for a specific +** management instrument hosted by the addressed resource. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** RdrType - [in] Type of RDR being requested. +** InstrumentId - [in] Instrument number identifying the specific RDR to be +** returned. This is a sensor number, control number, watchdog timer +** number, IDR number, or annunciator number, depending on the value of +** the RdrType parameter. +** Rdr - [out] Pointer to the structure to receive the requested RDR. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the: +** * Resource contains no RDR records (and thus does not have the +** SAHPI_CAPABILITY_RDR flag set in its RPT entry). +** * Type of management instrument specified in the RdrType parameter is +** not supported by the resource, as indicated by the Capability field +** in its RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the specific management instrument +** identified in the InstrumentId parameter is not present in the addressed +** resource. +** SA_ERR_HPI_INVALID_PARAMS is returned when the: +** * RdrType parameter is not a valid enumerated value for the type. +** * RdrType is SAHPI_NO_RECORD. +** * Rdr pointer is passed in as NULL. +** +** Remarks: +** The RDR to be returned is identified by RdrType (sensor, control, watchdog +** timer, inventory data repository, or annunciator) and InstrumentId (sensor +** number, control number, watchdog number, IDR number, or annunciator number) +** for the specific management instrument for the RDR being requested. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiRdrGetByInstrumentId ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiRdrTypeT RdrType, + SAHPI_IN SaHpiInstrumentIdT InstrumentId, + SAHPI_OUT SaHpiRdrT *Rdr +); + +/******************************************************************************* +** +** Name: saHpiSensorReadingGet() +** +** Description: +** This function is used to retrieve a sensor reading. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** SensorNum - [in] Sensor number for which the sensor reading is being +** retrieved. +** Reading - [in/out] Pointer to a structure to receive sensor reading values +** If NULL, the sensor reading value will not be returned. +** EventState - [in/out] Pointer to location to receive sensor event states. +** If NULL, the sensor event states will not be returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support sensors, +** as indicated by SAHPI_CAPABILITY_SENSOR in the resource's RPT entry. +** SA_ERR_HPI_INVALID_REQUEST is returned if the sensor is currently disabled. +** SA_ERR_HPI_NOT_PRESENT is returned if the sensor is not present. +** +** Remarks: +** For sensors that return a type of SAHPI_SENSOR_READING_TYPE_BUFFER, the +** format of the returned data buffer is implementation-specific. +** +** If the sensor does not provide a reading, the Reading structure returned by +** the saHpiSensorReadingGet() function will indicate the reading is not +** supported by setting the IsSupported flag to False. +** +** If the sensor does not support any event states, a value of 0x0000 will be +** returned for the EventState value. This is indistinguishable from the +** return for a sensor that does support event states, but currently has no +** event states asserted. The Sensor RDR Events field can be examined to +** determine if the sensor supports any event states. +** +** It is legal for both the Reading parameter and the EventState parameter to +** be NULL. In this case, no data is returned other than the return code. +** This can be used to determine if a sensor is present and enabled without +** actually returning current sensor data. If the sensor is present and +** enabled, SA_OK is returned; otherwise, an error code is returned. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorReadingGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_INOUT SaHpiSensorReadingT *Reading, + SAHPI_INOUT SaHpiEventStateT *EventState +); + +/******************************************************************************* +** +** Name: saHpiSensorThresholdsGet() +** +** Description: +** This function retrieves the thresholds for the given sensor. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** SensorNum - [in] Sensor number for which threshold values are being +** retrieved. +** SensorThresholds - [out] Pointer to returned sensor thresholds. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support sensors, +** as indicated by SAHPI_CAPABILITY_SENSOR in the resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned if the SensorThresholds pointer is +** passed in as NULL. +** SA_ERR_HPI_INVALID_CMD is returned if: +** * Getting a threshold on a sensor that is not a threshold type. +** * The sensor does not have any readable threshold values. +** SA_ERR_HPI_NOT_PRESENT is returned if the sensor is not present. +** +** Remarks: +** This function only applies to sensors that support readable thresholds, as +** indicated by the IsAccessible field in the SaHpiSensorThdDefnT structure +** of the sensor's RDR being set to True and the ReadThold field in the same +** structure having a non-zero value. +** +** For thresholds that do not apply to the identified sensor, the IsSupported +** flag of the threshold value field will be set to False. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorThresholdsGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiSensorThresholdsT *SensorThresholds +); + + +/******************************************************************************* +** +** Name: saHpiSensorThresholdsSet() +** +** Description: +** This function sets the specified thresholds for the given sensor. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** SensorNum - [in] Sensor number for which threshold values are being set. +** SensorThresholds - [in] Pointer to the sensor thresholds values being set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_DATA is returned if any of the threshold values are +** provided in a format not supported by the sensor. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support sensors, +** as indicated by SAHPI_CAPABILITY_SENSOR in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the sensor is not present. +** SA_ERR_HPI_INVALID_CMD is returned when: +** * Writing to a threshold that is not writable. +** * Setting a threshold on a sensor that is not a threshold type as +** indicated by the IsAccessible field of the SaHpiSensorThdDefnT +** structure. +** * Setting a threshold outside of the Min-Max range as defined by the +** Range field of the SensorDataFormat of the RDR. +** SA_ERR_HPI_INVALID_DATA is returned when: +** * Thresholds are set out-of-order (see Remarks). +** * A negative hysteresis value is provided. +** +** Remarks: +** This function only applies to sensors that support writable thresholds, +** as indicated by the IsAccessible field in the SaHpiSensorThdDefnT +** structure of the sensor's RDR being set to True and the WriteThold field +** in the same structure having a non-zero value. +** +** The type of value provided for each threshold setting must correspond to +** the reading format supported by the sensor, as defined by the reading type +** in the DataFormat field of the sensor's RDR (saHpiSensorRecT). +** +** Sensor thresholds cannot be set outside of the range defined by the Range +** field of the SensorDataFormat of the Sensor RDR. If SAHPI_SRF_MAX +** indicates that a maximum reading exists, no sensor threshold may be set +** greater than the Max value. If SAHPI_SRF_MIN indicates that a minimum +** reading exists, no sensor threshold may be set less than the Min value. +** +** Thresholds are required to be set progressively in-order, so that +** Upper Critical >= Upper Major >= Upper Minor >= Lower Minor >= Lower Major +** >= Lower Critical. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorThresholdsSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_IN SaHpiSensorThresholdsT *SensorThresholds +); + +/******************************************************************************* +** +** Name: saHpiSensorTypeGet() +** +** Description: +** This function retrieves the sensor type and event category for the +** specified sensor. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** SensorNum - [in] Sensor number for which the type is being retrieved. +** Type - [out] Pointer to returned enumerated sensor type for the specified +** sensor. +** Category - [out] Pointer to location to receive the returned sensor event +** category. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support sensors, +** as indicated by SAHPI_CAPABILITY_SENSOR in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the sensor is not present. +** SA_ERR_HPI_INVALID_PARAMS is returned if the: +** * Type pointer is passed in as NULL. +** * Category pointer is passed in as NULL. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorTypeGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiSensorTypeT *Type, + SAHPI_OUT SaHpiEventCategoryT *Category +); + +/******************************************************************************* +** +** Name: saHpiSensorEnableGet() +** +** Description: +** This function returns the current sensor enable status for an addressed +** sensor. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** SensorNum - [in] Sensor number for which the sensor enable status is being +** requested. +** SensorEnabled - [out] Pointer to the location to store the sensor enable +** status. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support sensors, +** as indicated by SAHPI_CAPABILITY_SENSOR in the resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned when the SensorEnabled pointer is set +** to NULL. +** SA_ERR_HPI_NOT_PRESENT is returned if the sensor is not present. +** +** Remarks: +** The SaHpiBoolT value pointed to by the SensorEnabled parameter will be set +** to True if the sensor is enabled, or False if the sensor is disabled. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorEnableGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiBoolT *SensorEnabled +); + +/******************************************************************************* +** +** Name: saHpiSensorEnableSet() +** +** Description: +** This function sets the sensor enable status for an addressed sensor. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** SensorNum - [in] Sensor number for which the sensor enable status is being +** set. +** SensorEnabled - [in] Sensor enable status to be set for the sensor. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support sensors, +** as indicated by SAHPI_CAPABILITY_SENSOR in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the sensor is not present. +** SA_ERR_HPI_READ_ONLY is returned if the sensor does not support changing +** the enable status (i.e., the EnableCtrl field in the Sensor RDR is set +** to False). +** +** Remarks: +** If a sensor is disabled, any calls to saHpiSensorReadingGet() for that +** sensor will return an error, and no events will be generated for the +** sensor. +** +** Calling saHpiSensorEnableSet() with a SensorEnabled parameter of True +** will enable the sensor. A SensorEnabled parameter of False will disable +** the sensor. +** +** If the sensor enable status changes as the result of this function call, +** an event will be generated. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorEnableSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_IN SaHpiBoolT SensorEnabled +); + +/******************************************************************************* +** +** Name: saHpiSensorEventEnableGet() +** +** Description: +** This function returns the current sensor event enable status for an +** addressed sensor. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** SensorNum - [in] Sensor number for which the sensor event enable status is +** being requested. +** SensorEventsEnabled - [out] Pointer to the location to store the sensor +** event enable status. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support sensors, +** as indicated by SAHPI_CAPABILITY_SENSOR in the resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned when the SensorEventsEnabled pointer +** is set to NULL. +** SA_ERR_HPI_NOT_PRESENT is returned if the sensor is not present. +** +** Remarks: +** The SaHpiBoolT value pointed to by the SensorEventsEnabled parameter will +** be set to True if event generation for the sensor is enabled, or False if +** event generation for the sensor is disabled. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorEventEnableGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_OUT SaHpiBoolT *SensorEventsEnabled +); + +/******************************************************************************* +** +** Name: saHpiSensorEventEnableSet() +** +** Description: +** This function sets the sensor event enable status for an addressed sensor. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** SensorNum - [in] Sensor number for which the sensor enable status is being +** set. +** SensorEventsEnabled - [in] Sensor event enable status to be set for the +** sensor. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support sensors, +** as indicated by SAHPI_CAPABILITY_SENSOR in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the sensor is not present. +** SA_ERR_HPI_READ_ONLY is returned if the sensor does not support changing +** the event enable status (i.e., the EventCtrl field in the Sensor RDR is +** set to SAHPI_SEC_READ_ONLY). +** +** Remarks: +** If event generation for a sensor is disabled, no events will be generated +** as a result of the assertion or deassertion of any event state, regardless +** of the setting of the assert or deassert event masks for the sensor. If +** event generation for a sensor is enabled, events will be generated when +** event states are asserted or deasserted, according to the settings of the +** assert and deassert event masks for the sensor. Event states may still be +** read for a sensor even if event generation is disabled, by using the +** saHpiSensorReadingGet() function. +** +** Calling saHpiSensorEventEnableSet() with a SensorEventsEnabled parameter +** of True will enable event generation for the sensor. A SensorEventsEnabled +** parameter of False will disable event generation for the sensor. +** +** If the sensor event enabled status changes as a result of this function +** call, an event will be generated. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorEventEnableSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_IN SaHpiBoolT SensorEventsEnabled +); + +/******************************************************************************* +** +** Name: saHpiSensorEventMasksGet() +** +** Description: +** This function returns the assert and deassert event masks for a sensor. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** SensorNum - [in] Sensor number for which the event enable configuration is +** being requested. +** AssertEventMask - [in/out] Pointer to location to store sensor assert event +** mask. If NULL, assert event mask is not returned. +** DeassertEventMask - [in/out] Pointer to location to store sensor deassert +** event mask. If NULL, deassert event mask is not returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** sensors, as indicated by SAHPI_CAPABILITY_SENSOR in the resource's RPT +** entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the sensor is not present. +** +** Remarks: +** Two bit-mask values are returned by the saHpiSensorEventMasksGet() +** function; one for the sensor assert event mask, and one for the sensor +** deassert event mask. A bit set to '1' in the AssertEventMask value +** indicates that an event will be generated by the sensor when the +** corresponding event state for that sensor changes from deasserted to +** asserted. A bit set to '1' in the DeassertEventMask value indicates that +** an event will be generated by the sensor when the corresponding event +** state for that sensor changes from asserted to deasserted. +** +** Events will only be generated by the sensor if the appropriate +** AssertEventMask or DeassertEventMask bit is set, sensor events are +** enabled, and the sensor is enabled. +** +** For sensors hosted by resources that have the +** SAHPI_CAPABILITY_EVT_DEASSERTS flag set in its RPT entry, the +** AssertEventMask and the DeassertEventMask values will always be the same. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorEventMasksGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_INOUT SaHpiEventStateT *AssertEventMask, + SAHPI_INOUT SaHpiEventStateT *DeassertEventMask +); + +/******************************************************************************* +** +** Name: saHpiSensorEventMasksSet() +** +** Description: +** This function provides the ability to change the settings of the sensor +** assert and deassert event masks. Two parameters contain bit-mask values +** indicating which bits in the sensor assert and deassert event masks should +** be updated. In addition, there is an Action parameter. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** SensorNum - [in] Sensor number for which the event enable configuration +** is being set. +** Action - [in] Enumerated value describing what change should be made to +** the sensor event masks: +** * SAHPI_SENS_ADD_EVENTS_TO_MASKS - for each bit set in the +** AssertEventMask and DeassertEventMask parameters, set the +** corresponding bit in the sensor's assert and deassert event masks, +** respectively. +** * SAHPI_SENS_REMOVE_EVENTS_FROM_MASKS - for each bit set in the +** AssertEventMask and DeassertEventMask parameters, clear the +** corresponding bit in the sensor's assert and deassert event masks, +** respectively. +** AssertEventMask - [in] Bit mask or special value indicating which bits in +** the sensor's assert event mask should be set or cleared. (But see +** Remarks concerning resources with the SAHPI_EVT_DEASSERTS_CAPABILITY +** flag set.) +** DeassertEventMask - [in] Bit mask or special value indicating which bits +** in the sensor's deassert event mask should be set or cleared. (But see +** Remarks concerning resources with the SAHPI_EVT_DEASSERTS_CAPABILITY +** flag set.) +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** sensors, as indicated by SAHPI_CAPABILITY_SENSOR in the resource's RPT +** entry. +** SA_ERR_HPI_INVALID_DATA is returned if the Action parameter is +** SAHPI_SENS_ADD_EVENTS_TO_MASKS, and either of the AssertEventMask or +** DeassertEventMask parameters include a bit for an event state that is +** not supported by the sensor. +** SA_ERR_HPI_INVALID_PARAMS is returned if the Action parameter is out of +** range. +** SA_ERR_HPI_NOT_PRESENT is returned if the sensor is not present. +** SA_ERR_HPI_READ_ONLY is returned if the sensor does not support updating +** the assert and deassert event masks (i.e., the EventCtrl field in the +** Sensor RDR is set to SAHPI_SEC_READ_ONLY_MASKS or SAHPI_SEC_READ_ONLY). +** +** Remarks: +** The bits in the sensor assert and deassert event masks that correspond to +** '1' bits in the bit-mask parameters will be set or cleared, as indicated +** by the Action parameter. The bits in the sensor assert and deassert event +** masks corresponding to '0' bits in the bit-mask parameters will be +** unchanged. +** +** Assuming that a sensor is enabled and event generation for the sensor is +** enabled, then for each bit set in the sensor's assert event mask, an event +** will be generated when the sensor's corresponding event state changes from +** deasserted to asserted. Similarly, for each bit set in the sensor's +** deassert event mask, an event will be generated when the sensor's +** corresponding event state changes from asserted to deasserted. +** +** For sensors hosted by a resource that has the +** SAHPI_CAPABILITY_EVT_DEASSERTS flag set in its RPT entry, the assert and +** deassert event masks cannot be independently configured. When +** saHpiSensorEventMasksSet() is called for sensors in a resource with this +** capability, the DeassertEventMask parameter is ignored, and the +** AssertEventMask parameter is used to determine which bits to set or clear +** in both the assert event mask and deassert event mask for the sensor. +** +** The AssertEventMask or DeassertEventMask parameter may be set to the +** special value, SAHPI_ALL_EVENT_STATES, indicating that all event states +** supported by the sensor should be added to or removed from, the +** corresponding sensor event mask. +** +** If the sensor assert and/or deassert event masks change as a result of +** this function call, an event will be generated. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiSensorEventMasksSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiSensorNumT SensorNum, + SAHPI_IN SaHpiSensorEventMaskActionT Action, + SAHPI_IN SaHpiEventStateT AssertEventMask, + SAHPI_IN SaHpiEventStateT DeassertEventMask +); + +/******************************************************************************* +** +** Name: saHpiControlTypeGet() +** +** Description: +** This function retrieves the control type of a control object. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** CtrlNum - [in] Control number for which the type is being retrieved. +** Type - [out] Pointer to SaHpiCtrlTypeT variable to receive the enumerated +** control type for the specified control. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** controls, as indicated by SAHPI_CAPABILITY_CONTROL in the resource's +** RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the control is not present. +** SA_ERR_HPI_INVALID_PARAMS is returned if the Type pointer is passed in as +** NULL. +** +** Remarks: +** The Type parameter must point to a variable of type SaHpiCtrlTypeT. Upon +** successful completion, the enumerated control type is returned in the +** variable pointed to by Type. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiControlTypeGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiCtrlNumT CtrlNum, + SAHPI_OUT SaHpiCtrlTypeT *Type +); + +/******************************************************************************* +** +** Name: saHpiControlGet() +** +** Description: +** This function retrieves the current state and mode of a control object. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** CtrlNum - [in] Control number for which the state and mode are being +** retrieved. +** CtrlMode - [out] Pointer to the mode of the control. If NULL, the +** control's mode will not be returned. +** CtrlState - [in/out] Pointer to a control data structure into which the +** current control state will be placed. For text controls, the line +** number to read is passed in via CtrlState->StateUnion.Text.Line. +** If NULL, the control's state will not be returned. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_CMD is returned if the control is a write-only control, +** as indicated by the WriteOnly flag in the control's RDR (see remarks). +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** controls, as indicated by the SAHPI_CAPABILITY_CONTROL in the +** resource's RPT entry. +** SA_ERR_HPI_INVALID_DATA is returned if the addressed control is a text +** control, and the line number passed in CtrlState->StateUnion.Text.Line +** does not exist in the control and is not SAHPI_TLN_ALL_LINES. +** SA_ERR_HPI_NOT_PRESENT is returned if the control is not present. +** +** Remarks: +** Note that the CtrlState parameter is both an input and an output parameter +** for this function. This is necessary to support line number inputs for +** text controls, as discussed below. +** +** In some cases, the state of a control may be set, but the corresponding +** state cannot be read at a later time. Such controls are delineated with +** the WriteOnly flag in the Control's RDR. +** +** Note that text controls are unique in that they have a state associated +** with each line of the control - the state being the text on that line. The +** line number to be read is passed in to saHpiControlGet() via +** CtrlState->StateUnion.Text.Line; the contents of that line of the control +** will be returned in CtrlState->StateUnion.Text.Text. The first line of +** the text control is line number "1". +** +** If the line number passed in is SAHPI_TLN_ALL_LINES, then +** saHpiControlGet() will return the entire text of the control, or as much +** of it as will fit in a single SaHpiTextBufferT, in +** CtrlState->StateUnion.Text.Text. This value will consist of the text of +** all the lines concatenated, using the maximum number of characters for +** each line (no trimming of trailing blanks). +** +** Note that depending on the data type and language, the text may be encoded +** in 2-byte Unicode, which requires two bytes of data per character. +** +** Note that the number of lines and columns in a text control can be +** obtained from the control's Resource Data Record. +** +** Write-only controls allow the control's state to be set, but the control +** state cannot be subsequently read. Such controls are indicated in the RDR, +** when the WriteOnly flag is set. SA_ERR_HPI_INVALID_CMD is returned when +** calling this function for a write-only control. +** +** It is legal for both the CtrlMode parameter and the CtrlState parameter to +** be NULL. In this case, no data is returned other than the return code. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiControlGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiCtrlNumT CtrlNum, + SAHPI_OUT SaHpiCtrlModeT *CtrlMode, + SAHPI_INOUT SaHpiCtrlStateT *CtrlState +); + +/******************************************************************************* +** +** Name: saHpiControlSet() +** +** Description: +** This function is used for setting the state and/or mode of the specified +** control object. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** CtrlNum - [in] Control number for which the state and/or mode is being set. +** CtrlMode - [in] The mode to set on the control. +** CtrlState - [in] Pointer to a control state data structure holding the +** state to be set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** controls, as indicated by the SAHPI_CAPABILITY_CONTROL in the +** resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the control is not present. +** SA_ERR_HPI_INVALID_DATA is returned when the: +** * CtrlState->Type field is not the correct type for the control +** identified by the CtrlNum parameter. +** * CtrlState->StateUnion.Analog is out of range of the control record's +** analog Min and Max values. +** * CtrlState->StateUnion.Text.Text.DataLength, combined with the +** CtrlState->StateUnion.Text.Line, overflows the remaining text +** control space. +** * CtrlState->StateUnion.Text.Text.DataType is not set to the DataType +** specified in the RDR. +** * DataType specified in the RDR is SAHPI_TL_TYPE_UNICODE or +** SAHPI_TL_TYPE_TEXT and CtrlState->StateUnion.Text.Text.Language is +** not set to the Language specified in the RDR. +** * OEM control data is invalid (see remarks below). +** SA_ERR_HPI_INVALID_PARAMS is returned if the: +** * CtrlMode is not one of the valid enumerated values for this type. +** * CtrlMode parameter is not SAHPI_CTRL_MODE_AUTO and the CtrlState +** pointer is passed in as NULL. +** * CtrlState->StateUnion.Digital is not one of the valid enumerated +** values for this type. +** * CtrlState->StateUnion.Stream.StreamLength is bigger than +** SAHPI_CTRL_MAX_STREAM_LENGTH. +** * SaHpiTextBufferT structure passed as CtrlState->StateUnion.Text.Text +** contains text characters that are not allowed according to the value +** of CtrlState->StateUnion.Text.Text.DataType. +** SA_ERR_HPI_INVALID_REQUEST is returned when SAHPI_CTRL_STATE_PULSE_ON is +** issued to a digital control, which is ON (in either manual or auto +** mode). It is also returned when SAHPI_CTRL_STATE_PULSE_OFF is issued +** to a digital control, which is OFF (in either manual or auto mode). +** SA_ERR_HPI_READ_ONLY is returned when attempting to change the mode of a +** control with a read-only mode. +** +** Remarks: +** When the mode is set to SAHPI_CTRL_MODE_AUTO, the state input is ignored. +** Ignored state inputs are not checked by the implementation. +** +** The CtrlState parameter must be of the correct type for the specified +** control. +** +** If the CtrlMode parameter is set to SAHPI_CTRL_MODE_AUTO, then the +** CtrlState parameter is not evaluated, and may be set to any value by an +** HPI User, including a NULL pointer. Text controls include a line number +** and a line of text in the CtrlState parameter, allowing update of just a +** single line of a text control. The first line of the text control is line +** number "1". If less than a full line of data is written, the control will +** clear all spaces beyond those written on the line. Thus writing a +** zero-length string will clear the addressed line. It is also possible to +** include more characters in the text passed in the CtrlState structure than +** will fit on one line; in this case, the control will wrap to the next line +** (still clearing the trailing characters on the last line written). Thus, +** there are two ways to write multiple lines to a text control: (a) call +** saHpiControlSet() repeatedly for each line, or (b) call saHpiControlSet() +** once and send more characters than will fit on one line. An HPI User +** should not assume any "cursor positioning" characters are available to +** use, but rather should always write full lines and allow "wrapping" to +** occur. When calling saHpiControlSet() for a text control, an HPI User may +** set the line number to SAHPI_TLN_ALL_LINES; in this case, the entire +** control will be cleared, and the data will be written starting on line 1. +** (This is different from simply writing at line 1, which only alters the +** lines written to.) +** +** This feature may be used to clear the entire control, which can be +** accomplished by setting: +** CtrlState->StateUnion.Text.Line = SAHPI_TLN_ALL_LINES; +** CtrlState->StateUnion.Text.Text.DataLength = 0; +** +** Note that the number of lines and columns in a text control can be +** obtained from the control's RDR. +** +** The ManufacturerId (MId) field of an OEM control is ignored by the +** implementation when calling saHpiControlSet(). +** +** On an OEM control, it is up to the implementation to determine what is +** invalid data, and to return the specified error code. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiControlSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiCtrlNumT CtrlNum, + SAHPI_IN SaHpiCtrlModeT CtrlMode, + SAHPI_IN SaHpiCtrlStateT *CtrlState +); + +/******************************************************************************* +** +** Name: saHpiIdrInfoGet() +** +** Description: +** This function returns the Inventory Data Repository information including +** the number of areas contained within the IDR and the update counter. The +** Inventory Data Repository is associated with a specific entity. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** IdrId - [in] Identifier for the Inventory Data Repository. +** IdrInfo - [out] Pointer to the information describing the requested +** Inventory Data Repository. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support an +** inventory data repository, as indicated by +** SAHPI_CAPABILITY_INVENTORY_DATA in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the IDR is not present. +** SA_ERR_HPI_INVALID_PARAMS is returned if the IdrInfo pointer is passed in +** as NULL. +** +** Remarks: +** The update counter provides a means for insuring that no additions or +** changes are missed when retrieving the IDR data. In order to use this +** feature, an HPI User should invoke the saHpiIdrInfoGet(), and retrieve the +** update counter value before retrieving the first Area. After retrieving +** all Areas and Fields of the IDR, an HPI User should again invoke the +** saHpiIdrInfoGet() to get the update counter value. If the update counter +** value has not been incremented, no modification or additions were made to +** the IDR during data retrieval. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiIdrInfoGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiIdrIdT IdrId, + SAHPI_OUT SaHpiIdrInfoT *IdrInfo +); + +/******************************************************************************* +** +** Name: saHpiIdrAreaHeaderGet() +** +** Description: +** This function returns the Inventory Data Area header information for a +** specific area associated with a particular Inventory Data Repository. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** IdrId - [in] Identifier for the Inventory Data Repository. +** AreaType - [in] Type of Inventory Data Area. +** AreaId - [in] Identifier of Area entry to retrieve from the IDR. Reserved +** AreaId values: +** * SAHPI_FIRST_ENTRY Get first entry. +** * SAHPI_LAST_ENTRY Reserved as a delimiter for end of list. Not a +** valid AreaId. +** NextAreaId - [out] Pointer to location to store the AreaId of next area of +** the requested type within the IDR. +** Header - [out] Pointer to Inventory Data Area Header into which the header +** information will be placed. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support an +** inventory data repository, as indicated by +** SAHPI_CAPABILITY_INVENTORY_DATA in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the: +** * IDR is not present. +** * AreaType parameter is set to SAHPI_IDR_AREATYPE_UNSPECIFIED, and the +** area specified by the AreaId parameter does not exist in the IDR. +** * AreaType parameter is set to a specific area type, but an area +** matching both the AreaId parameter and AreaType parameter does not +** exist. +** SA_ERR_HPI_INVALID_PARAMS is returned if: +** * AreaType is not one of the valid enumerated values for this type. +** * The AreaId is an invalid reserved value such as SAHPI_LAST_ENTRY. +** * The NextAreaId pointer is passed in as NULL. +** * The Header pointer is passed in as NULL. +** +** Remarks: +** This function allows retrieval of an Inventory Data Area Header by one of +** two ways: by AreaId regardless of type or by AreaType and AreaId. +** +** To retrieve all areas contained within an IDR, set the AreaType parameter +** to SAHPI_IDR_AREATYPE_UNSPECIFIED, and set the AreaId parameter to +** SAHPI_FIRST_ENTRY for the first call. For each subsequent call, set the +** AreaId parameter to the value returned in the NextAreaId parameter. +** Continue calling this function until the NextAreaId parameter contains the +** value SAHPI_LAST_ENTRY. +** +** To retrieve areas of specific type within an IDR, set the AreaType +** parameter to a valid AreaType enumeration. Use the AreaId parameter in +** the same manner described above to retrieve all areas of the specified +** type. Set the AreaId parameter to SAHPI_FIRST_ENTRY to retrieve the first +** area of that type. Use the value returned in NextAreaId to retrieve the +** remaining areas of that type until SAHPI_LAST_ENTRY is returned. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiIdrAreaHeaderGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiIdrIdT IdrId, + SAHPI_IN SaHpiIdrAreaTypeT AreaType, + SAHPI_IN SaHpiEntryIdT AreaId, + SAHPI_OUT SaHpiEntryIdT *NextAreaId, + SAHPI_OUT SaHpiIdrAreaHeaderT *Header +); + +/******************************************************************************* +** +** Name: saHpiIdrAreaAdd() +** +** Description: +** This function is used to add an Area to the specified Inventory Data +** Repository. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** IdrId - [in] Identifier for the Inventory Data Repository. +** AreaType - [in] Type of Area to add. +** AreaId- [out] Pointer to location to store the AreaId of the newly created +** area. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support an +** inventory data repository, as indicated by +** SAHPI_CAPABILITY_INVENTORY_DATA in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the IDR is not present. +** SA_ERR_HPI_INVALID_DATA is returned when attempting to add an area with an +** AreaType of SAHPI_IDR_AREATYPE_UNSPECIFIED or when adding an area that +** does not meet the implementation-specific restrictions. +** SA_ERR_HPI_OUT_OF_SPACE is returned if the IDR does not have enough free +** space to allow the addition of the area. +** SA_ERR_HPI_INVALID_PARAMS is returned if the: +** * AreaId pointer is passed in as NULL. +** * AreaType is not one of the valid enumerated values for this type. +** SA_ERR_HPI_READ_ONLY is returned if the IDR is read-only and does not +** allow the addition of the area. +** +** Remarks: +** On successful completion, the AreaId parameter will contain the AreaId of +** the newly created area. +** +** On successful completion, the ReadOnly element in the new Area's header +** will always be False. +** +** SAHPI_IDR_AREATYPE_UNSPECIFIED is not a valid area type, and should not be +** used with this function. If SAHPI_IDR_AREATYPE_UNSPECIFIED is specified +** as the area type, an error code of SA_ERR_HPI_INVALID_DATA is returned. +** This area type is only valid when used with the saHpiIdrAreaHeaderGet() +** function to retrieve areas of an unspecified type. +** +** Some implementations may restrict the types of areas that may be added. +** These restrictions should be documented. SA_ERR_HPI_INVALID_DATA is +** returned when attempting to add an invalid area type. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiIdrAreaAdd( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiIdrIdT IdrId, + SAHPI_IN SaHpiIdrAreaTypeT AreaType, + SAHPI_OUT SaHpiEntryIdT *AreaId +); + +/******************************************************************************* +** +** Name: saHpiIdrAreaDelete() +** +** Description: +** This function is used to delete an Inventory Data Area, including the Area +** header and all fields contained with the area, from a particular Inventory +** Data Repository. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** IdrId - [in] Identifier for the Inventory Data Repository. +** AreaId - [in] Identifier of Area entry to delete from the IDR. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support an +** inventory data repository, as indicated by +** SAHPI_CAPABILITY_INVENTORY_DATA in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the: +** * IDR is not present. +** * Area identified by the AreaId parameter does not exist within the IDR. +** SA_ERR_HPI_INVALID_PARAMS is returned when the AreaId is an invalid +** reserved value such as SAHPI_LAST_ENTRY. +** SA_ERR_HPI_READ_ONLY is returned if the: +** * IDA is read-only and therefore cannot be deleted. +** * IDA contains a read-only Field and therefore cannot be deleted. +** * IDR is read-only as deletions are not permitted for an area from a +** read-only IDR. +** +** Remarks: +** Deleting an Inventory Data Area also deletes all fields contained within +** the area. +** +** In some implementations, certain Areas are intrinsically read-only. The +** ReadOnly flag, in the area header, indicates if the Area is read-only. +** +** If the Inventory Data Area is not read-only, but contains a Field that is +** read-only, the Area cannot be deleted. An attempt to delete an Area that +** contains a read-only Field will return an error. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiIdrAreaDelete( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiIdrIdT IdrId, + SAHPI_IN SaHpiEntryIdT AreaId +); + +/******************************************************************************* +** +** Name: saHpiIdrFieldGet() +** +** Description: +** This function returns the Inventory Data Field information from a +** particular Inventory Data Area and Repository. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** IdrId - [in] Identifier for the Inventory Data Repository. +** AreaId - [in] Area identifier for the IDA. +** FieldType - [in] Type of Inventory Data Field. +** FieldId - [in] Identifier of Field to retrieve from the IDA. Reserved +** FieldId values: +** * SAHPI_FIRST_ENTRY Get first entry. +** * SAHPI_LAST_ENTRY Reserved as a delimiter for end of list. Not +** a valid FieldId. +** NextFieldId - [out] Pointer to location to store the FieldId of next field +** of the requested type in the IDA. +** Field - [out] Pointer to Inventory Data Field into which the field +** information will be placed. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support an +** inventory data repository, as indicated by +** SAHPI_CAPABILITY_INVENTORY_DATA in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the: +** * IDR is not present. +** * Area identified by AreaId is not present. +** * FieldType parameter is set to SAHPI_IDR_FIELDTYPE_UNSPECIFIED, and +** the field specified by the FieldId parameter does not exist in the +** IDA. +** * FieldType parameter is set to a specific field type, but a field +** matching both the FieldId parameter and FieldType parameter does not +** exist. +** SA_ERR_HPI_INVALID_PARAMS is returned if: +** * FieldType is not one of the valid enumerated values for this type. +** * The AreaId or FieldId is an invalid reserved value such as +** SAHPI_LAST_ENTRY. +** * The NextFieldId pointer is passed in as NULL. +** * The Field pointer is passed in as NULL. +** +** Remarks: +** This function allows retrieval of an Inventory Data Field by one of two +** ways: by FieldId regardless of type or by FieldType and FieldId. +** +** To retrieve all fields contained within an IDA, set the FieldType parameter +** to SAHPI_IDR_FIELDTYPE_UNSPECIFIED, and set the FieldId parameter to +** SAHPI_FIRST_ENTRY for the first call. For each subsequent call, set the +** FieldId parameter to the value returned in the NextFieldId parameter. +** Continue calling this function until the NextFieldId parameter contains the +** value SAHPI_LAST_ENTRY. +** +** To retrieve fields of a specific type within an IDA, set the FieldType +** parameter to a valid Field type enumeration. Use the FieldId parameter in +** the same manner described above to retrieve all fields of the specified +** type. Set the FieldId parameter to SAHPI_FIRST_ENTRY to retrieve the first +** field of that type. Use the value returned in NextFieldId to retrieve the +** remaining fields of that type until SAHPI_LAST_ENTRY is returned. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiIdrFieldGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiIdrIdT IdrId, + SAHPI_IN SaHpiEntryIdT AreaId, + SAHPI_IN SaHpiIdrFieldTypeT FieldType, + SAHPI_IN SaHpiEntryIdT FieldId, + SAHPI_OUT SaHpiEntryIdT *NextFieldId, + SAHPI_OUT SaHpiIdrFieldT *Field +); + +/******************************************************************************* +** +** Name: saHpiIdrFieldAdd() +** +** Description: +** This function is used to add a field to the specified Inventory Data Area +** with a specific Inventory Data Repository. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** IdrId - [in] Identifier for the Inventory Data Repository. +** Field - [in/out] Pointer to Inventory Data Field, which contains the new +** field information to add to the IDA. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support an +** inventory data repository, as indicated by +** SAHPI_CAPABILITY_INVENTORY_DATA in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the: +** * IDR is not present. +** * Area identified by Field?AreaId does not exist within the IDR. +** SA_ERR_HPI_INVALID_DATA is returned if the Field data is incorrectly +** formatted or does not meet the restrictions for the implementation. +** SA_ERR_HPI_OUT_OF_SPACE is returned if the IDR does not have enough free +** space to allow the addition of the field. +** SA_ERR_HPI_READ_ONLY is returned if the: +** * Area identified by Field?AreaId is read-only and does not allow +** modification to its fields. +** * IDR is identified by IdrId, is read-only, and does not allow +** modification to its fields. +** SA_ERR_HPI_INVALID_PARAMS is returned if the: +** * The Field type is not one of the valid field type enumerated values. +** * Field type, Field?Type, is set to SAHPI_IDR_FIELDTYPE_UNSPECIFIED. +** * SaHpiTextBufferT structure passed as part of the Field parameter is +** not valid. This occurs when: +** * The DataType is not one of the enumerated values for that type, or +** * The data field contains characters that are not legal according to +** the value of DataType, or +** * The Language is not one of the enumerated values for that type +** when the DataType is SAHPI_TL_TYPE_UNICODE or SAHPI_TL_TYPE_TEXT. +** * Field pointer is passed in as NULL. +** +** Remarks: +** The FieldId element within the Field parameter is not used by this +** function. Instead, on successful completion, the FieldId field is set to +** the new value associated with the added Field. +** +** The ReadOnly element in the Field parameter is not used by this function. +** On successful completion, the ReadOnly element in the new Field will +** always be False. +** +** Addition of a read-only Inventory Data Field is not allowed; therefore the +** ReadOnly element in the SaHpiIdrFieldT parameter is ignored. +** +** SAHPI_IDR_FIELDTYPE_UNSPECIFIED is not a valid field type, and should not +** be used with this function. If SAHPI_IDR_FIELDTYPE_UNSPECIFIED is +** specified as the field type, an error code of SA_ERR_HPI_INVALID_DATA is +** returned. This field type is only valid when used with the +** saHpiIdrFieldGet() function to retrieve fields of an unspecified type. +** +** Some implementations have restrictions on what fields are valid in specific +** areas and/or the data format of some fields. These restrictions should be +** documented. SA_ERR_HPI_INVALID_DATA is returned when the field type or +** field data does not meet the implementation-specific restrictions. +** +** The AreaId element within the Field parameter identifies the specific IDA +** into which the new field is added. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiIdrFieldAdd( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiIdrIdT IdrId, + SAHPI_INOUT SaHpiIdrFieldT *Field +); + +/******************************************************************************* +** +** Name: saHpiIdrFieldSet() +** +** Description: +** This function is used to update an Inventory Data Field for a particular +** Inventory Data Area and Repository. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** IdrId - [in] Identifier for the Inventory Data Repository. +** Field - [in] Pointer to Inventory Data Field, which contains the updated +** field information. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support an +** inventory data repository, as indicated by +** SAHPI_CAPABILITY_INVENTORY_DATA in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the: +** * IDR is not present. +** * Area identified by Field?AreaId does not exist within the IDR or if +** the Field does not exist within the Inventory Data Area. +** SA_ERR_HPI_INVALID_PARAMS is returned if the: +** * Field pointer is passed in as NULL. +** * Field type, Field?Type, is not set to one of the valid field type +** enumerated values. +** * Field type, Field?Type, is set to SAHPI_IDR_FIELDTYPE_UNSPECIFIED. +** SA_ERR_HPI_INVALID_DATA is returned if the field data is incorrectly +** formatted or does not meet the restrictions for the implementation. +** SA_ERR_HPI_OUT_OF_SPACE is returned if the IDR does not have enough free +** space to allow the modification of the field due to an increase in the +** field size. +** SA_ERR_HPI_READ_ONLY is returned if the: +** * Field is read-only and does not allow modifications. +** * Area is read-only and does not allow modifications to its fields. +** * IDR is read-only and does not allow modifications to its fields. +** SA_ERR_HPI_INVALID_PARAMS is returned if the SaHpiTextBufferT structure +** passed as part of the Field parameter is not valid. This occurs when: +** * The DataType is not one of the enumerated values for that type, or +** * The data field contains characters that are not legal according to +** the value of DataType, or +** * The Language is not one of the enumerated values for that type when +** the DataType is SAHPI_TL_TYPE_UNICODE or SAHPI_TL_TYPE_TEXT. +** +** Remarks: +** This function allows modification of both the FieldType and Field data of +** a given Inventory Data Field. This function does not allow modification of +** the read-only attribute of the Inventory Data Field; therefore after a +** successful update, the ReadOnly element in the updated Field will always be +** False. The input value for ReadOnly is ignored. +** +** SAHPI_IDR_FIELDTYPE_UNSPECIFIED is not a valid field type, and should not +** be used with this function. If SAHPI_IDR_FIELDTYPE_UNSPECIFIED is +** specified as the new field type, an error code of SA_ERR_HPI_INVALID_DATA +** is returned. This field type is only valid when used with the +** saHpiIdrFieldGet() function to retrieve fields of an unspecified type. +** +** Some implementations have restrictions on what fields are valid in specific +** areas and/or the data format of some fields. These restrictions should be +** documented. SA_ERR_HPI_INVALID_DATA is returned when the field type or +** field data does not meet the implementation-specific restrictions. +** +** In some implementations, certain Fields are intrinsically read-only. The +** ReadOnly flag, in the field structure, indicates if the Field is read-only. +** +** The Field to update is identified by the AreaId and FieldId elements within +** the Field parameter. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiIdrFieldSet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiIdrIdT IdrId, + SAHPI_IN SaHpiIdrFieldT *Field +); + +/******************************************************************************* +** +** Name: saHpiIdrFieldDelete() +** +** Description: +** This function is used to delete an Inventory Data Field from a particular +** Inventory Data Area and Repository. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** IdrId - [in] Identifier for the Inventory Data Repository. +** AreaId - [in] Area identifier for the IDA. +** FieldId - [in] Identifier of Field to delete from the IDA. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support an +** inventory data repository, as indicated by +** SAHPI_CAPABILITY_INVENTORY_DATA in the resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the: +** * IDR is not present. +** * Area identified by the AreaId parameter does not exist within the IDR, +** or if the Field identified by the FieldId parameter does not exist +** within the IDA. +** SA_ERR_HPI_READ_ONLY is returned if the field, the IDA, or the IDR is +** read-only and does not allow deletion. +** SA_ERR_HPI_INVALID_PARAMS is returned when the AreaId or FieldId is an +** invalid reserved value such as SAHPI_LAST_ENTRY. +** +** Remarks: +** In some implementations, certain fields are intrinsically read-only. The +** ReadOnly flag, in the field structure, indicates if the field is read-only. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiIdrFieldDelete( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiIdrIdT IdrId, + SAHPI_IN SaHpiEntryIdT AreaId, + SAHPI_IN SaHpiEntryIdT FieldId +); + +/******************************************************************************* +** +** Name: saHpiWatchdogTimerGet() +** +** Description: +** This function retrieves the current watchdog timer settings and +** configuration. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** WatchdogNum - [in] Watchdog number that specifies the watchdog timer on a +** resource. +** Watchdog - [out] Pointer to watchdog data structure. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support a +** watchdog timer, as indicated by SAHPI_CAPABILITY_WATCHDOG in the +** resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the WatchdogNum is not present. +** SA_ERR_HPI_INVALID_PARAMS is returned when the Watchdog pointer is passed +** in as NULL. +** +** Remarks: +** See the description of the SaHpiWatchdogT structure in Section 8.11 on +** page 180 for details on what information is returned by this function. +** +** When the watchdog action is SAHPI_WA_RESET, the type of reset (warm or +** cold) is implementation-dependent. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiWatchdogTimerGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiWatchdogNumT WatchdogNum, + SAHPI_OUT SaHpiWatchdogT *Watchdog +); + +/******************************************************************************* +** +** Name: saHpiWatchdogTimerSet() +** +** Description: +** This function provides a method for initializing the watchdog timer +** configuration. +** +** Once the appropriate configuration has been set using +** saHpiWatchdogTimerSet(), an HPI User must then call +** saHpiWatchdogTimerReset() to initially start the watchdog timer, unless +** the watchdog timer was already running prior to calling +** saHpiWatchdogTimerSet() and the Running field in the passed Watchdog +** structure is True. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** WatchdogNum - [in] The watchdog number specifying the specific watchdog +** timer on a resource. +** Watchdog - [in] Pointer to watchdog data structure. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support a +** watchdog timer, as indicated by SAHPI_CAPABILITY_WATCHDOG in the +** resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the WatchdogNum is not present. +** SA_ERR_HPI_INVALID_PARAMS is returned when the: +** * Watchdog->TimerUse is not one of the valid enumerated values for this +** type. +** * Watchdog->TimerAction is not one of the valid enumerated values for +** this type. +** * Watchdog->PretimerInterrupt is not one of the valid enumerated values +** for this type. +** * Watchdog pointer is passed in as NULL. +** SA_ERR_HPI_INVALID_DATA is returned when the: +** * Watchdog->PreTimeoutInterval is outside the acceptable range for the +** implementation. +** * Watchdog->InitialCount is outside the acceptable range for the +** implementation. +** * Value of Watchdog->PreTimeoutInterval is greater than the value of +** Watchdog->InitialCount. +** * Watchdog->PretimerInterrupt is set to an unsupported value. See +** remarks. +** * Watchdog->TimerAction is set to an unsupported value. See remarks. +** * Watchdog->TimerUse is set to an unsupported value. See remarks. +** +** Remarks: +** Configuring the watchdog timer with the saHpiWatchdogTimerSet() function +** does not start the timer running. If the timer was previously stopped +** when this function is called, then it will remain stopped, and must be +** started by calling saHpiWatchdogTimerReset(). If the timer was previously +** running, then it will continue to run if the Watchdog->Running field passed +** is True, or will be stopped if the Watchdog->Running field passed is False. +** If it continues to run, it will restart its count-down from the newly +** configured initial count value. +** +** If the initial counter value is set to 0, then any configured pre-timer +** interrupt action or watchdog timer expiration action will be taken +** immediately when the watchdog timer is started. This provides a mechanism +** for software to force an immediate recovery action should that be dependent +** on a Watchdog timeout occurring. +** +** See the description of the SaHpiWatchdogT structure for more details on the +** effects of this command related to specific data passed in that structure. +** +** Some implementations impose a limit on the acceptable ranges for the +** PreTimeoutInterval or InitialCount. These limitations must be documented. +** SA_ERR_HPI_INVALID_DATA is returned if an attempt is made to set a value +** outside of the supported range. +** +** Some implementations cannot accept all of the enumerated values for +** TimerUse, TimerAction, or PretimerInterrupt. These restrictions should be +** documented. SA_ERR_HPI_INVALID_DATA is returned if an attempt is made to +** select an unsupported option. +** +** When the watchdog action is set to SAHPI_WA_RESET, the type of reset (warm +** or cold) is implementation-dependent. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiWatchdogTimerSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiWatchdogNumT WatchdogNum, + SAHPI_IN SaHpiWatchdogT *Watchdog +); + +/******************************************************************************* +** +** Name: saHpiWatchdogTimerReset() +** +** Description: +** This function provides a method to start or restart the watchdog timer from +** the initial countdown value. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** WatchdogNum - [in] The watchdog number specifying the specific watchdog +** timer on a resource. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support a +** watchdog timer, as indicated by SAHPI_CAPABILITY_WATCHDOG in the +** resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the WatchdogNum is not present. +** SA_ERR_HPI_INVALID_REQUEST is returned if the current watchdog state does +** not allow a reset. +** +** Remarks: +** If the Watchdog has been configured to issue a Pre-Timeout interrupt, and +** that interrupt has already occurred, the saHpiWatchdogTimerReset() function +** will not reset the watchdog counter. The only way to stop a Watchdog from +** timing out once a Pre-Timeout interrupt has occurred is to use the +** saHpiWatchdogTimerSet() function to reset and/or stop the timer. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiWatchdogTimerReset ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiWatchdogNumT WatchdogNum +); + +/******************************************************************************* +** +** Name: saHpiAnnunciatorGetNext() +** +** Description: +** This function allows retrieval of an announcement from the current set of +** announcements held in the Annunciator. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** AnnunciatorNum - [in] Annunciator number for the addressed Annunciator. +** Severity - [in] Severity level of announcements to retrieve. Set to +** SAHPI_ALL_SEVERITIES to retrieve announcement of any severity; +** otherwise, set to requested severity level. +** UnacknowledgedOnly - [in] Set to True to indicate only unacknowledged +** announcements should be returned. Set to False to indicate either an +** acknowledged or unacknowledged announcement may be returned. +** Announcement - [in/out] Pointer to the structure to hold the returned +** announcement. Also, on input, Announcement->EntryId and +** Announcement->Timestamp are used to identify the "previous" +** announcement. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** Annunciators, as indicated by SAHPI_CAPABILITY_ANNUNCIATOR in the +** resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned when Severity is not one of the +** valid enumerated values for this type. +** SA_ERR_HPI_NOT_PRESENT is returned if: +** * The AnnunciatorNum passed does not address a valid Annunciator +** supported by the resource. +** * There are no announcements (or no unacknowledged announcements if +** UnacknowledgedOnly is True) that meet the specified Severity in the +** current set after the announcement identified by +** Announcement->EntryId and Announcement->Timestamp. +** * There are no announcements (or no unacknowledged announcements if +** UnacknowledgedOnly is True) that meet the specified Severity in the +** current set if the passed Announcement->EntryId field was set to +** SAHPI_FIRST_ENTRY. +** SA_ERR_HPI_INVALID_PARAMS is returned when the Announcement parameter is +** passed in as NULL. +** SA_ERR_HPI_INVALID_DATA is returned if the passed Announcement->EntryId +** matches an announcement in the current set, but the passed +** Announcement->Timestamp does not match the timestamp of that announcement. +** +** Remarks: +** All announcements contained in the set are maintained in the order in which +** they were added. This function will return the next announcement meeting +** the specifications given by an HPI User that was added to the set after the +** announcement whose EntryId and timestamp is passed by an HPI User. If +** SAHPI_FIRST_ENTRY is passed as the EntryId, the first announcement in the +** set meeting the specifications given by an HPI User is returned. This +** function should operate even if the announcement associated with the +** EntryId and Timestamp passed by an HPI User has been deleted. +** +** Selection can be restricted to only announcements of a specified severity, +** and/or only unacknowledged announcements. To retrieve all announcements +** contained meeting specific requirements, call saHpiAnnunciatorGetNext() +** with the Status->EntryId field set to SAHPI_FIRST_ENTRY and the Severity +** and UnacknowledgedOnly parameters set to select what announcements should +** be returned. Then, repeatedly call saHpiAnnunciatorGetNext() passing the +** previously returned announcement as the Announcement parameter, and the +** same values for Severity and UnacknowledgedOnly until the function returns +** with the error code SA_ERR_HPI_NOT_PRESENT. +** +** SAHPI_FIRST_ENTRY and SAHPI_LAST_ENTRY are reserved EntryId values, and +** will never be assigned to an announcement. +** +** The elements EntryId and Timestamp are used in the Announcement parameter +** to identify the "previous" announcement; the next announcement added to the +** table after this announcement that meets the Severity and +** UnacknowledgedOnly requirements will be returned. Announcement->EntryId +** may be set to SAHPI_FIRST_ENTRY to select the first announcement in the +** current set meeting the Severity and UnacknowledgedOnly requirements. If +** Announcement->EntryId is SAHPI_FIRST_ENTRY, then Announcement->Timestamp +** is ignored. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAnnunciatorGetNext( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiAnnunciatorNumT AnnunciatorNum, + SAHPI_IN SaHpiSeverityT Severity, + SAHPI_IN SaHpiBoolT UnacknowledgedOnly, + SAHPI_INOUT SaHpiAnnouncementT *Announcement +); + +/******************************************************************************* +** +** Name: saHpiAnnunciatorGet() +** +** Description: +** This function allows retrieval of a specific announcement in the +** Annunciator's current set by referencing its EntryId. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained +** using saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** AnnunciatorNum - [in] Annunciator number for the addressed Annunciator. +** EntryId - [in] Identifier of the announcement to retrieve from the +** Annunciator. +** Announcement - [out] Pointer to the structure to hold the returned +** announcement. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** Annunciators, as indicated by SAHPI_CAPABILITY_ANNUNCIATOR in the +** resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if: +** * The AnnunciatorNum passed does not address a valid Annunciator +** supported by the resource. +** * The requested EntryId does not correspond to an announcement +** contained in the Annunciator. +** SA_ERR_HPI_INVALID_PARAMS is returned when the Announcement parameter is +** passed in as NULL. +** +** Remarks: +** SAHPI_FIRST_ENTRY and SAHPI_LAST_ENTRY are reserved EntryId values, and +** will never be assigned to announcements. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAnnunciatorGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiAnnunciatorNumT AnnunciatorNum, + SAHPI_IN SaHpiEntryIdT EntryId, + SAHPI_OUT SaHpiAnnouncementT *Announcement +); + +/******************************************************************************* +** +** Name: saHpiAnnunciatorAcknowledge() +** +** Description: +** This function allows an HPI User to acknowledge a single announcement or a +** group of announcements by severity. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** AnnunciatorNum - [in] Annunciator number for the addressed Annunciator. +** EntryId - [in] Entry identifier of the announcement to acknowledge. +** Reserved EntryId values: +** * SAHPI_ENTRY_UNSPECIFIED Ignore this parameter. +** Severity - [in] Severity level of announcements to acknowledge. Ignored +** unless EntryId is SAHPI_ENTRY_UNSPECIFIED. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** Annunciators, as indicated by SAHPI_CAPABILITY_ANNUNCIATOR in the +** resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if: +** * The AnnunciatorNum passed does not address a valid Annunciator +** supported by the resource. +** * An announcement identified by the EntryId parameter does not exist in +** the current set. +** SA_ERR_HPI_INVALID_PARAMS is returned if EntryId is SAHPI_ENTRY_UNSPECIFIED +** and Severity is not one of the valid enumerated values for this type. +** +** Remarks: +** Announcements are acknowledged by one of two ways: a single announcement +** by EntryId regardless of severity or as a group of announcements by +** severity regardless of EntryId. +** +** An HPI User acknowledges an announcement to influence the platform-specific +** annunciation provided by the Annunciator management instrument. +** +** An acknowledged announcement will have the Acknowledged field set to True. +** +** To acknowledge all announcements contained within the current set, set the +** Severity parameter to SAHPI_ALL_SEVERITIES, and set the EntryId parameter +** to SAHPI_ENTRY_UNSPECIFIED. +** +** To acknowledge all announcements of a specific severity, set the Severity +** parameter to the appropriate value, and set the EntryId parameter to +** SAHPI_ENTRY_UNSPECIFIED. +** +** To acknowledge a single announcement, set the EntryId parameter to a value +** other than SAHPI_ENTRY_UNSPECIFIED. The EntryId must be a valid identifier +** for an announcement present in the current set. +** +** If an announcement has been previously acknowledged, acknowledging it again +** has no effect. However, this is not an error. +** +** If the EntryId parameter has a value other than SAHPI_ENTRY_UNSPECIFIED, +** the Severity parameter is ignored. +** +** If the EntryId parameter is passed as SAHPI_ENTRY_UNSPECIFIED, and no +** announcements are present that meet the requested Severity, this function +** will have no effect. However, this is not an error. +** +** SAHPI_ENTRY_UNSPECIFIED is defined as the same value as SAHPI_FIRST_ENTRY, +** so using either symbol will have the same effect. However, +** SAHPI_ENTRY_UNSPECIFIED should be used with this function for clarity. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAnnunciatorAcknowledge( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiAnnunciatorNumT AnnunciatorNum, + SAHPI_IN SaHpiEntryIdT EntryId, + SAHPI_IN SaHpiSeverityT Severity +); + +/******************************************************************************* +** +** Name: saHpiAnnunciatorAdd() +** +** Description: +** This function is used to add an announcement to the set of items held by an +** Annunciator management instrument. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** AnnunciatorNum - [in] Annunciator number for the addressed Annunciator. +** Announcement - [in/out] Pointer to structure that contains the new +** announcement to add to the set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** Annunciators, as indicated by SAHPI_CAPABILITY_ANNUNCIATOR in the +** resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the AnnunciatorNum passed does not +** address a valid Annunciator supported by the resource. +** SA_ERR_HPI_INVALID_PARAMS is returned when: +** * The Announcement pointer is passed in as NULL. +** * The Announcement->Severity passed is not valid. +** * The Announcement->StatusCond structure passed in is not valid. +** SA_ERR_HPI_OUT_OF_SPACE is returned if the Annunciator is not able to add +** an additional announcement due to resource limits. +** SA_ERR_HPI_READ_ONLY is returned if the Annunciator is in auto mode. +** +** Remarks: +** The EntryId, Timestamp, and AddedByUser fields within the Announcement +** parameter are not used by this function. Instead, on successful +** completion, these fields are set to new values associated with the added +** announcement. AddedByUser will always be set to True. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAnnunciatorAdd( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiAnnunciatorNumT AnnunciatorNum, + SAHPI_INOUT SaHpiAnnouncementT *Announcement +); + +/******************************************************************************* +** +** Name: saHpiAnnunciatorDelete() +** +** Description: +** This function allows an HPI User to delete a single announcement or a group +** of announcements from the current set of an Annunciator. Announcements may +** be deleted individually by specifying a specific EntryId, or they may be +** deleted as a group by specifying a severity. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** AnnunciatorNum - [in] Annunciator number for the addressed Annunciator. +** EntryId - [in] Entry identifier of the announcement to delete. Reserved +** EntryId values: +** * SAHPI_ENTRY_UNSPECIFIED Ignore this parameter. +** Severity - [in] Severity level of announcements to delete. Ignored unless +** EntryId is SAHPI_ENTRY_UNSPECIFIED. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** Annunciators, as indicated by SAHPI_CAPABILITY_ANNUNCIATOR in the +** resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned if EntryId is SAHPI_ENTRY_UNSPECIFIED +** and Severity is not one of the valid enumerated values for this type. +** SA_ERR_HPI_NOT_PRESENT is returned if: +** * The AnnunciatorNum passed does not address a valid Annunciator +** supported by the resource +** * An announcement identified by the EntryId parameter does not exist in +** the current set of the Annunciator. +** SA_ERR_HPI_READ_ONLY is returned if the Annunciator is in auto mode. +** +** Remarks: +** To delete a single, specific announcement, set the EntryId parameter to a +** value representing an actual announcement in the current set. The Severity +** parameter is ignored when the EntryId parameter is set to a value other +** than SAHPI_ENTRY_UNSPECIFIED. +** +** To delete a group of announcements, set the EntryId parameter to +** SAHPI_ENTRY_UNSPECIFIED, and set the Severity parameter to identify which +** severity of announcements should be deleted. To clear all announcements +** contained within the Annunciator, set the Severity parameter to +** SAHPI_ALL_SEVERITIES. +** +** If the EntryId parameter is passed as SAHPI_ENTRY_UNSPECIFIED, and no +** announcements are present that meet the specified Severity, this function +** will have no effect. However, this is not an error. +** +** SAHPI_ENTRY_UNSPECIFIED is defined as the same value as SAHPI_FIRST_ENTRY, +** so using either symbol will have the same effect. However, +** SAHPI_ENTRY_UNSPECIFIED should be used with this function for clarity. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAnnunciatorDelete( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiAnnunciatorNumT AnnunciatorNum, + SAHPI_IN SaHpiEntryIdT EntryId, + SAHPI_IN SaHpiSeverityT Severity +); + +/******************************************************************************* +** +** Name: saHpiAnnunciatorModeGet() +** +** Description: +** This function allows an HPI User to retrieve the current operating mode of +** an Annunciator. The mode indicates whether or not an HPI User is allowed to +** add or delete items in the set, and whether or not the HPI implementation +** will automatically add or delete items in the set. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** AnnunciatorNum - [in] Annunciator number for the addressed Annunciator. +** Mode - [out] Pointer to location to store the current operating mode of the +** Annunciator where the returned value will be one of the following: +** * SAHPI_ANNUNCIATOR_MODE_AUTO - the HPI implementation may add or delete +** announcements in the set; an HPI User may not add or delete +** announcements in the set. +** * SAHPI_ANNUNCIATOR_MODE_USER - the HPI implementation may not add or +** delete announcements in the set; an HPI User may add or delete +** announcements in the set. +** * SAHPI_ANNUNCIATOR_MODE_SHARED - both the HPI implementation and an HPI +** User may add or delete announcements in the set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** Annunciators, as indicated by SAHPI_CAPABILITY_ANNUNCIATOR in the +** resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the AnnunciatorNum passed does not +** address a valid Annunciator supported by the resource. +** SA_ERR_HPI_INVALID_PARAMS is returned if Mode is passed in as NULL. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAnnunciatorModeGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiAnnunciatorNumT AnnunciatorNum, + SAHPI_OUT SaHpiAnnunciatorModeT *Mode +); + +/******************************************************************************* +** +** Name: saHpiAnnunciatorModeSet() +** +** Description: +** This function allows an HPI User to change the current operating mode of an +** Annunciator. The mode indicates whether or not an HPI User is allowed to +** add or delete announcements in the set, and whether or not the HPI +** implementation will automatically add or delete announcements in the set. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** AnnunciatorNum - [in] Annunciator number for the addressed Annunciator. +** Mode - [out] Mode to set for the Annunciator: +** * SAHPI_ANNUNCIATOR_MODE_AUTO - the HPI implementation may add or delete +** announcements in the set; an HPI User may not add or delete +** announcements in the set. +** * SAHPI_ANNUNCIATOR_MODE_USER - the HPI implementation may not add or +** delete announcements in the set; an HPI User may add or delete +** announcements in the set. +** * SAHPI_ANNUNCIATOR_MODE_SHARED - both the HPI implementation and an HPI +** User may add or delete announcements in the set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** Annunciators, as indicated by SAHPI_CAPABILITY_ANNUNCIATOR in the +** resource's RPT entry. +** SA_ERR_HPI_NOT_PRESENT is returned if the AnnunciatorNum passed does not +** address a valid Annunciator supported by the resource. +** SA_ERR_HPI_INVALID_PARAMS is returned if Mode is not a valid enumerated +** value for this type. +** SA_ERR_HPI_READ_ONLY is returned if mode changing is not permitted for +** this Annunciator. +** +** Remarks: +** None. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAnnunciatorModeSet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiAnnunciatorNumT AnnunciatorNum, + SAHPI_IN SaHpiAnnunciatorModeT Mode +); + +/******************************************************************************* +** +** Name: saHpiHotSwapPolicyCancel() +** +** Description: +** A resource supporting hot swap typically supports default policies for +** insertion and extraction. On insertion, the default policy may be for the +** resource to turn the associated FRU's local power on and to de-assert +** reset. On extraction, the default policy may be for the resource to +** immediately power off the FRU and turn on a hot swap indicator. This +** function allows an HPI User, after receiving a hot swap event with +** HotSwapState equal to SAHPI_HS_STATE_INSERTION_PENDING or +** SAHPI_HS_STATE_EXTRACTION_PENDING, to prevent the default policy from +** being executed. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** managed hot swap, as indicated by SAHPI_CAPABILITY_MANAGED_HOTSWAP in +** the resource's RPT entry. +** SA_ERR_HPI_INVALID_REQUEST is returned if the resource is: +** * Not in the INSERTION PENDING or EXTRACTION PENDING state. +** * Processing an auto-insertion or auto-extraction policy. +** +** Remarks: +** Each time the resource transitions to either the INSERTION PENDING or +** EXTRACTION PENDING state, the default policies will execute after the +** configured timeout period, unless cancelled using +** saHpiHotSwapPolicyCancel() after the transition to INSERTION PENDING or +** EXTRACTION PENDING state and before the timeout expires.The default policy +** cannot be canceled once it has begun to execute. +** +** Because a resource that supports the simplified hot swap model will never +** transition into INSERTION PENDING or EXTRACTION PENDING states, this +** function is not applicable to those resources. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapPolicyCancel ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + +/******************************************************************************* +** +** Name: saHpiResourceActiveSet() +** +** Description: +** This function allows an HPI User to request a resource to transition to the +** ACTIVE state from the INSERTION PENDING or EXTRACTION PENDING state. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support managed +** hot swap, as indicated by SAHPI_CAPABILITY_MANAGED_HOTSWAP in the +** resource's RPT entry. +** SA_ERR_HPI_INVALID_REQUEST is returned if the resource is: +** * Not in the INSERTION PENDING or EXTRACTION PENDING state. +** * Processing an auto-insertion or auto-extraction policy. +** +** Remarks: +** During insertion, a resource supporting hot swap will generate an event to +** indicate that it is in the INSERTION PENDING state. If an HPI User calls +** saHpiHotSwapPolicyCancel() before the resource begins an auto-insert +** operation, then the resource will remain in INSERTION PENDING state while +** an HPI User acts on the resource to integrate it into the system. During +** this state, an HPI User can instruct the resource to power on the +** associated FRU, to de-assert reset, or to turn off its hot swap indicator +** using the saHpiResourcePowerStateSet(), saHpiResourceResetStateSet(), or +** saHpiHotSwapIndicatorStateSet() functions, respectively, if the resource +** has those associated capabilities. Once an HPI User has completed with the +** integration of the FRU, this function must be called to signal that the +** resource should now transition into the ACTIVE state. +** +** An HPI User may also use this function to request a resource to return to +** the ACTIVE state from the EXTRACTION PENDING state in order to reject an +** extraction request. +** +** Because a resource that supports the simplified hot swap model will never +** transition into INSERTION PENDING or EXTRACTION PENDING states, this +** function is not applicable to those resources. +** +** Only valid if resource is in INSERTION PENDING or EXTRACTION PENDING state +** and an auto-insert or auto-extract policy action has not been initiated. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceActiveSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + +/******************************************************************************* +** +** Name: saHpiResourceInactiveSet() +** +** Description: +** This function allows an HPI User to request a resource to transition to the +** INACTIVE state from the INSERTION PENDING or EXTRACTION PENDING state. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support managed +** hot swap, as indicated by SAHPI_CAPABILITY_MANAGED_HOTSWAP in the +** resource's RPT entry. +** SA_ERR_HPI_INVALID_REQUEST is returned if the resource is: +** * Not in the INSERTION PENDING or EXTRACTION PENDING state. +** * Processing an auto-insertion or auto-extraction policy. +** +** Remarks: +** During extraction, a resource supporting hot swap will generate an event +** to indicate that it is in the EXTRACTION PENDING state. If an HPI User +** calls saHpiHotSwapPolicyCancel() before the resource begins an auto-extract +** operation, then the resource will remain in EXTRACTION PENDING state while +** an HPI User acts on the resource to isolate the associated FRU from the +** system. During this state, an HPI User can instruct the resource to power +** off the FRU, to assert reset, or to turn on its hot swap indicator using +** the saHpiResourcePowerStateSet(), saHpiResourceResetStateSet(), or +** saHpiHotSwapIndicatorStateSet() functions, respectively, if the resource +** has these associated capabilities. Once an HPI User has completed the +** shutdown of the FRU, this function must be called to signal that the +** resource should now transition into the INACTIVE state. +** +** An HPI User may also use this function to request a resource to return to +** the INACTIVE state from the INSERTION PENDING state to abort a hot-swap +** insertion action. +** +** Because a resource that supports the simplified hot swap model will never +** transition into INSERTION PENDING or EXTRACTION PENDING states, this +** function is not applicable to those resources. +** +** Only valid if resource is in EXTRACTION PENDING or INSERTION PENDING state +** and an auto-extract or auto-insert policy action has not been initiated. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceInactiveSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId +); + +/******************************************************************************* +** +** Name: saHpiAutoInsertTimeoutGet() +** +** Description: +** This function allows an HPI User to request the auto-insert timeout value +** within a specific domain. This value indicates how long the resource will +** wait before the default auto-insertion policy is invoked. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** Timeout - [out] Pointer to location to store the number of nanoseconds to +** wait before autonomous handling of the hot swap event. Reserved time +** outvalues: +** * SAHPI_TIMEOUT_IMMEDIATE indicates autonomous handling is immediate. +** * SAHPI_TIMEOUT_BLOCK indicates autonomous handling does not occur. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_INVALID_PARAMS is returned if the Timeout pointer is passed in +** as NULL. +** +** Remarks: +** Each domain maintains a single auto-insert timeout value and it is applied +** to all contained resources upon insertion, which support managed hot swap. +** Further information on the auto-insert timeout can be found in the +** function saHpiAutoInsertTimeoutSet(). +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoInsertTimeoutGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_OUT SaHpiTimeoutT *Timeout +); + +/******************************************************************************* +** +** Name: saHpiAutoInsertTimeoutSet() +** +** Description: +** This function allows an HPI User to configure a timeout for how long to +** wait before the default auto-insertion policy is invoked on a resource +** within a specific domain. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** Timeout - [in] The number of nanoseconds to wait before autonomous handling +** of the hot swap event. Reserved time out values: +** * SAHPI_TIMEOUT_IMMEDIATE indicates proceed immediately to autonomous +** handling. +** * SAHPI_TIMEOUT_BLOCK indicates prevent autonomous handling. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_READ_ONLY is returned if the auto-insert timeout for the domain +** is fixed as indicated by the SAHPI_DOMAIN_CAP_AUTOINSERT_READ_ONLY flag +** in the DomainInfo structure. +** SA_ERR_HPI_INVALID_PARAMS is returned when the Timeout parameter is not set +** to SAHPI_TIMEOUT_BLOCK, SAHPI_TIMEOUT_IMMEDIATE or a positive value. +** +** Remarks: +** This function accepts a parameter instructing each resource to impose a +** delay before performing its default hot swap policy for auto-insertion. +** The parameter may be set to SAHPI_TIMEOUT_IMMEDIATE to direct resources to +** proceed immediately to auto-insertion, or to SAHPI_TIMEOUT_BLOCK to prevent +** auto-insertion from ever occurring. If the parameter is set to another +** value, then it defines the number of nanoseconds between the time a hot +** swap event with HotSwapState = SAHPI_HS_STATE_INSERTION_PENDING is +** generated, and the time that the auto-insertion policy will be invoked for +** that resource. If, during this time period, a saHpiHotSwapPolicyCancel() +** function call is processed, the timer will be stopped, and the +** auto-insertion policy will not be invoked. Each domain maintains a single +** auto-insert timeout value and it is applied to all contained resources upon +** insertion, which support managed hot swap. +** +** Once the auto-insertion policy begins, an HPI User will not be allowed to +** cancel the insertion policy; hence, the timeout should be set appropriately +** to allow for this condition. Note that the timeout period begins when the +** hot swap event with HotSwapState = SAHPI_HS_STATE_INSERTION_PENDING is +** initially generated; not when it is received by an HPI User with a +** saHpiEventGet() function call, or even when it is placed in a session +** event queue. +** +** A resource may exist in multiple domains, which themselves may have +** different auto-insertion timeout values. Upon insertion, the resource will +** begin its auto-insertion policy based on the smallest auto-insertion +** timeout value. As an example, if a resource is inserted into two domains, +** one with an auto-insertion timeout of 5 seconds, and one with an +** auto-insertion timeout of 10 seconds, the resource will begin its +** auto-insertion policy at 5 seconds. +** +** An implementation may enforce a fixed, preset timeout value. In such +** cases, the SAHPI_DOMAIN_CAP_AUTOINSERT_READ_ONLY flag will be set to +** indicate that an HPI User cannot change the auto-insert Timeout value. +** SA_ERR_HPI_READ_ONLY is returned if an HPI User attempts to change a +** read-only timeout. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoInsertTimeoutSet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiTimeoutT Timeout +); + +/******************************************************************************* +** +** Name: saHpiAutoExtractTimeoutGet() +** +** Description: +** This function allows an HPI User to request the timeout for how long a +** resource will wait before the default auto-extraction policy is invoked. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** Timeout - [out] Pointer to location to store the number of nanoseconds to +** wait before autonomous handling of the hot swap event. Reserved time +** out values: +** * SAHPI_TIMEOUT_IMMEDIATE indicates autonomous handling is immediate. +** * SAHPI_TIMEOUT_BLOCK indicates autonomous handling does not occur. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support managed +** hot swap, as indicated by SAHPI_CAPABILITY_MANAGED_HOTSWAP in the +** resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned if the Timeout pointer is passed in +** as NULL. +** +** Remarks: +** Further information on auto-extract timeouts is detailed in +** saHpiAutoExtractTimeoutSet(). +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoExtractTimeoutGet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiTimeoutT *Timeout +); + +/******************************************************************************* +** +** Name: saHpiAutoExtractTimeoutSet() +** +** Description: +** This function allows an HPI User to configure a timeout for how long to +** wait before the default auto-extraction policy is invoked. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** Timeout - [in] The number of nanoseconds to wait before autonomous handling +** of the hot swap event. Reserved timeout values: +** * SAHPI_TIMEOUT_IMMEDIATE indicates proceed immediately to autonomous +** handling. +** * SAHPI_TIMEOUT_BLOCK indicates prevent autonomous handling. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support managed +** hot swap, as indicated by SAHPI_CAPABILITY_MANAGED_HOTSWAP in the +** resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned when the Timeout parameter is not set +** to SAHPI_TIMEOUT_BLOCK, SAHPI_TIMEOUT_IMMEDIATE or a positive value. +** SA_ERR_HPI_READ_ONLY is returned if the auto-extract timeout for the +** resource is fixed, as indicated by the +** SAHPI_HS_CAPABILITY_AUTOEXTRACT_READ_ONLY in the resource's RPT entry. +** +** Remarks: +** This function accepts a parameter instructing the resource to impose a +** delay before performing its default hot swap policy for auto-extraction. +** The parameter may be set to SAHPI_TIMEOUT_IMMEDIATE to direct the resource +** to proceed immediately to auto-extraction, or to SAHPI_TIMEOUT_BLOCK to +** prevent auto-extraction from ever occurring on a resource. If the parameter +** is set to another value, then it defines the number of nanoseconds between +** the time a hot swap event with +** HotSwapState = SAHPI_HS_STATE_EXTRACTION_PENDING is generated and the time +** that the auto-extraction policy will be invoked for the resource. If, +** during this time period, a saHpiHotSwapPolicyCancel() function call is +** processed, the timer will be stopped, and the auto-extraction policy will +** not be invoked. +** +** Once the auto-extraction policy begins, an HPI User will not be allowed to +** cancel the extraction policy; hence, the timeout should be set +** appropriately to allow for this condition. Note that the timeout period +** begins when the hot swap event with +** HotSwapState = SAHPI_HS_STATE_EXTRACTION_PENDING is initially generated; +** not when it is received by a HPI User with a saHpiEventGet() function call, +** or even when it is placed in a session event queue. +** +** The auto-extraction policy is set at the resource level and is only +** supported by resources supporting the Managed Hot Swap capability. The +** auto-extraction timeout value cannot be modified if the resource's "Hot +** Swap AutoExtract Read-only" capability is set. After discovering that a +** newly inserted resource supports Managed Hot Swap, and read-write +** auto-extract timeouts, an HPI User may use this function to change the +** timeout of the auto-extraction policy for that resource. If a resource +** supports the simplified hot swap model, setting this timer has no effect +** since the resource will transition directly to NOT PRESENT state on an +** extraction. +** +** An implementation may enforce a fixed, preset timeout value. In such +** cases, the SAHPI_HS_CAPABILITY_AUTOEXTRACT_READ_ONLY flag will be set to +** indicate that an HPI User cannot change the auto-extract Timeout value. +** SA_ERR_HPI_READ_ONLY is returned if an HPI User attempts to change a +** read-only timeout. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiAutoExtractTimeoutSet( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiTimeoutT Timeout +); + +/******************************************************************************* +** +** Name: saHpiHotSwapStateGet() +** +** Description: +** This function allows an HPI User to retrieve the current hot swap state of +** a resource. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** State - [out] Pointer to location to store returned state information. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support managed +** hot swap, as indicated by SAHPI_CAPABILITY_MANAGED_HOTSWAP in the +** resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned if the State pointer is passed in as +** NULL. +** +** Remarks: +** The returned state will be one of the following four states: +** * SAHPI_HS_STATE_INSERTION_PENDING +** * SAHPI_HS_STATE_ACTIVE +** * SAHPI_HS_STATE_EXTRACTION_PENDING +** * SAHPI_HS_STATE_INACTIVE +** +** The state SAHPI_HS_STATE_NOT_PRESENT will never be returned, because a +** resource that is not present cannot be addressed by this function in the +** first place. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiHsStateT *State +); + +/******************************************************************************* +** +** Name: saHpiHotSwapActionRequest() +** +** Description: +** This function allows an HPI User to invoke an insertion or extraction +** process via software. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** Action - [in] Requested action: +** * SAHPI_HS_ACTION_INSERTION +** * SAHPI_HS_ACTION_EXTRACTION +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support managed +** hot swap, as indicated by SAHPI_CAPABILITY_MANAGED_HOTSWAP in the +** resource's RPT entry. +** SA_ERR_HPI_INVALID_REQUEST is returned if the resource is not in an +** appropriate hot swap state, or if the requested action is inappropriate +** for the current hot swap state. See the Remarks section below. +** SA_ERR_HPI_INVALID_PARAMS is returned when Action is not one of the valid +** enumerated values for this type. +** +** Remarks: +** A resource supporting hot swap typically requires a physical action on the +** associated FRU to invoke an insertion or extraction process. An insertion +** process is invoked by physically inserting the FRU into a chassis. +** Physically opening an ejector latch or pressing a button invokes the +** extraction process. This function provides an alternative means to invoke +** an insertion or extraction process via software. +** +** This function may only be called: +** * To request an insertion action when the resource is in INACTIVE state. +** * To request an extraction action when the resource is in the ACTIVE +** state. +** The function may not be called when the resource is in any other state. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapActionRequest ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiHsActionT Action +); + +/******************************************************************************* +** +** Name: saHpiHotSwapIndicatorStateGet() +** +** Description: +** This function allows an HPI User to retrieve the state of the hot swap +** indicator. A FRU associated with a hot-swappable resource may include a hot +** swap indicator such as a blue LED. This indicator signifies that the FRU is +** ready for removal. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** State - [out] Pointer to location to store state of hot swap indicator. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support: +** * Managed hot swap, as indicated by SAHPI_CAPABILITY_MANAGED_HOTSWAP in +** the resource's RPT entry. +** * A hot swap indicator on the FRU as indicated by the +** SAHPI_HS_CAPABILITY_INDICATOR_SUPPORTED in the resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned if the State pointer is passed in as +** NULL. +** +** Remarks: +** The returned state is either SAHPI_HS_INDICATOR_OFF or +** SAHPI_HS_INDICATOR_ON. This function will return the state of the +** indicator, regardless of what hot swap state the resource is in. +** +** Not all resources supporting managed hot swap will necessarily support +** this function. Whether or not a resource supports the hot swap indicator +** is specified in the Hot Swap Capabilities field of the RPT entry. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapIndicatorStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiHsIndicatorStateT *State +); + +/******************************************************************************* +** +** Name: saHpiHotSwapIndicatorStateSet() +** +** Description: +** This function allows an HPI User to set the state of the hot swap +** indicator. A FRU associated with a hot-swappable resource may include a hot +** swap indicator such as a blue LED. This indicator signifies that the FRU is +** ready for removal. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** State - [in] State of hot swap indicator to be set. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support: +** * Managed hot swap, as indicated by SAHPI_CAPABILITY_MANAGED_HOTSWAP in +** the resource's RPT entry. +** * A hot swap indicator on the FRU as indicated by the +** SAHPI_HS_CAPABILITY_INDICATOR_SUPPORTED in the resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned when State is not one of the valid +** enumerated values for this type. +** +** Remarks: +** Valid states include SAHPI_HS_INDICATOR_OFF or SAHPI_HS_INDICATOR_ON. This +** function will set the indicator regardless of what hot swap state the +** resource is in, though it is recommended that this function be used only +** in conjunction with moving the resource to the appropriate hot swap state. +** +** Not all resources supporting managed hot swap will necessarily support this +** function. Whether or not a resource supports the hot swap indicator is +** specified in the Hot Swap Capabilities field of the RPT entry. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiHotSwapIndicatorStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiHsIndicatorStateT State +); + +/******************************************************************************* +** +** Name: saHpiParmControl() +** +** Description: +** This function allows an HPI User to save and restore parameters associated +** with a specific resource. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** Action - [in] Action to perform on resource parameters. +** * SAHPI_DEFAULT_PARM Restores the factory default settings for a +** specific resource. Factory defaults include sensor thresholds and +** configurations, and resource- specific configuration parameters. +** * SAHPI_SAVE_PARM Stores the resource configuration parameters in +** non-volatile storage. Resource configuration parameters stored in +** non-volatile storage will survive power cycles and resource resets. +** * SAHPI_RESTORE_PARM Restores resource configuration parameters from +** non-volatile storage. Resource configuration parameters include +** sensor thresholds and sensor configurations, as well as +** resource-specific parameters. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support +** parameter control, as indicated by SAHPI_CAPABILITY_CONFIGURATION in the +** resource's RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned when Action is not set to a proper +** value. +** +** Remarks: +** Resource-specific parameters should be documented in an implementation +** guide for the HPI implementation. +** +** When this API is called with SAHPI_RESTORE_PARM as the action prior to +** having made a call with this API where the action parameter was set to +** SAHPI_SAVE_PARM, the default parameters will be restored. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiParmControl ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiParmActionT Action +); + +/******************************************************************************* +** +** Name: saHpiResourceResetStateGet() +** +** Description: +** This function gets the reset state of an entity, allowing an HPI User to +** determine if the entity is being held with its reset asserted. If a +** resource manages multiple entities, this function will address the entity +** which is identified in the RPT entry for the resource. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** ResetAction - [out] The current reset state of the entity. Valid reset +** states are: +** * SAHPI_RESET_ASSERT: The entity's reset is asserted, e.g., for hot +** swap insertion/extraction purposes. +** * SAHPI_RESET_DEASSERT: The entity's reset is not asserted. +** +** Return Value: +** SA_OK is returned if the resource has reset control, and the reset state +** has successfully been determined; otherwise, an error code is returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support reset +** control as indicated by SAHPI_CAPABILITY_RESET in the resource's RPT +** entry. +** SA_ERR_HPI_INVALID_PARAMS is returned if the ResetAction pointer is passed +** in as NULL. +** +** Remarks: +** SAHPI_COLD_RESET and SAHPI_WARM_RESET are pulsed resets, and are not valid +** values to be returned in ResetAction. If the entity is not being held in +** reset (using SAHPI_RESET_ASSERT), the appropriate value is +** SAHPI_RESET_DEASSERT. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceResetStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiResetActionT *ResetAction +); + +/******************************************************************************* +** +** Name: saHpiResourceResetStateSet() +** +** Description: +** This function directs the resource to perform the specified reset type on +** the entity that it manages. If a resource manages multiple entities, this +** function addresses the entity that is identified in the RPT entry for the +** resource. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** ResetAction - [in] Type of reset to perform on the entity. Valid reset +** actions are: +** * SAHPI_COLD_RESET: Perform a 'Cold Reset' on the entity (pulse), +** leaving reset de-asserted, +** * SAHPI_WARM_RESET: Perform a 'Warm Reset' on the entity (pulse), +** leaving reset de-asserted, +** * SAHPI_RESET_ASSERT: Put the entity into reset state and hold reset +** asserted, e.g., for hot swap insertion/extraction purposes, +** * SAHPI_RESET_DEASSERT: Bring the entity out of the reset state. +** +** Return Value: +** SA_OK is returned if the resource has reset control, and the requested +** reset action has succeeded; otherwise, an error code is returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support resource +** reset control, as indicated by SAHPI_CAPABILITY_RESET in the resource's +** RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned when the ResetAction is not set to a +** proper value. +** SA_ERR_HPI_INVALID_CMD is returned if the requested ResetAction is +** SAHPI_RESET_ASSERT and the resource does not support this action. +** SA_ERR_HPI_INVALID_REQUEST is returned if the ResetAction is +** SAHPI_COLD_RESET or SAHPI_WARM_RESET and reset is currently asserted. +** +** Remarks: +** Some resources may not support holding the entity in reset. If this is the +** case, the resource should return SA_ERR_HPI_INVALID_CMD if the +** SAHPI_RESET_ASSERT action is requested. All resources that have the +** SAHPI_CAPABILITY_RESET flag set in their RPTs should support +** SAHPI_COLD_RESET and SAHPI_WARM_RESET. However, it is not required that +** these actions be different. That is, some resources may only have one +** sort of reset action (e.g., a "cold" reset) which is executed when either +** SAHPI_COLD_RESET or SAHPI_WARM_RESET is requested. +** +** The SAHPI_RESET_ASSERT is used to hold an entity in reset, and +** SAHPI_RESET_DEASSERT is used to bring the entity out of an asserted reset +** state. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourceResetStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiResetActionT ResetAction +); + +/******************************************************************************* +** +** Name: saHpiResourcePowerStateGet() +** +** Description: +** This function gets the power state of an entity, allowing an HPI User to +** determine if the entity is currently powered on or off. If a resource +** manages multiple entities, this function will address the entity which is +** identified in the RPT entry for the resource. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** State - [out] The current power state of the resource. Valid power states +** are: +** * SAHPI_POWER_OFF: The entity's primary power is OFF, +** * SAHPI_POWER_ON: The entity's primary power is ON. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support power +** management, as indicated by SAHPI_CAPABILITY_POWER in the resource's +** RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned if the State pointer is passed in +** as NULL. +** +** Remarks: +** SAHPI_POWER_CYCLE is a pulsed power operation and is not a valid return +** for the power state. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourcePowerStateGet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_OUT SaHpiPowerStateT *State +); + +/******************************************************************************* +** +** Name: saHpiResourcePowerStateSet() +** +** Description: +** This function directs the resource to perform the power control action on +** the entity that it manages. If a resource manages multiple entities, this +** function addresses the entity that is identified in the RPT entry for the +** resource. +** +** Parameters: +** SessionId - [in] Identifier for a session context previously obtained using +** saHpiSessionOpen(). +** ResourceId - [in] Resource identified for this operation. +** State - [in] the requested power control action. Valid values are: +** * SAHPI_POWER_OFF: The entity's primary power is turned OFF, +** * SAHPI_POWER_ON: The entity's primary power is turned ON, +** * SAHPI_POWER_CYCLE: The entity's primary power is turned OFF, then +** turned ON. +** +** Return Value: +** SA_OK is returned on successful completion; otherwise, an error code is +** returned. +** SA_ERR_HPI_CAPABILITY is returned if the resource does not support power +** management, as indicated by SAHPI_CAPABILITY_POWER in the resource's +** RPT entry. +** SA_ERR_HPI_INVALID_PARAMS is returned when State is not one of the valid +** enumerated values for this type. +** +** Remarks: +** This function controls the hardware power on a FRU entity regardless of +** what hot-swap state the resource is in. For example, it is legal (and may +** be desirable) to cycle power on the FRU even while it is in ACTIVE state in +** order to attempt to clear a fault condition. Similarly, a resource could be +** instructed to power on a FRU even while it is in INACTIVE state, for +** example, in order to run off-line diagnostics. +** +** Not all resources supporting hot swap will necessarily support this +** function. In particular, resources that use the simplified hot swap model +** may not have the ability to control FRU power. +** +** This function may also be supported for non-FRU entities if power control +** is available for those entities. +** +*******************************************************************************/ +SaErrorT SAHPI_API saHpiResourcePowerStateSet ( + SAHPI_IN SaHpiSessionIdT SessionId, + SAHPI_IN SaHpiResourceIdT ResourceId, + SAHPI_IN SaHpiPowerStateT State +); + +#endif diff --git a/hpiutil/TODO b/hpiutil/TODO new file mode 100644 index 0000000..5ab06da --- /dev/null +++ b/hpiutil/TODO @@ -0,0 +1,65 @@ +HPIUTIL TODO + +x Porting the utilities in hpiutil from HPI_A to HPI_B + These can be built for either version of HPI via a compile flag. + They default to HPI_A, since HPI_B libraries are not fully released yet. + Ported to HPI B with OpenHPI: + hpialarmpanel.c done, with compile flags 10/13/04 + hpireset.c, hpisensor.c, hpisel.c hpiwdt.c - done + hpifru.c (hpifrub.c) - done + hpievent.c (runs, but ThresholdSet error -1010 due to lib bug) + COMPLETE + +x SpiLibd supplies inventory capability for DIMMs, but gives error when + trying to get its inventory data. + COMPLETE in hpiutil-1.1.9 + +Intel HPI library/daemon (SpiLibd) known issues: +- If the SEL is totally empty (not even a 'cleared' message), the SpiLibd + will not start because the GetSelEntry returns 0xcb. + The lib probably needs to set eventid to zero and proceed in this case. + +OpenHPI library/daemon with ipmidirect plugin: + 11/10/06 completed adding LEDs, watchdog, and Intel RMS features + 12/07/06 openhpi-2.6.3 released, fully tested + +OpenHPI library with ipmi plugin testing & issues: + Continuing testing of hpiutil with OpenHPI using its ipmi plugin, + but currently there are blocking bugs open (see latest date below). + 02/11/04 OpenHPI 0.5 dies during discovery + 05/24/04 OpenHPI 1.0.0 testing, wrote more bugzillas + 10/14/04 openhpi-1.9.1 testing, then added alarm panel code + With patches to 1.9.1, alarm panel controls are operational now. + 12/02/04 Submitted fixes for watchdog 932510 & 1077934. + 01/10/05 Submitted fixes for several inventory bugs into openhpi-2.0.1 cvs. + Bug list: (f=fixed, x=rejected, o=open) + x 924280 IPMI plug-in takes too long to discover 2004-03-26 18:24 + (ref #959765) + x 932486 wrong string terminator for Compact SDRs 2004-04-09 15:37 + f 932492 Lots of FRU errors displayed during discovery 2004-04-09 15:47 + f 932496 EventLog RecordId and Time are invalid 2004-04-09 15:55 + f 932510 Watchdog values incorrect 2004-04-09 16:09 + f 933737 hpievent test failed (EventGet & hyst_set) 2004-04-12 12:29 + f 933741 Reset Controls not implemented 2004-04-12 12:33 + f 934475 Add some alarm panel logic 2004-04-13 16:23 + f 948551 RdrGet returns -1024 with hpifru 2004-05-05 11:25 + f 948644 ResetStateSet returns error -1005 2004-05-05 14:01 + o 959749 hpithres returns -1006 from ThresholdsGet 2004-05-24 18:02 + f 959753 No Inventory RDRs are populated 2004-05-24 18:13 + f 959765 IPMI plug-in takes too long to discover 2004-05-24 18:27 + (some progress, 10 min down to 3 min - now 2.5 min) + f 1040276 Event in SEL not mapped to HPI 2004-10-04 19:22 + f 1068098 EventLogEntryGet returns less than 16 data by 2004-11-17 11:04 + o 1070785 OpenHPI discover method hangs if system is no 2004-11-21 23:54 + f 1077934 some entity tags have zero length 2004-12-02 16:46 + o 1086122 Can't set (write) Inventory fields 2004-12-15 18:02 + f 1090496 FLOAT64 decoding should not be scientific not 2004-12-23 13:39 + f 1095266 Inventory Product Fields report Board Area ty 2005-01-03 16:24 + f 1095262 Inventory Custom field not retrieved 2005-01-03 16:14 + o 1095256 Takes 5 Discovery passes to fill in FRU data 2005-01-03 16:09 + f 1095225 Inventory content truncated 2005-01-03 15:04 + f 1098067 hpisensor output usability 2005-01-07 13:37 + f 1098073 ThresholdsGet sometimes returns TIMEOUT 2005-01-07 13:49 + 09/26/06 Submitted bug against openhpi-2.6.2 ipmi plugin discovery failure + o 1565999 ohoi: domain not fully up, sel support = 0 2006-09-26 17;16 + diff --git a/hpiutil/env.hpi b/hpiutil/env.hpi new file mode 100755 index 0000000..2d14c96 --- /dev/null +++ b/hpiutil/env.hpi @@ -0,0 +1,11 @@ +export SAHPI_HOME=/etc/hpi +export SPI_LIB_LOG_LOCATION=/var/log/spilib +export SPI_LIB_CFG_LOCATION=$SAHPI_HOME/spi-lib.conf +export SPI_DAEMON_LOG_LOCATION=/var/log/spidaemon +export SPI_DAEMON_CFG_LOCATION=$SAHPI_HOME/spi-daemon.conf +export SPI_DAEMON_LOG_LEVEL=-l5 +export SPI_LIB_LOG_LEVEL=-l5 +export LD_LIBRARY_PATH=/usr/lib:/lib +# export LD_LIBRARY_PATH=$SAHPI_HOME/lib +# export LD_ASSUME_KERNEL=2.4.1 +# make sure to "mkdir -p /etc/hpi" diff --git a/hpiutil/env.openhpi b/hpiutil/env.openhpi new file mode 100755 index 0000000..53bdee6 --- /dev/null +++ b/hpiutil/env.openhpi @@ -0,0 +1,2 @@ +export LD_LIBRARY_PATH=/usr/local/lib +# make sure to "mkdir -p /etc/hpi" diff --git a/hpiutil/hpialarmpanel.c b/hpiutil/hpialarmpanel.c new file mode 100644 index 0000000..f918636 --- /dev/null +++ b/hpiutil/hpialarmpanel.c @@ -0,0 +1,373 @@ +/* + * hpialarmpanel.c + * + * Author: Andy Cress arcress at users.sourceforge.net + * Copyright (c) 2003 Intel Corporation. + * + * 04/15/03 Andy Cress - created + * 04/17/03 Andy Cress - mods for resourceid, first good run + * 04/23/03 Andy Cress - first run with good ControlStateGet + * 04/24/03 Andy Cress - v0.5 with good ControlStateSet + * 04/29/03 Andy Cress - v0.6 changed control.oem values + * 06/06/03 Andy Cress - v1.0 check for Analog States + * 02/23/04 Andy Cress - v1.1 add checking/setting disk LEDs + * 10/13/04 Andy Cress - v1.2 add ifdefs for HPI_A & HPI_B, added -d/raw + */ +/*M* +Copyright (c) 2003, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + a.. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b.. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + c.. Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *M*/ + +#include +#include +#include +#include "SaHpi.h" + +#define uchar unsigned char +#define SAHPI_OEM_ALARM_LED 0x10 +#define SAHPI_OEM_DISK_LED 0x20 +#ifdef HPI_A +char *progver = "1.2 HPI-A"; +#else +char *progver = "1.2 HPI-B"; +#endif +char fdebug = 0; +char *states[3] = {"off", "ON ", "unknown" }; +uchar fsetid = 0; +uchar fid = 0; +#define NLEDS 6 +struct { + uchar fset; + uchar val; +} leds[NLEDS] = { /* rdr.RdrTypeUnion.CtrlRec.Oem is an index for this */ +{/*pwr*/ 0, 0}, +{/*crt*/ 0, 0}, +{/*maj*/ 0, 0}, +{/*min*/ 0, 0}, +{/*diska*/ 0, 0}, +{/*diskb*/ 0, 0} }; + + +int +main(int argc, char **argv) +{ + int c; + SaErrorT rv; + SaHpiSessionIdT sessionid; +#ifdef HPI_A + SaHpiVersionT hpiVer; + SaHpiRptInfoT rptinfo; +#endif + SaHpiRptEntryT rptentry; + SaHpiEntryIdT rptentryid; + SaHpiEntryIdT nextrptentryid; + SaHpiEntryIdT entryid; + SaHpiEntryIdT nextentryid; + SaHpiResourceIdT resourceid; + SaHpiRdrT rdr; + SaHpiCtrlTypeT ctltype; + SaHpiCtrlNumT ctlnum; + SaHpiCtrlStateT ctlstate; + int raw_val = 0; + int j; + uchar b = 0; + + printf("%s ver %s\n", argv[0],progver); + while ( (c = getopt( argc, argv,"rxa:b:c:m:n:p:i:d:o?")) != EOF ) + switch(c) { + + case 'c': b = atoi(optarg); /* set crit alarm value */ + leds[1].fset = 1; + leds[1].val = b; + break; + case 'm': b = atoi(optarg); /* set major alarm value */ + leds[2].fset = 1; + leds[2].val = b; + break; + case 'n': b = atoi(optarg); /* set minor alarm value */ + leds[3].fset = 1; + leds[3].val = b; + break; + case 'a': b = atoi(optarg); /* set disk a fault led */ + leds[4].fset = 1; + leds[4].val = b; + break; + case 'b': b = atoi(optarg); /* set disk b fault led */ + leds[5].fset = 1; + leds[5].val = b; + break; + case 'p': b = atoi(optarg); /* set power alarm value */ + leds[0].fset = 1; + leds[0].val = b; + break; + case 'i': fid = atoi(optarg); /* set chassis id on/off */ + fsetid = 1; + break; + case 'd': raw_val = atoi(optarg); /* set raw alarm byte */ + break; + case 'o': fsetid=1; fid=0; /* set all alarms off */ + for (j = 0; j < NLEDS; j++) { + leds[j].fset = 1; + leds[j].val = 0; + } + break; + case 'x': fdebug = 1; break; /* debug messages */ + default: + printf("Usage: %s [-a -b -c -i -m -n -p -o -x]\n", argv[0]); + printf(" where -c1 sets Critical Alarm on\n"); + printf(" -c0 sets Critical Alarm off\n"); + printf(" -m1 sets Major Alarm on\n"); + printf(" -m0 sets Major Alarm off\n"); + printf(" -n1 sets Minor Alarm on\n"); + printf(" -n0 sets Minor Alarm off\n"); + printf(" -p1 sets Power Alarm on\n"); + printf(" -p0 sets Power Alarm off\n"); + printf(" -i5 sets Chassis ID on for 5 sec\n"); + printf(" -i0 sets Chassis ID off\n"); + printf(" -a1 sets Disk A fault on\n"); + printf(" -a0 sets Disk A fault off\n"); + printf(" -b1 sets Disk B fault on\n"); + printf(" -b0 sets Disk B fault off\n"); +#ifndef HPI_A + printf(" -d[byte] sets raw Alarm byte\n"); +#endif + printf(" -o sets all Alarms off\n"); + printf(" -x show eXtra debug messages\n"); + exit(1); + } + +#ifdef HPI_A + rv = saHpiInitialize(&hpiVer); + if (rv != SA_OK) { + printf("saHpiInitialize error %d\n",rv); + exit(-1); + } + if (fdebug) printf("Initialize complete, rv = %d\n",rv); + rv = saHpiSessionOpen(SAHPI_DEFAULT_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + if (rv == SA_ERR_HPI_ERROR) + printf("saHpiSessionOpen: error %d, HPI daemon not running\n",rv); + else + printf("saHpiSessionOpen error %d\n",rv); + exit(-1); + } + rv = saHpiResourcesDiscover(sessionid); + if (fdebug) printf("saHpiResourcesDiscover complete, rv = %d\n",rv); + rv = saHpiRptInfoGet(sessionid,&rptinfo); + if (fdebug) printf("saHpiRptInfoGet rv = %d\n",rv); + printf("RptInfo: UpdateCount = %x, UpdateTime = %lx\n", + rptinfo.UpdateCount, (unsigned long)rptinfo.UpdateTimestamp); +#else /* HPI B.01.01 */ + rv = saHpiSessionOpen(SAHPI_UNSPECIFIED_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + printf("saHpiSessionOpen error %d\n",rv); + exit(-1); + } + rv = saHpiDiscover(sessionid); + if (fdebug) printf("saHpiDiscover complete, rv = %d\n",rv); + + if (fsetid) { /* HPI B.01.01 Identify logic */ + printf("Setting ID led to %d sec\n", fid); + /* do saHpiIdentify function */ + printf("Not yet supported\n"); + } +#endif + + /* walk the RPT list */ + rptentryid = SAHPI_FIRST_ENTRY; + while ((rv == SA_OK) && (rptentryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRptEntryGet(sessionid,rptentryid,&nextrptentryid,&rptentry); + if (rv != SA_OK) printf("RptEntryGet: rv = %d\n",rv); + if (rv == SA_OK) { + /* Walk the RDR list for this RPT entry */ + entryid = SAHPI_FIRST_ENTRY; + resourceid = rptentry.ResourceId; +#ifdef HPI_A + rptentry.ResourceTag.Data[rptentry.ResourceTag.DataLength] = 0; +#else + /* + * Don't stringify here, since OpenHPI returns a valid string, but + * a DataLength of zero here (for processor, bios). + */ +#endif + //if (fdebug) + printf("rptentry[%d] resourceid=%d tag: %s\n", + rptentryid, resourceid, rptentry.ResourceTag.Data); + while ((rv == SA_OK) && (entryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRdrGet(sessionid,resourceid, + entryid,&nextentryid, &rdr); + if (fdebug) printf("saHpiRdrGet[%d] rv = %d\n",entryid,rv); + if (rv == SA_OK) { + if (rdr.RdrType == SAHPI_CTRL_RDR) { + /*type 1 includes alarm LEDs*/ + ctlnum = rdr.RdrTypeUnion.CtrlRec.Num; + rdr.IdString.Data[rdr.IdString.DataLength] = 0; + if (fdebug) printf("Ctl[%d]: %d %d %s\n", + ctlnum, rdr.RdrTypeUnion.CtrlRec.Type, + rdr.RdrTypeUnion.CtrlRec.OutputType, + rdr.IdString.Data); + rv = saHpiControlTypeGet(sessionid,resourceid, + ctlnum,&ctltype); + if (fdebug) printf("saHpiControlTypeGet[%d] rv = %d, type = %d\n",ctlnum,rv,ctltype); +#ifdef HPI_A + rv = saHpiControlStateGet(sessionid,resourceid, + ctlnum,&ctlstate); +#else + rv = saHpiControlGet(sessionid, resourceid, ctlnum, + NULL, &ctlstate); +#endif + if (fdebug) + printf("saHpiControlStateGet[%d] rv = %d v = %x\n", + ctlnum,rv,ctlstate.StateUnion.Digital); + printf("RDR[%d]: ctltype=%d:%d oem=%02x %s \t", + rdr.RecordId, + rdr.RdrTypeUnion.CtrlRec.Type, + rdr.RdrTypeUnion.CtrlRec.OutputType, + rdr.RdrTypeUnion.CtrlRec.Oem, + rdr.IdString.Data); + if (rv == SA_OK) { + if (ctlstate.Type == SAHPI_CTRL_TYPE_ANALOG) + b = 2; /*Identify*/ + else { + b = ctlstate.StateUnion.Digital; + if (b > 2) b = 2; + } + printf("state = %s\n",states[b]); + } else { printf("\n"); } + + if (rdr.RdrTypeUnion.CtrlRec.Type == SAHPI_CTRL_TYPE_ANALOG && + rdr.RdrTypeUnion.CtrlRec.OutputType == SAHPI_CTRL_LED) { + /* This is a Chassis Identify */ + if (fsetid) { + printf("Setting ID led to %d sec\n", fid); + ctlstate.Type = SAHPI_CTRL_TYPE_ANALOG; + ctlstate.StateUnion.Analog = fid; +#ifdef HPI_A + rv = saHpiControlStateSet(sessionid, + resourceid, ctlnum,&ctlstate); +#else + rv = saHpiControlSet(sessionid, resourceid, + ctlnum, SAHPI_CTRL_MODE_MANUAL, + &ctlstate); +#endif + printf("saHpiControlStateSet[%d] rv = %d\n",ctlnum,rv); + } + } else + if (rdr.RdrTypeUnion.CtrlRec.Type == SAHPI_CTRL_TYPE_DIGITAL && + (rdr.RdrTypeUnion.CtrlRec.Oem & 0xf0) == SAHPI_OEM_ALARM_LED && + rdr.RdrTypeUnion.CtrlRec.OutputType == SAHPI_CTRL_LED) { + /* this is an alarm LED */ + b = (uchar)rdr.RdrTypeUnion.CtrlRec.Oem & 0x0f; + if ((b < NLEDS) && leds[b].fset) { + printf("Setting alarm led %d to %d\n",b,leds[b].val); + if (leds[b].val == 0) + ctlstate.StateUnion.Digital = SAHPI_CTRL_STATE_OFF; + else + ctlstate.StateUnion.Digital = SAHPI_CTRL_STATE_ON; +#ifdef HPI_A + rv = saHpiControlStateSet(sessionid, + resourceid, ctlnum,&ctlstate); +#else + rv = saHpiControlSet(sessionid, resourceid, + ctlnum, SAHPI_CTRL_MODE_MANUAL, + &ctlstate); +#endif + /* if (fdebug) */ + printf("saHpiControlStateSet[%d] rv = %d\n",ctlnum,rv); + } + } + else if (rdr.RdrTypeUnion.CtrlRec.Type == SAHPI_CTRL_TYPE_DIGITAL && + (rdr.RdrTypeUnion.CtrlRec.Oem & 0xf0) == SAHPI_OEM_DISK_LED && + rdr.RdrTypeUnion.CtrlRec.OutputType == SAHPI_CTRL_LED) { + /* this is a disk LED */ + b = (uchar)rdr.RdrTypeUnion.CtrlRec.Oem & 0x0f; + if ((b < NLEDS) && leds[b].fset) { + printf("Setting disk led %d to %d\n",b,leds[b].val); + if (leds[b].val == 0) + ctlstate.StateUnion.Digital = SAHPI_CTRL_STATE_OFF; + else + ctlstate.StateUnion.Digital = SAHPI_CTRL_STATE_ON; +#ifdef HPI_A + rv = saHpiControlStateSet(sessionid, + resourceid, ctlnum,&ctlstate); +#else + rv = saHpiControlSet(sessionid, resourceid, + ctlnum, SAHPI_CTRL_MODE_MANUAL, + &ctlstate); +#endif + printf("saHpiControlStateSet[%d] rv = %d\n",ctlnum,rv); + } + } +#ifndef HPI_A + else if (rdr.RdrTypeUnion.CtrlRec.Type == SAHPI_CTRL_TYPE_OEM && + rdr.RdrTypeUnion.CtrlRec.OutputType == SAHPI_CTRL_FRONT_PANEL_LOCKOUT) { + /* This is a raw control for alarm panel, + * but HPI never populates an RDR for this. */ + printf("Found raw alarm control\n"); + if (raw_val != 0) { + ctlstate.Type = SAHPI_CTRL_TYPE_OEM; + ctlstate.StateUnion.Oem.BodyLength = 1; + ctlstate.StateUnion.Oem.Body[0] = raw_val; + printf("Set raw alarm control to %x\n",raw_val); + rv = saHpiControlSet(sessionid, resourceid, ctlnum, + SAHPI_CTRL_MODE_MANUAL, &ctlstate); + printf("saHpiControlSet[%d] raw, rv = %d\n",ctlnum,rv); + } + } +#endif + rv = SA_OK; /* ignore errors & continue */ + } + j++; + entryid = nextentryid; + } + } /* RdrGet loop */ + rptentryid = nextrptentryid; + } + } /* RptEntryGet loop */ + + rv = saHpiSessionClose(sessionid); +#ifdef HPI_A + rv = saHpiFinalize(); +#endif + + exit(0); + return(0); +} + +/*-----------Sample output----------------------------------- +hpialarmpanel ver 0.6 +RptInfo: UpdateCount = 5, UpdateTime = 8a2dc6c0 +rptentry[0] resourceid=1 tag: Mullins +RDR[45]: ctltype=2:1 oem=0 Chassis Identify Control +RDR[48]: ctltype=0:1 oem=10 Front Panel Power Alarm LED state = off +RDR[51]: ctltype=0:1 oem=13 Front Panel Minor Alarm LED state = ON +RDR[46]: ctltype=0:0 oem=0 Cold Reset Control +RDR[49]: ctltype=0:1 oem=11 Front Panel Critical Alarm LED state = off +RDR[50]: ctltype=0:1 oem=12 Front Panel Major Alarm LED state = off + *-----------------------------------------------------------*/ +/* end hpialarmpanel.c */ diff --git a/hpiutil/hpievent.c b/hpiutil/hpievent.c new file mode 100644 index 0000000..56a5930 --- /dev/null +++ b/hpiutil/hpievent.c @@ -0,0 +1,621 @@ +/* + * hpievent.c + * + * Author: Bill Barkley + * Copyright (c) 2003 Intel Corporation. + * + * 05/14/03 + * 06/06/03 - complete working version + * 06/20/03 ARCress - added option for Mullins w default=Langley-type sensor + * added progver + * 02/26/04 ARCress - added general search for any Fan sensor. + * 03/17/04 ARCress - changed to Temp sensor (always has Lower Major) + * 03/30/04 ARCress - fixed rv with saHpiSensorThresholdsSet + * 01/03/05 ARCress - some edits for HPI_A/B + * 01/07/05 ARCress - clean compile for HPI B, but ThresholdGet returns -1006 + * 04/01/05 ARCress - set UpMajor if not fFan + */ +/*M* +Copyright (c) 2003, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + a.. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b.. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + c.. Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *M*/ + +#include +#include +#include +#include +#include +#include "SaHpi.h" + +char progname[] = "hpievent"; +char progver[] = "1.2"; +char s_name[] = "80mm Sys Fan (R)"; /*TSRLT2, default*/ +char sm_name[] = "Baseboard Fan 2"; /*TSRMT2, Mullins*/ +int fFan = 1; +char s_pattn[] = "Temp"; /* else use the first temperature SDR found */ +char *sensor_name; +int sensor_name_len = 0; +int fdebug = 0; +int fxdebug = 0; +int fsensor = 0; +int slist = 0; +int i,j,k = 0; +char inbuff[1024]; +char outbuff[256]; +SaHpiUint32T buffersize; +SaHpiUint32T actualsize; +SaHpiTextBufferT *strptr; +#ifdef HPI_A +SaHpiInventoryDataT *inv; +SaHpiInventGeneralDataT *dataptr; +SaHpiSensorEvtEnablesT enables1; +SaHpiSensorEvtEnablesT enables2; +#endif + +char *rdrtypes[5] = { + "None ", + "Control ", + "Sensor ", + "Invent ", + "Watchdog"}; + +#define HPI_NSEC_PER_SEC 1000000000LL +#define NSU 32 +char *units[NSU] = { + "units", "deg C", "deg F", "deg K", "volts", "amps", + "watts", "joules", "coulombs", "va", "nits", "lumen", + "lux", "candela", "kpa", "psi", "newton", "cfm", + "rpm", "Hz", "us", "ms", "sec", "min", + "hours", "days", "weeks", "mil", "in", "ft", + "mm", "cm" +}; + +#ifdef NOT +void +fixstr(SaHpiTextBufferT *strptr) +{ + size_t datalen; + outbuff[0] = 0; + if (strptr == NULL) return; + datalen = strptr->DataLength; + if (datalen != 0) { + strncpy ((char *)outbuff, (char *)strptr->Data, datalen); + outbuff[datalen] = 0; + } +} +#endif + +static void ShowThresh( + SaHpiSensorThresholdsT *sensbuff, SaHpiSensorThdMaskT ReadThold) +{ + printf( " Supported Thresholds:\n"); +#ifdef HPI_A + if (sensbuff->LowCritical.ValuesPresent & SAHPI_SRF_INTERPRETED) + printf( " Lower Critical Threshold: %5.2f\n", + sensbuff->LowCritical.Interpreted.Value.SensorFloat32); + if (sensbuff->LowMajor.ValuesPresent & SAHPI_SRF_INTERPRETED) + printf( " Lower Major Threshold: %5.2f\n", + sensbuff->LowMajor.Interpreted.Value.SensorFloat32); + if (sensbuff->LowMinor.ValuesPresent & SAHPI_SRF_INTERPRETED) + printf( " Lower Minor Threshold: %5.2f\n", + sensbuff->LowMinor.Interpreted.Value.SensorFloat32); + + if (sensbuff->UpCritical.ValuesPresent & SAHPI_SRF_INTERPRETED) + printf( " Upper Critical Threshold: %5.2f\n", + sensbuff->UpCritical.Interpreted.Value.SensorFloat32); + if (sensbuff->UpMajor.ValuesPresent & SAHPI_SRF_INTERPRETED) + printf( " Upper Major Threshold: %5.2f\n", + sensbuff->UpMajor.Interpreted.Value.SensorFloat32); + if (sensbuff->UpMinor.ValuesPresent & SAHPI_SRF_INTERPRETED) + printf( " Upper Minor Threshold: %5.2f\n", + sensbuff->UpMinor.Interpreted.Value.SensorFloat32); + + if (sensbuff->PosThdHysteresis.ValuesPresent & SAHPI_SRF_RAW) + printf( " Positive Threshold Hysteresis in RAW\n"); + if (sensbuff->PosThdHysteresis.ValuesPresent & SAHPI_SRF_INTERPRETED) + printf( " Positive Threshold Hysteresis: %5.2f\n", + sensbuff->PosThdHysteresis.Interpreted.Value.SensorFloat32); + if (sensbuff->NegThdHysteresis.ValuesPresent & SAHPI_SRF_RAW) + printf( " Negative Threshold Hysteresis in RAW\n"); + if (sensbuff->NegThdHysteresis.ValuesPresent & SAHPI_SRF_INTERPRETED) + printf( " Negative Threshold Hysteresis: %5.2f\n", + sensbuff->NegThdHysteresis.Interpreted.Value.SensorFloat32); +#else + if ( ReadThold & SAHPI_STM_LOW_CRIT ) { + printf( " Lower Critical Threshold: %5.2f\n", + sensbuff->LowCritical.Value.SensorFloat64); + } + if ( ReadThold & SAHPI_STM_LOW_MAJOR ) { + printf( " Lower Major Threshold: %5.2f\n", + sensbuff->LowMajor.Value.SensorFloat64); + } + if ( ReadThold & SAHPI_STM_LOW_MINOR ) { + printf( " Lower Minor Threshold: %5.2f\n", + sensbuff->LowMinor.Value.SensorFloat64); + } + + if ( ReadThold & SAHPI_STM_UP_CRIT ) { + printf( " Upper Critical Threshold: %5.2f\n", + sensbuff->UpCritical.Value.SensorFloat64); + } + if ( ReadThold & SAHPI_STM_UP_MAJOR ) { + printf( " Upper Major Threshold: %5.2f\n", + sensbuff->UpMajor.Value.SensorFloat64); + } + if ( ReadThold & SAHPI_STM_UP_MINOR ) { + printf( " Upper Minor Threshold: %5.2f\n", + sensbuff->UpMinor.Value.SensorFloat64); + } + + if ( ReadThold & SAHPI_STM_UP_HYSTERESIS ) { + printf( " Positive Threshold Hysteresis: %5.2f\n", + sensbuff->PosThdHysteresis.Value.SensorFloat64); + } + if ( ReadThold & SAHPI_STM_LOW_HYSTERESIS ) { + printf( " Negative Threshold Hysteresis: %5.2f\n", + sensbuff->NegThdHysteresis.Value.SensorFloat64); + } +#endif + printf( "\n"); +} + +static +SaErrorT DoEvent( + SaHpiSessionIdT sessionid, + SaHpiResourceIdT resourceid, + SaHpiSensorRecT *sensorrec ) +{ + SaHpiSensorNumT sensornum; + SaHpiSensorReadingT reading; + SaHpiSensorThresholdsT senstbuff1; + SaHpiSensorThresholdsT senstbuff2; + SaErrorT rv, rv2; +#ifdef HPI_A + SaHpiSensorReadingT conv_reading; +#else + SaHpiEventStateT evtstate; +#endif + + SaHpiTimeoutT timeout = (SaHpiInt64T)(12 * HPI_NSEC_PER_SEC); /* 12 seconds*/ + SaHpiEventT event; + SaHpiRptEntryT rptentry; + SaHpiRdrT rdr; + char *unit; + int eventflag = 0; + int i; + + sensornum = sensorrec->Num; + +/* Get current sensor reading */ +#ifdef HPI_A + rv = saHpiSensorReadingGet( sessionid, resourceid, sensornum, &reading); +#else + rv = saHpiSensorReadingGet(sessionid,resourceid, sensornum, &reading,&evtstate); +#endif + if (rv != SA_OK) { + printf( "saHpiSensorReadingGet error %d\n",rv); +/* printf("ReadingGet ret=%d\n", rv); */ + return(rv); + } + +#ifdef HPI_A + /* HPI A has both interpreted and raw. HPI B has only interpreted. */ + if ((reading.ValuesPresent & SAHPI_SRF_INTERPRETED) == 0 && + (reading.ValuesPresent & SAHPI_SRF_RAW)) { + /* only try convert if intrepreted not available. */ + rv = saHpiSensorReadingConvert(sessionid, resourceid, sensornum, + &reading, &conv_reading); + if (rv != SA_OK) { + printf("raw=%x conv_ret=%d\n", reading.Raw, rv); + /* printf("conv_rv=%s\n", decode_error(rv)); */ + return(rv); + } else { + reading.Interpreted.Type = conv_reading.Interpreted.Type; + reading.Interpreted.Value.SensorUint32 = + conv_reading.Interpreted.Value.SensorUint32; + } + } +#endif + + /* Determine units of interpreted reading */ + i = sensorrec->DataFormat.BaseUnits; + if (i > NSU) i = 0; + unit = units[i]; + /* We know that reading.Type is float for the chosen sensor. */ +#ifdef HPI_A + printf(" = %05.2f %s \n", + reading.Interpreted.Value.SensorFloat32, unit); +#else + printf(" = %05.2f %s \n", reading.Value.SensorFloat64, unit); +#endif + +/* Retrieve current threshold setings, twice */ +/* once for backup and once for modification */ + + /* Get backup copy */ + rv = saHpiSensorThresholdsGet( + sessionid, resourceid, sensornum, &senstbuff1); + if (rv != SA_OK) { + printf( "saHpiSensorThresholdsGet error %d\n",rv); return(rv); } + /* OpenHPI 2.0.0 ipmi plugin returns -1006 timeout here, why ???? */ + + /* Get modification copy */ + rv = saHpiSensorThresholdsGet( + sessionid, resourceid, sensornum, &senstbuff2); + if (rv != SA_OK) { + printf( "saHpiSensorThresholdsGet error %d\n",rv); return(rv); } + + /* Display current thresholds */ + if (rv == SA_OK) { + printf( " Current\n"); + ShowThresh( &senstbuff2, sensorrec->ThresholdDefn.ReadThold); + } + +/* Set new threshold to current reading + 10% */ +#ifdef HPI_A + if (fFan) { + senstbuff2.LowMajor.Interpreted.Value.SensorFloat32 = + reading.Interpreted.Value.SensorFloat32 * (SaHpiFloat32T)1.10; + } else { + senstbuff2.UpMinor.Interpreted.Value.SensorFloat32 = + reading.Interpreted.Value.SensorFloat32 * (SaHpiFloat32T)0.90; + senstbuff2.UpMajor.Interpreted.Value.SensorFloat32 = + reading.Interpreted.Value.SensorFloat32 * (SaHpiFloat32T)0.05; + } + if (fdebug) { + printf( "ValuesPresent = %x\n", senstbuff2.LowMajor.ValuesPresent); + printf( "Values Mask = %x\n", (SAHPI_SRF_RAW)); + } + senstbuff2.LowMajor.ValuesPresent = + senstbuff2.LowMajor.ValuesPresent ^ (SAHPI_SRF_RAW); + if (fdebug) + printf( "ValuesPresent = %x\n", senstbuff2.LowMajor.ValuesPresent); +#else + /* If fan type, set LowMajor, if temp type, set HighMinor. */ + if (fFan) { + senstbuff2.LowMajor.Value.SensorFloat64 = + reading.Value.SensorFloat64 * (SaHpiFloat64T)1.10; + } else { /* usually Temperature sensor */ + senstbuff2.UpMinor.Value.SensorFloat64 = + reading.Value.SensorFloat64 * (SaHpiFloat64T)0.90; + senstbuff2.UpMajor.Value.SensorFloat64 = + reading.Value.SensorFloat64 * (SaHpiFloat64T)0.95; + } +#endif + + /* Display new current thresholds */ + if (rv == SA_OK) { + printf( " New\n"); + ShowThresh( &senstbuff2, sensorrec->ThresholdDefn.ReadThold); + } + +#ifdef HPI_A + /* See what Events are Enabled */ + rv = saHpiSensorEventEnablesGet( + sessionid, resourceid, sensornum, &enables1); + if (rv != SA_OK) { + printf( "saHpiSensorEventEnablesGet error %d\n",rv); return(rv); } + + printf( "Sensor Event Enables: \n"); + printf( " Sensor Status = %x\n", enables1.SensorStatus); + printf( " Assert Events = %x\n", enables1.AssertEvents); + printf( " Deassert Events = %x\n", enables1.DeassertEvents); +#endif + +/* + enables1.AssertEvents = 0x0400; + enables1.DeassertEvents = 0x0400; + rv = saHpiSensorEventEnablesSet( + sessionid, resourceid, sensornum, &enables1); + if (rv != SA_OK) return(rv); +*/ + + +/************************ + Temporary exit */ +/* + return(rv); +*/ + +/* Subscribe to New Events, only */ +printf( "Subscribe to events\n"); +#ifdef HPI_A + rv = saHpiSubscribe( sessionid, (SaHpiBoolT)0 ); +#else + rv = saHpiSubscribe( sessionid ); +#endif + if (rv != SA_OK) { + printf( "saHpiSubscribe error %d\n",rv); return(rv); } + +/* Set new thresholds */ +printf( "Set new thresholds\n"); + + rv = saHpiSensorThresholdsSet( + sessionid, resourceid, sensornum, &senstbuff2); + if (rv != SA_OK) { + printf( "saHpiSensorThresholdsSet error %d\n",rv); + /* rv2 = saHpiUnsubscribe( sessionid ); + if (fxdebug) printf("saHpiUnsubscribe, rv = %d\n",rv2); + return(rv); */ + } + +/* Go wait on event to occur */ +printf( "Go and get the event\n"); + eventflag = 0; + while ( eventflag == 0) { +#ifdef HPI_A + rv = saHpiEventGet( sessionid, timeout, &event, &rdr, &rptentry ); +#else + timeout = SAHPI_TIMEOUT_BLOCK; + timeout = SAHPI_TIMEOUT_IMMEDIATE; /* use this if not threaded */ + rv = saHpiEventGet( sessionid, timeout, &event, &rdr, &rptentry, NULL); +#endif + if (rv != SA_OK) { + if (rv == SA_ERR_HPI_TIMEOUT) { + printf( "Time expired during EventGet - Test FAILED\n"); + /* Reset to the original thresholds */ + printf( "Reset thresholds\n"); + rv = saHpiSensorThresholdsSet( + sessionid, resourceid, sensornum, &senstbuff1); + if (rv != SA_OK) return(rv); + + /* Re-read threshold values */ + rv = saHpiSensorThresholdsGet( + sessionid, resourceid, sensornum, &senstbuff2); + if (rv != SA_OK) return(rv); + return(rv); + } else { + printf( "Error %d during EventGet - Test FAILED\n",rv); + return(rv); + } + } + +/* Decode the event information */ +printf( "Decode event info\n"); + if (event.EventType == SAHPI_ET_SENSOR) { + printf( "Sensor # = %2d Severity = %2x\n", + event.EventDataUnion.SensorEvent.SensorNum, event.Severity ); + if (event.EventDataUnion.SensorEvent.SensorNum == sensornum) { + eventflag = 1; + printf( "Got it - Test PASSED\n"); + } + } + } +/* Reset to the original thresholds */ +printf( "Reset thresholds\n"); + rv = saHpiSensorThresholdsSet( + sessionid, resourceid, sensornum, &senstbuff1); + if (rv != SA_OK) { + printf( "saHpiSensorThresholdsSet error %d\n",rv); + rv2 = saHpiUnsubscribe( sessionid ); + if (fxdebug) printf("saHpiUnsubscribe, rv = %d\n",rv2); + return(rv); + } else { + /* Re-read threshold values */ + rv = saHpiSensorThresholdsGet( sessionid, resourceid, sensornum, + &senstbuff2); + if (rv != SA_OK) { + printf( "saHpiSensorThresholdsGet error %d\n",rv); + } else { /* rv == SA_OK */ + /* Display reset thresholds */ + printf( " Reset\n"); + ShowThresh( &senstbuff2, sensorrec->ThresholdDefn.ReadThold); + } + } /*end-else SA_OK*/ + +/* Unsubscribe to future events */ +printf( "Unsubscribe\n"); + rv2 = saHpiUnsubscribe( sessionid ); + if (fxdebug) printf("saHpiUnsubscribe, rv = %d\n",rv2); + + return(rv); +} /*end DoEvent*/ + +/* + * findmatch + * returns offset of the match if found, or -1 if not found. + */ +static int +findmatch(char *buffer, int sbuf, char *pattern, int spattern, char figncase) +{ + int c, j, imatch; + j = 0; + imatch = 0; + for (j = 0; j < sbuf; j++) { + if (sbuf - j < spattern && imatch == 0) return (-1); + c = buffer[j]; + if (c == pattern[imatch]) { + imatch++; + if (imatch == spattern) return (++j - imatch); + } else if (pattern[imatch] == '?') { /*wildcard char*/ + imatch++; + if (imatch == spattern) return (++j - imatch); + } else if (figncase == 1) { + if ((c & 0x5f) == (pattern[imatch] & 0x5f)) { + imatch++; + if (imatch == spattern) return (++j - imatch); + } else + imatch = 0; + } else + imatch = 0; + } + return (-1); +} /*end findmatch */ + +int +main(int argc, char **argv) +{ + int c; +#ifdef HPI_A + SaHpiVersionT hpiVer; + SaHpiRptInfoT rptinfo; +#endif + SaHpiSessionIdT sessionid; + SaHpiRptEntryT rptentry; + SaHpiEntryIdT rptentryid; + SaHpiEntryIdT nextrptentryid; + SaHpiEntryIdT entryid; + SaHpiEntryIdT nextentryid; + SaHpiResourceIdT resourceid; + SaHpiRdrT rdr; + int firstpass = 1; + SaErrorT rv; + + printf("%s ver %s\n", progname,progver); + sensor_name = (char *)strdup(s_name); + while ( (c = getopt( argc, argv,"ms:xz?")) != EOF ) + switch(c) + { + case 'z': fxdebug = 1; /* fall thru to include next setting */ + case 'x': fdebug = 1; break; + case 'm': + sensor_name = (char *)strdup(sm_name); + fFan = 0; /*assume not a Fan */ + break; + case 's': + fsensor = 1; + if (optarg) { + sensor_name = (char *)strdup(optarg); + } + break; + default: + printf("Usage: %s [-xm] [-s sensor_descriptor]\n", progname); + printf(" -s Sensor descriptor\n"); + printf(" -m use Mullins sensor descriptor\n"); + printf(" -x Display debug messages\n"); + printf(" -z Display extra debug messages\n"); + exit(1); + } +#ifdef HPI_A + inv = (SaHpiInventoryDataT *)&inbuff[0]; + + rv = saHpiInitialize(&hpiVer); + + if (rv != SA_OK) { + printf("saHpiInitialize error %d\n",rv); + exit(-1); + } + rv = saHpiSessionOpen(SAHPI_DEFAULT_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + printf("saHpiSessionOpen error %d\n",rv); + exit(-1); + } + + if (fdebug) printf("Starting Discovery ...\n"); + rv = saHpiResourcesDiscover(sessionid); + if (fdebug) printf("saHpiResourcesDiscover rv = %d\n",rv); + + rv = saHpiRptInfoGet(sessionid,&rptinfo); + if (fxdebug) printf("saHpiRptInfoGet rv = %d\n",rv); + if (fdebug) printf("RptInfo: UpdateCount = %x, UpdateTime = %lx\n", + rptinfo.UpdateCount, (unsigned long)rptinfo.UpdateTimestamp); + +#else + rv = saHpiSessionOpen(SAHPI_UNSPECIFIED_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + printf("saHpiSessionOpen error %d\n",rv); + exit(-1); + } + if (fdebug) printf("Starting Discovery ...\n"); + rv = saHpiDiscover(sessionid); + if (fdebug) printf("saHpiResourcesDiscover rv = %d\n",rv); + + // rv = saHpiDomainInfoGet(sessionid,&rptinfo); + { + /* + * If OpenHPI, we need to wait extra time before doing + * ThresholdsGet because its discovery isn't really done. + */ + sleep(5); + } +#endif + + /* walk the RPT list */ + rptentryid = SAHPI_FIRST_ENTRY; + while ((rv == SA_OK) && (rptentryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRptEntryGet(sessionid,rptentryid,&nextrptentryid,&rptentry); + if (rv == SA_OK) + { + /* walk the RDR list for this RPT entry */ + entryid = SAHPI_FIRST_ENTRY; +#ifdef HPI_A + rptentry.ResourceTag.Data[rptentry.ResourceTag.DataLength] = 0; +#endif + resourceid = rptentry.ResourceId; + + if (fdebug) printf("rptentry[%d] resourceid=%d\n", entryid,resourceid); + + printf("Resource Tag: %s\n", rptentry.ResourceTag.Data); + while ((rv == SA_OK) && (entryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRdrGet(sessionid,resourceid, entryid,&nextentryid, &rdr); + + if (fxdebug) printf("saHpiRdrGet[%d] rv = %d\n",entryid,rv); + + if (rv == SA_OK) + { + if (rdr.RdrType == SAHPI_SENSOR_RDR) + { + /*type 2 includes sensor and control records*/ + rdr.IdString.Data[rdr.IdString.DataLength] = 0; +#ifdef OLD + if (strncmp(rdr.IdString.Data, sensor_name, + rdr.IdString.DataLength) == 0) +#else + if (findmatch(rdr.IdString.Data,rdr.IdString.DataLength, + sensor_name, strlen(sensor_name),0) >= 0) +#endif + { + printf( "%02d %s\t", rdr.RecordId, rdr.IdString.Data); + rv = DoEvent( sessionid, resourceid, &rdr.RdrTypeUnion.SensorRec); + if (rv != SA_OK) + printf( "Returned Error from DoEvent: rv=%d\n", rv); + break; /* done with rdr loop */ + } + } + if (rv != SA_OK) + printf( "Returned HPI Error: rv=%d\n", rv); + entryid = nextentryid; + } + if (firstpass && entryid == SAHPI_LAST_ENTRY) { + /* Not found yet, so try again, looking for any Temp */ + sensor_name = s_pattn; + entryid = SAHPI_FIRST_ENTRY; + firstpass = 0; + fFan = 0; /*Temp not Fan*/ + } + } /*while rdr loop */ + rptentryid = nextrptentryid; + } + } /*while rpt loop*/ + rv = saHpiSessionClose(sessionid); +#ifdef HPI_A + rv = saHpiFinalize(); +#endif + exit(0); +} + /* end hpievent.c */ diff --git a/hpiutil/hpifru.c b/hpiutil/hpifru.c new file mode 100644 index 0000000..c18a5e2 --- /dev/null +++ b/hpiutil/hpifru.c @@ -0,0 +1,19 @@ +/* + * hpifru.c + * + * Author: Bill Barkley & Andy Cress + * Copyright (c) 2003-2004 Intel Corporation. + * + * 04/18/03 + * 06/09/03 - new CustomField parsing, including SystemGUID + * 02/19/04 ARCress - generalized BMC tag parsing, created IsTagBmc() + * 05/05/04 ARCress - added OpenHPI Mgt Ctlr tag to IsTagBmc() + * 09/22/04 ARCress - invbuf size bigger, check null ptr in fixstr + * 10/14/04 ARCress - added HPI_B logic, incomplete + */ +#ifdef HPI_A +#include "hpifrua.c" +#else +#include "hpifrub.c" +#endif +/* end hpifru.c */ diff --git a/hpiutil/hpifrua.c b/hpiutil/hpifrua.c new file mode 100644 index 0000000..ae41a7d --- /dev/null +++ b/hpiutil/hpifrua.c @@ -0,0 +1,550 @@ +/* + * hpifrua.c (hpifru.c for HPI_A) + * + * Author: Bill Barkley & Andy Cress + * Copyright (c) 2003-2005 Intel Corporation. + * + * 04/18/03 + * 06/09/03 - new CustomField parsing, including SystemGUID + * 02/19/04 ARCress - generalized BMC tag parsing, created IsTagBmc() + * 05/05/04 ARCress - added OpenHPI Mgt Ctlr tag to IsTagBmc() + * 09/22/04 ARCress - inbuff size bigger, check null ptr in fixstr + * 01/11/05 ARCress - skip INVENTORY RDRs that return errors + * 03/16/05 ARCress - make sure asset tag is BMC for writes + */ +/*M* +Copyright (c) 2003-2005, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + a.. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b.. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + c.. Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *M*/ + +#include +#include +#include +#include +#include +#include "SaHpi.h" + +#define NCT 25 + +char progver[] = "1.4 HPI-A"; +char progname[] = "hpifru"; +char *chasstypes[NCT] = { + "Not Defined", "Other", "Unknown", "Desktop", "Low Profile Desktop", + "Pizza Box", "Mini Tower", "Tower", "Portable", "Laptop", + "Notebook", "Handheld", "Docking Station", "All in One", "Subnotebook", + "Space Saving", "Lunch Box", "Main Server", "Expansion", "SubChassis", + "Buss Expansion Chassis", "Peripheral Chassis", "RAID Chassis", + "Rack-Mount Chassis", "New" +}; +int fasset = 0; +int fdebug = 0; +int fxdebug = 0; +int i,j,k = 0; +SaHpiUint32T buffersize; +SaHpiUint32T actualsize; +char *asset_tag; +char inbuff[2048]; +char outbuff[1024]; +SaHpiInventoryDataT *inv; +SaHpiInventChassisTypeT chasstype; +SaHpiInventGeneralDataT *dataptr; +SaHpiTextBufferT *strptr; + +#ifdef ANYINVENT +static int +IsTagBmc(char *dstr, int dlen) +{ + /* if OpenHPI, always return TRUE for any Inventory RDR */ + return(1); +} +#else +char bmctag[] = "Basbrd Mgmt Ctlr"; /* see IsTagBmc() */ +char bmctag2[] = "Management Controller"; /* see IsTagBmc() */ +/* + * findmatch + * returns offset of the match if found, or -1 if not found. + */ +static int +findmatch(char *buffer, int sbuf, char *pattern, int spattern, char figncase) +{ + int c, j, imatch; + j = 0; + imatch = 0; + for (j = 0; j < sbuf; j++) { + if (sbuf - j < spattern && imatch == 0) return (-1); + c = buffer[j]; + if (c == pattern[imatch]) { + imatch++; + if (imatch == spattern) return (++j - imatch); + } else if (pattern[imatch] == '?') { /*wildcard char*/ + imatch++; + if (imatch == spattern) return (++j - imatch); + } else if (figncase == 1) { + if ((c & 0x5f) == (pattern[imatch] & 0x5f)) { + imatch++; + if (imatch == spattern) return (++j - imatch); + } else + imatch = 0; + } else + imatch = 0; + } + return (-1); +} /*end findmatch */ + +static int +IsTagBmc(char *dstr, int dlen) +{ + int ret = 0; + if (strncmp(dstr, bmctag, sizeof(bmctag)) == 0) /* Sahalee */ + ret = 1; + else if (findmatch(dstr,dlen,"BMC",3,1) >= 0) /* mBMC or other */ + ret = 1; + else if (findmatch(dstr,dlen,bmctag2,sizeof(bmctag2),1) >= 0) + ret = 1; /* BMC tag for OpenHPI with ipmi plugin */ + return(ret); +} +#endif + +static void +fixstr(SaHpiTextBufferT *strptr) +{ + size_t datalen; + + outbuff[0] = 0; + if (strptr == NULL) return; + datalen = strptr->DataLength; + if (datalen > sizeof(outbuff)) datalen = sizeof(outbuff) - 1; + if (datalen != 0) { + strncpy ((char *)outbuff, (char *)strptr->Data, datalen); + outbuff[datalen] = 0; + if (fdebug) { + printf("TextBuffer: %s, len=%d, dtype=%x lang=%d\n", + outbuff, strptr->DataLength, + strptr->DataType, strptr->Language); + } + } +} + +static void +prtchassinfo(void) +{ + chasstype = (SaHpiInventChassisTypeT)inv->DataRecords[i]->RecordData.ChassisInfo.Type; + for (k=0; kDataRecords[i]->RecordData.ChassisInfo.GeneralData; + strptr=dataptr->Manufacturer; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Chassis Manufacturer: %s\n", outbuff); + + strptr=dataptr->ProductName; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Chassis Name : %s\n", outbuff); + + strptr=dataptr->ProductVersion; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Chassis Version : %s\n", outbuff); + + strptr=dataptr->ModelNumber; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Chassis Model Number: %s\n", outbuff); + + strptr=dataptr->SerialNumber; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Chassis Serial # : %s\n", outbuff); + + strptr=dataptr->PartNumber; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Chassis Part Number : %s\n", outbuff); + + strptr=dataptr->FileId; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Chassis FRU File ID : %s\n", outbuff); + + strptr=dataptr->AssetTag; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Chassis Asset Tag : %s\n", outbuff); + if (dataptr->CustomField[0] != 0) + { + if (dataptr->CustomField[0]->DataLength != 0) + strncpy ((char *)outbuff, (char *)dataptr->CustomField[0]->Data, + dataptr->CustomField[0]->DataLength); + outbuff[dataptr->CustomField[0]->DataLength] = 0; + printf( "Chassis OEM Field : %s\n", outbuff); + } +} + +static void +prtprodtinfo(void) +{ + int j; + dataptr = (SaHpiInventGeneralDataT *)&inv->DataRecords[i]->RecordData.ProductInfo; + strptr=dataptr->Manufacturer; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Product Manufacturer: %s\n", outbuff); + + strptr=dataptr->ProductName; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Product Name : %s\n", outbuff); + + strptr=dataptr->ProductVersion; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Product Version : %s\n", outbuff); + + strptr=dataptr->ModelNumber; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Product Model Number: %s\n", outbuff); + + strptr=dataptr->SerialNumber; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Product Serial # : %s\n", outbuff); + + strptr=dataptr->PartNumber; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Product Part Number : %s\n", outbuff); + + strptr=dataptr->FileId; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Product FRU File ID : %s\n", outbuff); + + strptr=dataptr->AssetTag; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Product Asset Tag : %s\n", outbuff); + + for (j = 0; j < 10; j++) { + int ii; + if (dataptr->CustomField[j] != NULL) { + if ((dataptr->CustomField[j]->DataType == 0) && + (dataptr->CustomField[j]->DataLength == 16)) { /*binary GUID*/ + printf( "IPMI SystemGUID : "); + for (ii=0; ii< dataptr->CustomField[j]->DataLength; ii++) + printf("%02x", dataptr->CustomField[j]->Data[ii]); + printf("\n"); + } else { /* other text field */ + dataptr->CustomField[j]->Data[ + dataptr->CustomField[j]->DataLength] = 0; + if (fdebug) { + printf("TextBuffer: %s, len=%d, dtype=%x lang=%d\n", + dataptr->CustomField[j]->Data, + dataptr->CustomField[j]->DataLength, + dataptr->CustomField[j]->DataType, + dataptr->CustomField[j]->Language); + } + printf( "Product OEM Field : %s\n", + dataptr->CustomField[j]->Data); + } + } else /* NULL pointer */ + break; + } /*end for*/ +} + +static void +prtboardinfo(void) +{ + dataptr = (SaHpiInventGeneralDataT *)&inv->DataRecords[i]->RecordData.BoardInfo; + strptr=dataptr->Manufacturer; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Board Manufacturer : %s\n", outbuff); + + strptr=dataptr->ProductName; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Board Product Name : %s\n", outbuff); + + strptr=dataptr->ModelNumber; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Board Model Number : %s\n", outbuff); + + strptr=dataptr->PartNumber; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Board Part Number : %s\n", outbuff); + + strptr=dataptr->ProductVersion; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Board Version : %s\n", outbuff); + + strptr=dataptr->SerialNumber; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Board Serial # : %s\n", outbuff); + + strptr=dataptr->FileId; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Board FRU File ID : %s\n", outbuff); + + strptr=dataptr->AssetTag; + fixstr((SaHpiTextBufferT *)strptr); + printf( "Board Asset Tag : %s\n", outbuff); + + if (dataptr->CustomField[0] != 0) + { + if (dataptr->CustomField[0]->DataLength != 0) + strncpy ((char *)outbuff, (char *)dataptr->CustomField[0]->Data, + dataptr->CustomField[0]->DataLength); + outbuff[dataptr->CustomField[0]->DataLength] = 0; + printf( "Board OEM Field : %s\n", outbuff); + } +} + +int +main(int argc, char **argv) +{ + int prodrecindx=0; + int asset_len=0; + int c; + SaErrorT rv; + SaHpiVersionT hpiVer; + SaHpiSessionIdT sessionid; + SaHpiRptInfoT rptinfo; + SaHpiRptEntryT rptentry; + SaHpiEntryIdT rptentryid; + SaHpiEntryIdT nextrptentryid; + SaHpiEntryIdT entryid; + SaHpiEntryIdT nextentryid; + SaHpiResourceIdT resourceid; + SaHpiRdrT rdr; + SaHpiEirIdT eirid; + + printf("%s ver %s\n",progname,progver); + + while ( (c = getopt( argc, argv,"a:xz?")) != EOF ) + switch(c) { + case 'z': fxdebug = 1; /* fall thru to include next setting */ + case 'x': fdebug = 1; break; + case 'a': + fasset = 1; + if (optarg) + { + asset_tag = (char *)strdup(optarg); + asset_len = strlen(optarg); + } + /* + printf( "String Length = %d\n", asset_len); + printf( "String Length = %d\n", strlen(optarg)); + */ + break; + default: + printf("Usage: %s [-x] [-a asset_tag]\n", progname); + printf(" -a Sets the asset tag\n"); + printf(" -x Display debug messages\n"); + printf(" -z Display extra debug messages\n"); + exit(1); + } + inv = (SaHpiInventoryDataT *)&inbuff[0]; + rv = saHpiInitialize(&hpiVer); + if (rv != SA_OK) { + printf("saHpiInitialize error %d\n",rv); + exit(-1); + } + rv = saHpiSessionOpen(SAHPI_DEFAULT_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + printf("saHpiSessionOpen error %d\n",rv); + exit(-1); + } + + rv = saHpiResourcesDiscover(sessionid); + if (fxdebug) printf("saHpiResourcesDiscover rv = %d\n",rv); + rv = saHpiRptInfoGet(sessionid,&rptinfo); + if (fxdebug) printf("saHpiRptInfoGet rv = %d\n",rv); + if (fdebug) printf("RptInfo: UpdateCount = %x, UpdateTime = %lx\n", + rptinfo.UpdateCount, (unsigned long)rptinfo.UpdateTimestamp); + + /* walk the RPT list */ + rptentryid = SAHPI_FIRST_ENTRY; + while ((rv == SA_OK) && (rptentryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRptEntryGet(sessionid,rptentryid,&nextrptentryid,&rptentry); + if (rv != SA_OK) printf("RptEntryGet: rv = %d\n",rv); + if (rv == SA_OK) + { + /* walk the RDR list for this RPT entry */ + entryid = SAHPI_FIRST_ENTRY; + /* OpenHPI sometimes has bad RPT DataLength here. */ + rptentry.ResourceTag.Data[rptentry.ResourceTag.DataLength] = 0; + resourceid = rptentry.ResourceId; + printf("Resource Tag: %s\n", rptentry.ResourceTag.Data); + if (fdebug) printf("rptentry[%d] resourceid=%d\n", rptentryid,resourceid); + while ((rv == SA_OK) && (entryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRdrGet(sessionid,resourceid, entryid,&nextentryid, &rdr); + if (fxdebug) printf("saHpiRdrGet[%d] rv = %d\n",entryid,rv); + if (rv == SA_OK) + { + if (rdr.RdrType == SAHPI_INVENTORY_RDR) + { + /*type 3 includes inventory records*/ + eirid = rdr.RdrTypeUnion.InventoryRec.EirId; + rdr.IdString.Data[rdr.IdString.DataLength] = 0; + if (fdebug) printf( "RDR[%d]: Inventory, type=%d num=%d %s\n", + rdr.RecordId, rdr.RdrType, eirid, rdr.IdString.Data); + else printf("RDR[%d]: %s \n",rdr.RecordId,rdr.IdString.Data); + + buffersize = sizeof(inbuff); + if (fdebug) printf("BufferSize=%d InvenDataRecSize=%d\n", + buffersize, sizeof(inbuff)); + /* Always get inventory data, not just for BMC */ + /* if ( IsTagBmc(rdr.IdString.Data, rdr.IdString.DataLength) ) */ + { + memset(inv,0,buffersize); + if (fdebug) printf("InventoryDataRead (%d, %d, %d, %d, %p, %d)\n", + sessionid, resourceid, eirid, buffersize, inv, + actualsize); + + rv = saHpiEntityInventoryDataRead( sessionid, resourceid, + eirid, buffersize, inv, &actualsize); + if (fdebug) { + printf("saHpiEntityInventoryDataRead[%d] rv = %d\n",eirid,rv); + printf("buffersize = %d, ActualSize=%d\n", + buffersize,actualsize); + } + if (rv == SA_OK || rv == -2000) // (0 - buffersize)) + { + /* Walk thru the list of inventory data */ + for (i=0; inv->DataRecords[i] != NULL; i++) + { + if (fdebug) printf( "Record index=%d type=%x len=%d\n", + i, inv->DataRecords[i]->RecordType, + inv->DataRecords[i]->DataLength); + if (inv->Validity == SAHPI_INVENT_DATA_VALID) + { + switch (inv->DataRecords[i]->RecordType) + { + case SAHPI_INVENT_RECTYPE_INTERNAL_USE: + if (fdebug) printf( "Internal Use\n"); + break; + case SAHPI_INVENT_RECTYPE_PRODUCT_INFO: + if (fdebug) printf( "Product Info\n"); + prodrecindx = i; + prtprodtinfo(); + break; + case SAHPI_INVENT_RECTYPE_CHASSIS_INFO: + if (fdebug) printf( "Chassis Info\n"); + prtchassinfo(); + break; + case SAHPI_INVENT_RECTYPE_BOARD_INFO: + if (fdebug) printf( "Board Info\n"); + prtboardinfo(); + break; + case SAHPI_INVENT_RECTYPE_OEM: + if (fdebug) printf( "OEM Record\n"); + break; + default: + printf(" Invalid Invent Rec Type =%x\n", + inv->DataRecords[i]->RecordType); + break; + } + } + } + /* Cannot guarantee writable unless it is the BMC. */ + if (IsTagBmc(rdr.IdString.Data,rdr.IdString.DataLength) + && (fasset == 1)) + { /* handle asset tag */ + SaHpiTextBufferT aTag; + if (fdebug) printf( "Inventory = %s\n", rdr.IdString.Data); + /* prodrecindx contains index for Prod Rec Type */ + dataptr = (SaHpiInventGeneralDataT *) + &inv->DataRecords[prodrecindx]->RecordData.ProductInfo; + dataptr->AssetTag = &aTag; + strptr=dataptr->AssetTag; + strptr->DataType = SAHPI_TL_TYPE_LANGUAGE; + strptr->Language = SAHPI_LANG_ENGLISH; + strptr->DataLength = (SaHpiUint8T)asset_len; + strncpy( (char *)strptr->Data, (char *)asset_tag,asset_len); + strptr->Data[asset_len] = 0; + + printf( "Writing new asset tag: %s\n",(char *)strptr->Data); + rv = saHpiEntityInventoryDataWrite( sessionid, + resourceid, eirid, inv); + printf("Return Write Status = %d\n", rv); + + if (rv == SA_OK) + { + printf ("Good write - re-reading!\n"); + rv = saHpiEntityInventoryDataRead( sessionid, resourceid, + eirid, buffersize, inv, &actualsize); + if (fxdebug) printf( + "saHpiEntityInventoryDataRead[%d] rv = %d\n", eirid, rv); + if (fdebug) printf("ActualSize=%d\n", actualsize); + if (rv == SA_OK) + { + /* Walk thru the list of inventory data */ + for (i=0; inv->DataRecords[i] != NULL; i++) + { + if (inv->Validity == SAHPI_INVENT_DATA_VALID) + { + if (fdebug) printf( "Index = %d type=%x len=%d\n", + i, inv->DataRecords[i]->RecordType, + inv->DataRecords[i]->DataLength); + switch (inv->DataRecords[i]->RecordType) + { + case SAHPI_INVENT_RECTYPE_INTERNAL_USE: + if (fdebug) printf( "Internal Use\n"); + break; + case SAHPI_INVENT_RECTYPE_PRODUCT_INFO: + if (fdebug) printf( "Product Info\n"); + prtprodtinfo(); + break; + case SAHPI_INVENT_RECTYPE_CHASSIS_INFO: + if (fdebug) printf( "Chassis Info\n"); + prtchassinfo(); + break; + case SAHPI_INVENT_RECTYPE_BOARD_INFO: + if (fdebug) printf( "Board Info\n"); + prtboardinfo(); + break; + case SAHPI_INVENT_RECTYPE_OEM: + if (fdebug) printf( "OEM Record\n"); + break; + default: + printf(" Invalid Invent Rec Type =%x\n", + inv->DataRecords[i]->RecordType); + break; + } + } + } + } /*re-walk the inventory record list */ + } /* Good write - re-read */ + } /* check asset tag flag */ + } else { + /* It is an Inventory RDR, but gets error reading FRU. */ + if (fdebug) printf("\tinventory read error, rv=%d\n", rv); + rv = 0; /* keep trying another RDR */ + entryid = nextentryid; + continue; + } + } + } /* Inventory Data Records - Type 3 */ + entryid = nextentryid; + } + } + rptentryid = nextrptentryid; + } + } + rv = saHpiSessionClose(sessionid); + rv = saHpiFinalize(); + exit(0); +} + /* end hpifru.c */ diff --git a/hpiutil/hpifrub.c b/hpiutil/hpifrub.c new file mode 100644 index 0000000..822127c --- /dev/null +++ b/hpiutil/hpifrub.c @@ -0,0 +1,619 @@ +/* -*- linux-c -*- + * + * hpiinv.c + * + * Copyright (c) 2003-2005 by Intel Corp. + * (C) Copyright IBM Corp. 2004 + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This + * file and program are licensed under a BSD style license. See + * the Copying file included with the OpenHPI distribution for + * full licensing terms. + * + * Authors: + * Andy Cress + * Peter D. Phan + * Renier Morales + * Tariq Shureih + * Racing Guo + * + * Log: + * 6/29/04 Copied from hpifru.c and modified for general use + * 11/30/04 ver 0.2 for openhpi-2.0.0 + * 2/09/05 ARCress re-merged with hpifru.c, adding IdrFieldSet, + * generalized for other HPI libraris also. + */ +// #define OPENHPI_USED 1 + +#include +#include +#include +#include +#include +#include +#ifdef OPENHPI_USED +#include +#endif + +#define NCT 25 +#define MAX_STRSIZE 64 + +char progver[] = "1.5 HPI-B"; +char progname[] = "hpiinv"; +char *chasstypes[NCT] = { + "Not Defined", "Other", "Unknown", "Desktop", "Low Profile Desktop", + "Pizza Box", "Mini Tower", "Tower", "Portable", "Laptop", + "Notebook", "Handheld", "Docking Station", "All in One", "Subnotebook", + "Space Saving", "Lunch Box", "Main Server", "Expansion", "SubChassis", + "Buss Expansion Chassis", "Peripheral Chassis", "RAID Chassis", + "Rack-Mount Chassis", "New" +}; +int fasset = 0; +int fverbose = 0; +int foundasset = 0; +int fdebug = 0; +int fzdebug = 0; +int i,j,k = 0; +SaHpiUint32T buffersize; +SaHpiUint32T actualsize; +char inbuff[2048]; +char outbuff[1024]; +SaHpiIdrAreaHeaderT *inv; +SaHpiIdrFieldTypeT chasstype; +SaHpiTextBufferT *strptr; +struct { + SaHpiResourceIdT rid; + SaHpiEntryIdT idrid; + SaHpiEntryIdT areaid; + SaHpiEntryIdT fieldid; + char *tag; + int tlen; + } atag; +#define NRW_ENTS 12 +SaHpiEntityTypeT rw_entities[NRW_ENTS] = { /*read-writable entities*/ + SAHPI_ENT_SYS_MGMNT_MODULE, + SAHPI_ENT_SYSTEM_BOARD, + SAHPI_ENT_FRONT_PANEL_BOARD, + SAHPI_ENT_SYSTEM_CHASSIS, + SAHPI_ENT_SYS_MGMNT_SOFTWARE, + SAHPI_ENT_COMPACTPCI_CHASSIS, + SAHPI_ENT_ADVANCEDTCA_CHASSIS, + SAHPI_ENT_RACK_MOUNTED_SERVER, + SAHPI_ENT_SYSTEM_BLADE, + SAHPI_ENT_SWITCH_BLADE, + SAHPI_ENT_SPEC_PROC_BLADE, + SAHPI_ENT_ALARM_MANAGER }; + +#ifdef BMCONLY +char bmctag[] = "Basbrd Mgmt Ctlr"; /* see IsTagBmc() */ +char bmctag2[] = "Management Controller"; /* see IsTagBmc() */ + +/* + * findmatch + * returns offset of the match if found, or -1 if not found. + */ +static int +findmatch(char *buffer, int sbuf, char *pattern, int spattern, char figncase) +{ + int c, j, imatch; + j = 0; + imatch = 0; + for (j = 0; j < sbuf; j++) { + if (sbuf - j < spattern && imatch == 0) return (-1); + c = buffer[j]; + if (c == pattern[imatch]) { + imatch++; + if (imatch == spattern) return (++j - imatch); + } else if (pattern[imatch] == '?') { /*wildcard char*/ + imatch++; + if (imatch == spattern) return (++j - imatch); + } else if (figncase == 1) { + if ((c & 0x5f) == (pattern[imatch] & 0x5f)) { + imatch++; + if (imatch == spattern) return (++j - imatch); + } else + imatch = 0; + } else + imatch = 0; + } + return (-1); +} /*end findmatch */ + +static int +IsTagBmc(char *dstr, int dlen) +{ + int ret = 0; + + if (strncmp(dstr, bmctag, sizeof(bmctag)) == 0) /* Sahalee */ + ret = 1; + else if (findmatch(dstr,dlen,"BMC",3,1) >= 0) /* mBMC or other */ + ret = 1; + else if (findmatch(dstr,dlen,bmctag2,sizeof(bmctag2),1) >= 0) + ret = 1; /* BMC tag for OpenHPI with ipmi plugin */ + return(ret); +} +#else +static int +IsTagBmc(char *dstr, int dlen) +{ + /* if OpenHPI, always return TRUE for any Inventory RDR */ + return(1); +} +#endif + +static int +ent_writable(SaHpiEntityPathT *ep, SaHpiIdrInfoT *idrinfo) +{ + int i, rv; + /* The IdrInfo ReadOnly field might be ok, but we don't + even want to attempt to write to DIMMs or Power Supplies, + even if the plugin reports it otherwise, so only check + for known writable entity types. */ + for (i = 0; i < NRW_ENTS; i++) + if (rw_entities[i] == ep->Entry[0].EntityType) break; + if (i >= NRW_ENTS) rv = 0; + else rv = 1; + return(rv); +} + +static void +fixstr(SaHpiTextBufferT *strptr, char *outstr) +{ + size_t datalen; + + if (outstr == NULL) return; + outstr[0] = 0; + if (strptr == NULL) return; + datalen = strptr->DataLength; + if (datalen > MAX_STRSIZE) datalen = MAX_STRSIZE-1; + if (datalen != 0) { + strncpy ((char *)outstr, (char *)strptr->Data, datalen); + outstr[datalen] = 0; + if (fdebug) { + printf("TextBuffer len=%d, dtype=%x lang=%d: %s\n", + strptr->DataLength,strptr->DataType,strptr->Language, + strptr->Data ); + } + } +#ifdef LENGTH_BAD + else /* may be bogus length, try anyway */ + strcpy ((char *)outstr, (char *)strptr->Data); +#endif +} + +#define NAREATYP 6 +static struct { SaHpiUint8T type; char *str; +} map_areatype[NAREATYP] = { + { SAHPI_IDR_AREATYPE_INTERNAL_USE, "Internal Area" }, + { SAHPI_IDR_AREATYPE_CHASSIS_INFO, "Chassis Area" }, + { SAHPI_IDR_AREATYPE_BOARD_INFO, "Board Area" }, + { SAHPI_IDR_AREATYPE_PRODUCT_INFO, "Product Area" }, + { SAHPI_IDR_AREATYPE_OEM, "OEM Area" }, + { SAHPI_IDR_AREATYPE_UNSPECIFIED, "Unspecified Area" } +}; + +#define NFIELDTYP 11 +static struct { SaHpiUint8T type; char *str; +} map_fieldtype[NFIELDTYP] = { + { SAHPI_IDR_FIELDTYPE_CHASSIS_TYPE, "Chassis Type "}, + { SAHPI_IDR_FIELDTYPE_MFG_DATETIME, "Mfg DateTime "}, + { SAHPI_IDR_FIELDTYPE_MANUFACTURER, "Manufacturer "}, + { SAHPI_IDR_FIELDTYPE_PRODUCT_NAME, "Product Name "}, + { SAHPI_IDR_FIELDTYPE_PRODUCT_VERSION, "Product Versn"}, + { SAHPI_IDR_FIELDTYPE_SERIAL_NUMBER, "Serial Number"}, + { SAHPI_IDR_FIELDTYPE_PART_NUMBER, "Part Number "}, + { SAHPI_IDR_FIELDTYPE_FILE_ID, "File ID "}, + { SAHPI_IDR_FIELDTYPE_ASSET_TAG, "Asset Tag "}, + { SAHPI_IDR_FIELDTYPE_CUSTOM, "Custom Field "}, + { SAHPI_IDR_FIELDTYPE_UNSPECIFIED, "Unspecified "} +}; + +#define NEPTYPES 67 +struct { SaHpiEntityTypeT type; char *str; } map_epstr[NEPTYPES] = { + { SAHPI_ENT_ADD_IN_CARD, "ADD_IN_CARD" }, + { SAHPI_ENT_ADVANCEDTCA_CHASSIS, "ADVANCEDTCA_CHASSIS" }, + { SAHPI_ENT_ALARM_MANAGER, "ALARM_MANAGER" }, + { SAHPI_ENT_BACK_PANEL_BOARD, "BACK_PANEL_BOARD" }, + { SAHPI_ENT_BATTERY, "BATTERY" }, + { SAHPI_ENT_BIOS, "BIOS" }, + { SAHPI_ENT_BOARD_SET_SPECIFIC, "BOARD_SET_SPECIFIC" }, + { SAHPI_ENT_CHASSIS_BACK_PANEL_BOARD, "CHASSIS_BACK_PANEL_BOARD" }, + { SAHPI_ENT_CHASSIS_SPECIFIC, "CHASSIS_SPECIFIC" }, + { SAHPI_ENT_COMPACTPCI_CHASSIS, "COMPACTPCI_CHASSIS" }, + { SAHPI_ENT_COOLING_DEVICE, "COOLING_DEVICE" }, + { SAHPI_ENT_COOLING_UNIT, "COOLING_UNIT" }, + { SAHPI_ENT_DEVICE_BAY, "DEVICE_BAY" }, + { SAHPI_ENT_DISK_BAY, "DISK_BAY" }, + { SAHPI_ENT_DISK_BLADE, "DISK_BLADE" }, + { SAHPI_ENT_DISK_DRIVE, "DISK_DRIVE" }, + { SAHPI_ENT_DISK_DRIVE_BAY, "DISK_DRIVE_BAY" }, + { SAHPI_ENT_DISPLAY_PANEL, "DISPLAY_PANEL" }, + { SAHPI_ENT_DRIVE_BACKPLANE, "DRIVE_BACKPLANE" }, + { SAHPI_ENT_EXTERNAL_ENVIRONMENT, "EXTERNAL_ENVIRONMENT" }, + { SAHPI_ENT_FAN, "FAN" }, + { SAHPI_ENT_FRONT_PANEL_BOARD, "FRONT_PANEL_BOARD" }, + { SAHPI_ENT_GROUP, "GROUP" }, + { SAHPI_ENT_INTERCONNECT, "INTERCONNECT" }, + { SAHPI_ENT_IO_BLADE, "IO_BLADE" }, + { SAHPI_ENT_IO_SUBBOARD, "IO_SUBBOARD" }, + { SAHPI_ENT_MEMORY_DEVICE, "MEMORY_DEVICE" }, + { SAHPI_ENT_MEMORY_MODULE, "MEMORY_MODULE" }, + { SAHPI_ENT_OEM_SYSINT_SPECIFIC, "OEM_SYSINT_SPECIFIC" }, + { SAHPI_ENT_OPERATING_SYSTEM, "OPERATING_SYSTEM" }, + { SAHPI_ENT_OTHER, "OTHER" }, + { SAHPI_ENT_OTHER_CHASSIS_BOARD, "OTHER_CHASSIS_BOARD" }, + { SAHPI_ENT_OTHER_SYSTEM_BOARD, "OTHER_SYSTEM_BOARD" }, + { SAHPI_ENT_PERIPHERAL_BAY, "PERIPHERAL_BAY" }, + { SAHPI_ENT_PERIPHERAL_BAY_2, "PERIPHERAL_BAY_2" }, + { SAHPI_ENT_PHYSICAL_SLOT, "PHYSICAL_SLOT" }, + { SAHPI_ENT_POWER_DISTRIBUTION_UNIT, "POWER_DISTRIBUTION_UNIT" }, + { SAHPI_ENT_POWER_MGMNT, "POWER_MGMNT" }, + { SAHPI_ENT_POWER_MODULE, "POWER_MODULE" }, + { SAHPI_ENT_POWER_SUPPLY, "POWER_SUPPLY" }, + { SAHPI_ENT_POWER_SYSTEM_BOARD, "POWER_SYSTEM_BOARD" }, + { SAHPI_ENT_POWER_UNIT, "POWER_UNIT" }, + { SAHPI_ENT_PROCESSOR, "PROCESSOR" }, + { SAHPI_ENT_PROCESSOR_BOARD, "PROCESSOR_BOARD" }, + { SAHPI_ENT_PROCESSOR_MODULE, "PROCESSOR_MODULE" }, + { SAHPI_ENT_RACK, "RACK" }, + { SAHPI_ENT_RACK_MOUNTED_SERVER, "RACK_MOUNTED_SERVER" }, + { SAHPI_ENT_REMOTE, "REMOTE" }, + { SAHPI_ENT_ROOT, "ROOT" }, + { SAHPI_ENT_SBC_BLADE, "SBC_BLADE" }, + { SAHPI_ENT_SBC_SUBBOARD, "SBC_SUBBOARD" }, + { SAHPI_ENT_SHELF_MANAGER, "SHELF_MANAGER" }, + { SAHPI_ENT_SPEC_PROC_BLADE, "SPEC_PROC_BLADE" }, + { SAHPI_ENT_SUBBOARD_CARRIER_BLADE, "SUBBOARD_CARRIER_BLADE" }, + { SAHPI_ENT_SUB_CHASSIS, "SUB_CHASSIS" }, + { SAHPI_ENT_SUBRACK, "SUBRACK" }, + { SAHPI_ENT_SWITCH, "SWITCH" }, + { SAHPI_ENT_SWITCH_BLADE, "SWITCH_BLADE" }, + { SAHPI_ENT_SYS_EXPANSION_BOARD, "SYS_EXPANSION_BOARD" }, + { SAHPI_ENT_SYS_MGMNT_MODULE, "SYS_MGMNT_MODULE" }, + { SAHPI_ENT_SYS_MGMNT_SOFTWARE, "SYS_MGMNT_SOFTWARE" }, + { SAHPI_ENT_SYSTEM_BLADE, "SYSTEM_BLADE" }, + { SAHPI_ENT_SYSTEM_BOARD, "SYSTEM_BOARD" }, + { SAHPI_ENT_SYSTEM_BUS, "SYSTEM_BUS" }, + { SAHPI_ENT_SYSTEM_CHASSIS, "SYSTEM_CHASSIS" }, + { SAHPI_ENT_UNKNOWN, "UNKNOWN" }, + { SAHPI_ENT_UNSPECIFIED, "UNSPECIFIED" }, +}; + +static void print_epath(SaHpiEntityPathT *epath, int len); +static void print_epath(SaHpiEntityPathT *epath, int len) +{ + int i,j; + SaHpiEntityTypeT t; + char *pstr; + +#ifdef OPENHPI_USED + if (fverbose) { + oh_print_ep(epath, len); + } else +#endif + { + for (i = 0; i < SAHPI_MAX_ENTITY_PATH; i++) { + t = epath->Entry[i].EntityType; + pstr = ""; + for (j = 0; j < NEPTYPES; j++) { + if (t == map_epstr[j].type) { + pstr = map_epstr[j].str; + break; + } + } + if (j == NEPTYPES) j--; + printf("{%s:%d} ",pstr, epath->Entry[i].EntityLocation); + if (t == SAHPI_ENT_ROOT) break; + } + printf("\n"); + } + return; +} + +static void print_idrinfo(SaHpiIdrInfoT *idrInfo,int len); +static void print_idrinfo(SaHpiIdrInfoT *idrInfo,int len) +{ +#ifdef OPENHPI_USED + if (fverbose) { + oh_print_idrinfo(idrInfo, len); + } else +#endif + { /* don't need to show this if not fverbose */ + } +} + +static void print_idrareaheader(SaHpiIdrAreaHeaderT *areaHeader, int len); +static void print_idrareaheader(SaHpiIdrAreaHeaderT *areaHeader, int len) +{ + int i; +#ifdef OPENHPI_USED + if (fverbose) { + oh_print_idrareaheader(areaHeader, len); + } else +#endif + { + for (i = 0; i < NAREATYP; i++) { + if (map_areatype[i].type == areaHeader->Type) break; + } + if (i == NAREATYP) i--; + printf("AreaId[%d] %s\n",areaHeader->AreaId,map_areatype[i].str); + } +} + +static void print_idrfield(SaHpiIdrFieldT *field, int len); +static void print_idrfield(SaHpiIdrFieldT *field, int len) +{ + SaHpiTextBufferT *strptr; + char fieldstr[MAX_STRSIZE]; + int i; + +#ifdef OPENHPI_USED + if (fverbose) { + oh_print_idrfield(field, len); + } else +#endif + { + for (i = 0; i < NFIELDTYP; i++) { + if (map_fieldtype[i].type == field->Type) break; + } + if (i == NFIELDTYP) i--; + strptr = &(field->Field); + fixstr(strptr,fieldstr); /*stringify if needed*/ + printf(" FieldId[%d] %s : %s\n", + field->FieldId,map_fieldtype[i].str ,fieldstr); + } +} + +int walkInventory(SaHpiSessionIdT sessionid, SaHpiResourceIdT resourceid, + SaHpiIdrInfoT *idrInfo); +int walkInventory(SaHpiSessionIdT sessionid, SaHpiResourceIdT resourceid, + SaHpiIdrInfoT *idrInfo) +{ + + SaErrorT rv = SA_OK, + rvField = SA_OK; + + SaHpiUint32T numAreas; + SaHpiUint32T countAreas = 0; + SaHpiUint32T countFields = 0; + + SaHpiEntryIdT areaId; + SaHpiEntryIdT nextareaId; + SaHpiIdrAreaTypeT areaType; + SaHpiIdrAreaHeaderT areaHeader; + + SaHpiEntryIdT fieldId; + SaHpiEntryIdT nextFieldId; + SaHpiIdrFieldTypeT fieldType; + SaHpiIdrFieldT thisField; + + numAreas = idrInfo->NumAreas; + areaType = SAHPI_IDR_AREATYPE_UNSPECIFIED; + areaId = SAHPI_FIRST_ENTRY; + foundasset = 0; + while ((rv == SA_OK) && (areaId != SAHPI_LAST_ENTRY)) + { + rv = saHpiIdrAreaHeaderGet(sessionid, resourceid, + idrInfo->IdrId, areaType, + areaId, &nextareaId, + &areaHeader); + if (rv == SA_OK) { + countAreas++; + print_idrareaheader(&areaHeader, 8); + + fieldType = SAHPI_IDR_FIELDTYPE_UNSPECIFIED; + fieldId = SAHPI_FIRST_ENTRY; + countFields = 0; + + while ((rvField == SA_OK) && (fieldId != SAHPI_LAST_ENTRY)) + { + rvField = saHpiIdrFieldGet( sessionid, resourceid, + idrInfo->IdrId, + areaHeader.AreaId, fieldType, + fieldId, &nextFieldId, + &thisField); + if (fdebug) + printf("saHpiIdrFieldGet[%x] rv = %d type=%d\n", + idrInfo->IdrId,rvField, + thisField.Type); + if (rvField == SA_OK) { + countFields++; + print_idrfield(&thisField, 12); + if (thisField.Type == SAHPI_IDR_FIELDTYPE_ASSET_TAG) { + atag.rid = resourceid; + atag.idrid = idrInfo->IdrId; + atag.areaid = areaHeader.AreaId; + atag.fieldid = fieldId; + foundasset = 1; + } + } + fieldId = nextFieldId; + } /*while fields*/ + + if ( countFields != areaHeader.NumFields) + printf("Area Header error: areaHeader.NumFields %d, countFields %d\n", + areaHeader.NumFields, countFields); + } else { + printf("saHpiIdrAreaHeaderGet error %d\n",rv); + } + areaId = nextareaId; + + } /*while areas*/ + + if ((rv == SA_OK) && (countAreas != numAreas)) + printf("idrInfo error! idrInfo.NumAreas = %d; countAreas = %d\n", + numAreas, countAreas); + + if (countFields > 0) rv = 0; + return(rv); +} /*end walkInventory*/ + +int +main(int argc, char **argv) +{ + int c; + SaErrorT rv; + SaHpiSessionIdT sessionid; + SaHpiDomainInfoT rptinfo; + SaHpiRptEntryT rptentry; + SaHpiEntryIdT rptentryid; + SaHpiEntryIdT nextrptentryid; + SaHpiEntryIdT entryid; + SaHpiEntryIdT nextentryid; + SaHpiResourceIdT resourceid; + SaHpiRdrT rdr; + SaHpiIdrInfoT idrInfo; + SaHpiIdrIdT idrid; + int invfound = 0; + int nloops = 0; + + printf("%s ver %s\n",progname,progver); + atag.tlen = 0; + + while ( (c = getopt( argc, argv,"a:vxz?")) != EOF ) + switch(c) { + case 'z': fzdebug = 1; /* fall thru to include next setting */ + case 'x': fdebug = 1; break; + case 'v': fverbose = 1; break; + case 'a': + fasset = 1; + if (optarg) { + atag.tag = (char *)strdup(optarg); + atag.tlen = strlen(optarg); + } + break; + default: + printf("Usage: %s [-x] [-a asset_tag]\n", progname); + printf(" -a Sets the asset tag\n"); + printf(" -x Display debug messages\n"); + printf(" -z Display extra debug messages\n"); + exit(1); + } + + inv = (SaHpiIdrAreaHeaderT *)&inbuff[0]; + rv = saHpiSessionOpen(SAHPI_UNSPECIFIED_DOMAIN_ID,&sessionid,NULL); + if (fdebug) printf("saHpiSessionOpen rv = %d sessionid = %x\n",rv,sessionid); + if (rv != SA_OK) { + printf("saHpiSessionOpen error %d\n",rv); + exit(-1); + } + + rv = saHpiDomainInfoGet(sessionid,&rptinfo); + if (fdebug) printf("saHpiDomainInfoGet rv = %d\n",rv); + // if (fdebug) printf("RptInfo: UpdateCount = %x, UpdateTime = %lx\n", + // rptinfo.UpdateCount, (unsigned long)rptinfo.UpdateTimestamp); + + while (!invfound && (nloops < 7)) + { + /* + * The OpenHPI ipmi plugin has a bug whereby the FRU RDR is added + * much later, and always requires a rediscovery. (bug #1095256) + * This should not apply to other well-behaved plugins. + */ + nloops++; + if (fdebug) printf("Starting Discovery, pass %d ...\n",nloops); + rv = saHpiDiscover(sessionid); + if (fdebug) printf("saHpiDiscover rv = %d\n",rv); + if (rv != SA_OK) { + printf("saHpiDiscover error %d\n",rv); + break; + } + + /* walk the RPT list */ + rptentryid = SAHPI_FIRST_ENTRY; + while ((rv == SA_OK) && (rptentryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRptEntryGet(sessionid,rptentryid,&nextrptentryid,&rptentry); + if (rv != SA_OK) printf("RptEntryGet: rid=%d rv = %d\n",rptentryid,rv); + if (rv == SA_OK) + { + /* walk the RDR list for this RPT entry */ + entryid = SAHPI_FIRST_ENTRY; + /* OpenHPI plugin sometimes has bad RPT Tag DataLength here. */ + // rptentry.ResourceTag.Data[rptentry.ResourceTag.DataLength] = 0; + resourceid = rptentry.ResourceId; + if (fdebug) printf("rptentry[%d] resourceid=%d\n", rptentryid,resourceid); + if (rptentry.ResourceCapabilities & SAHPI_CAPABILITY_INVENTORY_DATA) + { + printf("Resource[%d] Tag: %s \thas inventory capability\n", rptentryid,rptentry.ResourceTag.Data); + while ((rv == SA_OK) && (entryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRdrGet(sessionid,resourceid, entryid,&nextentryid, &rdr); + if (fdebug) printf("saHpiRdrGet[%x] rv = %d\n",entryid,rv); + if (rv == SA_OK) + { + if (fdebug) printf("Rdr[%x] type = %d tag = %s\n",entryid, + rdr.RdrType,rdr.IdString.Data); + if (rdr.RdrType == SAHPI_INVENTORY_RDR) + { + invfound = 1; + /*type 3 includes inventory records*/ + rdr.IdString.Data[rdr.IdString.DataLength] = 0; + idrid = rdr.RdrTypeUnion.InventoryRec.IdrId; + buffersize = sizeof(inbuff); + if (fdebug) { + printf("Rdr[%x] is inventory, IdrId=%x\n",rdr.RecordId,idrid); + printf("Inv BufferSize=%d\n", buffersize); + } + if ( IsTagBmc(rdr.IdString.Data, rdr.IdString.DataLength) ) + { + /* Get all of the inventory data areas and fields */ + memset(inv,0,buffersize); + rv = saHpiIdrInfoGet(sessionid, resourceid, idrid, &idrInfo); + if (rv != SA_OK) { + printf("IDR Info error: rv = %d\n",rv); + } else { /* idrInfo is ok */ + if (fdebug) printf("IDR Info: ok \n"); + print_epath(&rptentry.ResourceEntity, 1); + printf("RDR[%x]: Inventory, IdrId=%x %s\n",rdr.RecordId, + idrid,rdr.IdString.Data); + print_idrinfo(&idrInfo,4); + rv = walkInventory(sessionid, resourceid, &idrInfo); + if (fdebug) printf("walkInventory rv = %d\n",rv); + } + + if (!ent_writable(&rptentry.ResourceEntity,&idrInfo)) + foundasset = 0; + if ((fasset == 1) && (foundasset == 1)) { + SaHpiIdrFieldT atagField; + atagField.Type = SAHPI_IDR_FIELDTYPE_ASSET_TAG; + atagField.ReadOnly = SAHPI_FALSE; + atagField.AreaId = atag.areaid; + atagField.FieldId = atag.fieldid; + strptr=&(atagField.Field); + strptr->DataType = SAHPI_TL_TYPE_TEXT; + strptr->Language = SAHPI_LANG_ENGLISH; + strptr->DataLength = (SaHpiUint8T)atag.tlen; + strncpy((char *)strptr->Data, atag.tag, atag.tlen); + strptr->Data[atag.tlen] = 0; + printf( "Writing new asset tag: %s\n",strptr->Data); + rv = saHpiIdrFieldSet(sessionid, resourceid, + atag.idrid, &atagField); + printf("Return Write Status = %d\n", rv); + if (rv == SA_OK) { + printf ("Good write - re-reading!\n"); + rv = walkInventory(sessionid, resourceid, &idrInfo); + if (fdebug) printf("walkInventory rv = %d\n",rv); + } /* Good write - re-read */ + } /*endif fasset*/ + } /*endif RDR tag ok*/ + } /* Inventory Data Records - Type 3 */ + else if (fdebug) printf("rdr type = %d\n", rdr.RdrType); + } /*endif RdrGet ok*/ + entryid = nextentryid; + } /*end while rdr*/ + } /*endif rpt invent capab*/ + else + if (fdebug) printf("Resource[%d] Tag: %s\n", rptentryid, + rptentry.ResourceTag.Data); + } /*endif rpt ok*/ + rptentryid = nextrptentryid; + } /*end rpt loop */ + if (fdebug) printf("loop %d inventory found = %d\n",nloops,invfound); + } /*end while no inv */ + rv = saHpiSessionClose(sessionid); + exit(0); +} + /* end hpifru.c */ diff --git a/hpiutil/hpiinit.sh b/hpiutil/hpiinit.sh new file mode 100755 index 0000000..eace400 --- /dev/null +++ b/hpiutil/hpiinit.sh @@ -0,0 +1,69 @@ +#!/bin/sh +# +# hpi init script to start/stop the Intel hpi library daemon +# process name: SpiLibd +# +# For RedHat and MontaVista +# chkconfig: 345 50 35 +# +### BEGIN SuSE INIT INFO +# Provides: tam +# Required-Start: $network +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Description: tam is used to start/stop Telco Alarm Manager +### END INIT INFO +name=hpiutil +lockfile=/var/lock/subsys/$name + +if [ ! -d /var/lock/subsys ]; then + lockfile=/var/run/$name.pid +fi + +case "$1" in +"start") + # Is it already started? + ps -ef | grep -v grep | grep SpiLibd + if [ $? -eq 0 ] + then + echo "SpiLibd is already started" + exit 1 + fi + SAHPI_HOME=/etc/hpi + LD_LIBRARY_PATH=/usr/lib + #LD_LIBRARY_PATH=$SAHPI_HOME/lib + # Use default config locations (/etc/hpi/*.conf) + #SPI_LIB_CFG_LOCATION=$SAHPI_HOME/spi-lib.conf + #SPI_DAEMON_CFG_LOCATION=$SAHPI_HOME/spi-daemon.conf + SPI_LIB_LOG_LOCATION=/var/log/spilib + SPI_DAEMON_LOG_LOCATION=/var/log/spidaemon + SPI_DAEMON_LOG_LEVEL=-l5 + SPI_LIB_LOG_LEVEL=-l5 +# LD_ASSUME_KERNEL=2.4.1 + # flush the logs before starting daemon + export SAHPI_HOME LD_LIBRARY_PATH SPI_LIB_LOG_LOCATION + export SPI_DAEMON_LOG_LOCATION SPI_DAEMON_LOG_LEVEL SPI_LIB_LOG_LEVEL +# export SPI_LIB_CFG_LOCATION SPI_DAEMON_CFG_LOCATION + rm -f ${SPI_DAEMON_LOG_LOCATION}.1 $SPI_LIB_LOG_LOCATION 2>/dev/null + mv $SPI_DAEMON_LOG_LOCATION ${SPI_DAEMON_LOG_LOCATION}.1 2>/dev/null + # see /usr/bin/SpiLibd + SpiLibd + touch $lockfile + ;; +"stop") + spid=`ps -ef |greo SpiLibd | grep -v grep |awk '{ print $2 }'` + if [ "$spid" != "" ] + then + kill $spid + sleep 5 + kill -9 $spid 2>/dev/null + fi + rm -f $lockfile + ;; +*) + echo "Usage: $0 start|stop" + exit 1 + ;; +esac + +exit 0 diff --git a/hpiutil/hpireset.c b/hpiutil/hpireset.c new file mode 100644 index 0000000..aeddd03 --- /dev/null +++ b/hpiutil/hpireset.c @@ -0,0 +1,225 @@ +/* + * hpireset.c + * + * Author: Andy Cress arcress at users.sourceforge.net + * Copyright (c) 2003 Intel Corporation. + * + * 05/02/03 Andy Cress - created + * 06/06/03 Andy Cress - beta2 + * 06/26/03 Andy Cress - exclude stuff that isn't in HPI 1.0 (MAYBELATER) + * 12/07/04 Andy Cress - added HPI_A/B compile flags + */ +/*M* +Copyright (c) 2003, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + a.. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b.. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + c.. Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *M*/ + +#include +#include +#include +#include "SaHpi.h" + +#define uchar unsigned char +char *progver = "1.1"; +char fdebug = 0; + +static void Usage(char *pname) +{ + printf("Usage: %s [-r -d -x]\n", pname); + printf(" where -r hard Resets the system\n"); + printf(" -d powers Down the system\n"); +#ifdef MAYBELATER +/*++++ not implemented in HPI 1.0 ++++ + printf(" -c power Cycles the system\n"); + printf(" -n sends NMI to the system\n"); + printf(" -o soft-shutdown OS\n"); + printf(" -s reboots to Service Partition\n"); + ++++*/ +#endif + printf(" -x show eXtra debug messages\n"); +} + +int +main(int argc, char **argv) +{ + int c; + SaErrorT rv; +#ifdef HPI_A + SaHpiVersionT hpiVer; + SaHpiRptInfoT rptinfo; +#endif + SaHpiSessionIdT sessionid; + SaHpiRptEntryT rptentry; + SaHpiEntryIdT rptentryid; + SaHpiEntryIdT nextrptentryid; + SaHpiEntryIdT entryid; + SaHpiEntryIdT nextentryid; + SaHpiResourceIdT resourceid; + SaHpiRdrT rdr; + SaHpiCtrlNumT ctlnum; + int j; + uchar breset; + uchar bopt; + uchar fshutdown = 0; + SaHpiCtrlStateT ctlstate; + + printf("%s ver %s\n", argv[0],progver); + breset = 3; /* hard reset as default */ + bopt = 0; /* Boot Options default */ + while ( (c = getopt( argc, argv,"rdx?")) != EOF ) + switch(c) { + case 'd': breset = 0; break; /* power down */ + case 'r': breset = 3; break; /* hard reset */ + case 'x': fdebug = 1; break; /* debug messages */ +#ifdef MAYBELATER + case 'c': breset = 2; break; /* power cycle */ + case 'o': fshutdown = 1; break; /* shutdown OS */ + case 'n': breset = 4; break; /* interrupt (NMI) */ + case 's': bopt = 1; break; /* hard reset to svc part */ +#endif + default: + Usage(argv[0]); + exit(1); + } + if (fshutdown) breset = 5; /* soft shutdown option */ + +#ifdef HPI_A + rv = saHpiInitialize(&hpiVer); + if (rv != SA_OK) { + printf("saHpiInitialize error %d\n",rv); + exit(-1); + } + rv = saHpiSessionOpen(SAHPI_DEFAULT_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + if (rv == SA_ERR_HPI_ERROR) + printf("saHpiSessionOpen: error %d, HPI Library not running\n",rv); + else + printf("saHpiSessionOpen error %d\n",rv); + exit(-1); + } + rv = saHpiResourcesDiscover(sessionid); + if (fdebug) printf("saHpiResourcesDiscover rv = %d\n",rv); + rv = saHpiRptInfoGet(sessionid,&rptinfo); + if (fdebug) printf("saHpiRptInfoGet rv = %d\n",rv); + printf("RptInfo: UpdateCount = %x, UpdateTime = %lx\n", + rptinfo.UpdateCount, (unsigned long)rptinfo.UpdateTimestamp); +#else + rv = saHpiSessionOpen(SAHPI_UNSPECIFIED_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + printf("saHpiSessionOpen: error %d\n",rv); + exit(-1); + } + rv = saHpiDiscover(sessionid); + if (fdebug) printf("saHpiDiscover error %d\n",rv); +#endif + + /* walk the RPT list */ + rptentryid = SAHPI_FIRST_ENTRY; + while ((rv == SA_OK) && (rptentryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRptEntryGet(sessionid,rptentryid,&nextrptentryid,&rptentry); + if (rv != SA_OK) printf("RptEntryGet: rv = %d\n",rv); + if (rv == SA_OK) { + /* walk the RDR list for this RPT entry */ + entryid = SAHPI_FIRST_ENTRY; + resourceid = rptentry.ResourceId; +#ifdef HPI_A + rptentry.ResourceTag.Data[rptentry.ResourceTag.DataLength] = 0; +#endif + printf("rptentry[%d] resourceid=%d tag: %s\n", + entryid,resourceid, rptentry.ResourceTag.Data); + while ((rv == SA_OK) && (entryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRdrGet(sessionid,resourceid, + entryid,&nextentryid, &rdr); + if (fdebug) printf("saHpiRdrGet[%d] rv = %d\n",entryid,rv); + if (rv == SA_OK) { + if (rdr.RdrType == SAHPI_CTRL_RDR) { + /*type 1 includes Cold Reset Control */ + ctlnum = rdr.RdrTypeUnion.CtrlRec.Num; + rdr.IdString.Data[rdr.IdString.DataLength] = 0; + if (fdebug) printf("Ctl[%d]: %d %d %s\n", + ctlnum, rdr.RdrTypeUnion.CtrlRec.Type, + rdr.RdrTypeUnion.CtrlRec.OutputType, + rdr.IdString.Data); + if ((rdr.RdrTypeUnion.CtrlRec.Type == SAHPI_CTRL_TYPE_DIGITAL) && + (rdr.RdrTypeUnion.CtrlRec.OutputType == SAHPI_CTRL_GENERIC)) + { /* This is the Reset control */ + printf("RDR[%d]: %d,%d %s\n", + rdr.RecordId, + rdr.RdrTypeUnion.CtrlRec.Type, + rdr.RdrTypeUnion.CtrlRec.OutputType, + rdr.IdString.Data); +#ifdef MAYBELATER + { + SaHpiResetActionT resetact; + rv = saHpiResourceResetStateGet(sessionid, + resourceid, &resetact); + printf("ResetStateGet status = %d, act=%d\n", + rv,resetact); + rv = saHpiResourceResetStateSet(sessionid, + resourceid, resetact); + printf("ResetStateSet status = %d\n",rv); + } +#endif + + ctlstate.Type = SAHPI_CTRL_TYPE_DIGITAL; + if (breset == 0) { /*power off*/ + ctlstate.StateUnion.Digital = SAHPI_CTRL_STATE_OFF; + printf("Powering down ... \n"); + } else { + ctlstate.StateUnion.Digital = SAHPI_CTRL_STATE_ON; + printf("Resetting ... \n"); + } +#ifdef HPI_A + rv = saHpiControlStateSet(sessionid, + resourceid, ctlnum,&ctlstate); +#else + rv = saHpiControlSet(sessionid, resourceid, + ctlnum, SAHPI_CTRL_MODE_MANUAL, + &ctlstate); +#endif + printf("Reset status = %d\n",rv); + break; + } + } + j++; + entryid = nextentryid; + } + } + rptentryid = nextrptentryid; + } + } + + rv = saHpiSessionClose(sessionid); +#ifdef HPI_A + rv = saHpiFinalize(); +#endif + + exit(0); +} + +/* end hpireset.c */ diff --git a/hpiutil/hpisel.c b/hpiutil/hpisel.c new file mode 100644 index 0000000..e922b81 --- /dev/null +++ b/hpiutil/hpisel.c @@ -0,0 +1,934 @@ +/* + * hpisel.c + * + * Author: Andy Cress arcress at users.sourceforge.net + * Copyright (c) 2003-2005 Intel Corporation. + * + * 04/28/03 Andy Cress - created + * 04/30/03 Andy Cress v0.6 first good run with common use cases + * 05/06/03 Andy Cress v0.7 added -c option to clear it + * 05/29/03 Andy Cress v0.8 fixed pstr warnings + * 06/13/03 Andy Cress v0.9 fixed strcpy bug, + * workaround for SensorEvent.data3 + * 06/19/03 Andy Cress 0.91 added low SEL free space warning + * 06/25/03 Andy Cress v1.0 rework event data logic + * 07/23/03 Andy Cress workaround for OpenHPI BUGGY stuff + * 11/12/03 Andy Cress v1.1 check for CAPABILITY_SEL + * 03/03/04 Andy Cress v1.2 use better free space logic now + * 10/14/04 Andy Cress v1.3 added HPI_A/HPI_B logic + * 02/11/05 Andy Cress v1.4 added decode routines from showsel.c + * 03/30/05 Dave Howell v1.5 added support to enable displaying domain + * event log for HPI_B + * 04/07/05 Andy Cress v1.6 fix domain resourceid & HPI_A/B flags, + * add logic to clear domain event log. + * + * Note that hpiutil 1.0.0 did not return all event data fields, so event + * types other than 'user' did not have all bytes filled in as they + * would have from IPMI alone. A patch to the Intel HPI library in + * version 1.0.1 resolved this. + */ +/*M* +Copyright (c) 2003-2005, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + a.. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b.. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + c.. Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *M*/ + +#include +#include +#include +#include +#include +#include "SaHpi.h" + +#ifdef HPI_A +/* HPI A (1.0) spec */ +char progver[] = "1.6 HPI-A"; +#else +/* HPI B name changes */ +#define SaHpiSelEntryT SaHpiEventLogEntryT +#define SaHpiSelEntryIdT SaHpiEventLogEntryIdT +#define SaHpiSelInfoT SaHpiEventLogInfoT +#define SAHPI_CAPABILITY_SEL SAHPI_CAPABILITY_EVENT_LOG /*0x00000004*/ +#define SAHPI_EC_USER SAHPI_EC_SENSOR_SPECIFIC /*0x7E*/ +char progver[] = "1.6 HPI-B"; +#endif +int fdebug = 0; +int fclear = 0; +int fdomain = 0; + +#ifdef HPI_A +#define NEVTYPES 5 +char *evtypes[NEVTYPES] = {"sensor","hotswap","watchdog","oem ","user "}; +#else +#define NEVTYPES 9 +char *evtypes[NEVTYPES] = {"resource","domain","sensor","sens_enable", + "hotswap","watchdog","HPI sw", "oem ","user "}; +#endif + +#define NECODES 27 +struct { int code; char *str; +} ecodes[NECODES] = { + { 0, "Success" }, + { -1001, "HPI unspecified error" }, + { -1002, "HPI unsupported function" }, + { -1003, "HPI busy" }, + { -1004, "HPI request invalid" }, + { -1005, "HPI command invalid" }, + { -1006, "HPI timeout" }, + { -1007, "HPI out of space" }, + { -1008, "HPI data truncated" }, +#ifdef HPI_A + { -1009, "HPI data length invalid" }, +#else + { -1009, "HPI invalid parameter" }, +#endif + { -1010, "HPI data exceeds limits" }, + { -1011, "HPI invalid params" }, + { -1012, "HPI invalid data" }, + { -1013, "HPI not present" }, + { -1014, "HPI invalid data field" }, + { -1015, "HPI invalid sensor command" }, + { -1016, "HPI no response" }, + { -1017, "HPI duplicate request" }, + { -1018, "HPI updating" }, + { -1019, "HPI initializing" }, + { -1020, "HPI unknown error" }, + { -1021, "HPI invalid session" }, + { -1022, "HPI invalid domain" }, + { -1023, "HPI invalid resource id" }, + { -1024, "HPI invalid request" }, + { -1025, "HPI entity not present" }, + { -1026, "HPI uninitialized" } +}; +char def_estr[15] = "HPI error %d "; + +#define NUM_EC 14 +struct { int val; char *str; +} eventcats[NUM_EC] = { +{ /*0x00*/ SAHPI_EC_UNSPECIFIED, "unspecified"}, +{ /*0x01*/ SAHPI_EC_THRESHOLD, "Threshold"}, +{ /*0x02*/ SAHPI_EC_USAGE, "Usage "}, +{ /*0x03*/ SAHPI_EC_STATE, "State "}, +{ /*0x04*/ SAHPI_EC_PRED_FAIL, "Predictive"}, +{ /*0x05*/ SAHPI_EC_LIMIT, "Limit "}, +{ /*0x06*/ SAHPI_EC_PERFORMANCE, "Performnc"}, +{ /*0x07*/ SAHPI_EC_SEVERITY, "Severity "}, +{ /*0x08*/ SAHPI_EC_PRESENCE, "DevPresen"}, +{ /*0x09*/ SAHPI_EC_ENABLE, "DevEnable"}, +{ /*0x0a*/ SAHPI_EC_AVAILABILITY, "Availabil"}, +{ /*0x0b*/ SAHPI_EC_REDUNDANCY, "Redundanc"}, +{ /*0x7e*/ SAHPI_EC_USER, "SensorSpc"}, /*UserDefin*/ +{ /*0x7f*/ SAHPI_EC_GENERIC, "OemDefin " }}; + +#define NUM_ES 6 +struct { int val; char *str; } eventstates[NUM_ES] = { +{ SAHPI_ES_LOWER_MINOR , "lo-min" }, +{ SAHPI_ES_LOWER_MAJOR , "lo-maj" }, +{ SAHPI_ES_LOWER_CRIT , "lo-crt" }, +{ SAHPI_ES_UPPER_MINOR , "hi-min" }, +{ SAHPI_ES_UPPER_MAJOR , "hi-maj" }, +{ SAHPI_ES_UPPER_CRIT , "hi-crt" } }; + +#define uchar unsigned char +#define ushort unsigned short +#define uint unsigned int +#define ulong unsigned long +typedef struct +{ + short record_id; + uchar record_type; + uint timestamp; + short generator_id; /*slave_addr/channel*/ + uchar evm_rev; //event message revision + uchar sensor_type; + uchar sensor_number; + uchar event_trigger; + uchar event_data1; + uchar event_data2; + uchar event_data3; +} SEL_RECORD; + +/* sensor_types: See IPMI 1.5 Table 36-3, IPMI 2.0 Table 42-3 */ +#define NSTYPES 0x2D +static char *sensor_types[NSTYPES] = { +/* 00h */ "reserved", +/* 01h */ "Temperature", +/* 02h */ "Voltage", +/* 03h */ "Current", +/* 04h */ "Fan", +/* 05h */ "Platform Chassis Intrusion", +/* 06h */ "Security Violation", +/* 07h */ "Processor", +/* 08h */ "Power Supply", +/* 09h */ "Power Unit", +/* 0Ah */ "Cooling Device", +/* 0Bh */ "FRU Sensor", +/* 0Ch */ "Memory", +/* 0Dh */ "Drive Slot", +/* 0Eh */ "POST Memory Resize", +/* 0Fh */ "System Firmware", /*incl POST code errors*/ +/* 10h */ "SEL Disabled", +/* 11h */ "Watchdog 1", +/* 12h */ "System Event", /* offset 0,1,2 */ +/* 13h */ "Critical Interrupt", /* offset 0,1,2 */ +/* 14h */ "Button", /* offset 0,1,2 */ +/* 15h */ "Board", +/* 16h */ "Microcontroller", +/* 17h */ "Add-in Card", +/* 18h */ "Chassis", +/* 19h */ "Chip Set", +/* 1Ah */ "Other FRU", +/* 1Bh */ "Cable/Interconnect", +/* 1Ch */ "Terminator", +/* 1Dh */ "System Boot Initiated", +/* 1Eh */ "Boot Error", +/* 1Fh */ "OS Boot", +/* 20h */ "OS Critical Stop", +/* 21h */ "Slot/Connector", +/* 22h */ "ACPI Power State", +/* 23h */ "Watchdog 2", +/* 24h */ "Platform Alert", +/* 25h */ "Entity Presence", +/* 26h */ "Monitor ASIC", +/* 27h */ "LAN", +/* 28h */ "Management Subsystem Health", +/* 29h */ "Battery", +/* 2Ah */ "Session Audit", +/* 2Bh */ "Version Change", +/* 2Ch */ "FRU State" +}; + +#define NFWERRS 15 +static struct { /* See Table 36-3, type 0Fh, offset 00h */ + int code; char *msg; + } fwerrs[NFWERRS] = { + { 0x00, "Unspecified"}, + { 0x01, "No system memory"}, + { 0x02, "No usable memory"}, + { 0x03, "Unrecovered Hard Disk"}, + { 0x04, "Unrecovered System Board"}, + { 0x05, "Unrecovered Diskette"}, + { 0x06, "Unrecovered Hard Disk Ctlr"}, + { 0x07, "Unrecovered PS2 USB"}, + { 0x08, "Boot media not found"}, + { 0x09, "Unrecovered video controller"}, + { 0x0A, "No video device"}, + { 0x0B, "Firmware ROM corruption"}, + { 0x0C, "CPU voltage mismatch"}, + { 0x0D, "CPU speed mismatch"}, + { 0x0E, "Reserved" } +}; + +#define NFWSTAT 27 +static struct { /* See Table 36-3, type 0Fh, offset 01h & 02h */ + int code; char *msg; + } fwstat[NFWSTAT] = { + { 0x00, "Unspecified"}, + { 0x01, "Memory init"}, + { 0x02, "Hard disk init"}, + { 0x03, "Secondary processor"}, + { 0x04, "User authentication"}, + { 0x05, "User-init sys setup"}, + { 0x06, "USB configuration"}, + { 0x07, "PCI configuration"}, + { 0x08, "Option ROM init"}, + { 0x09, "Video init"}, + { 0x0a, "Cache init"}, + { 0x0b, "SM Bus init"}, + { 0x0c, "Keyboard init"}, + { 0x0d, "Mgt controller"}, + { 0x0e, "Docking attach"}, + { 0x0f, "Enabling docking"}, + { 0x10, "Docking eject"}, + { 0x11, "Disabling docking"}, + { 0x12, "OS wake-up"}, + { 0x13, "Starting OS boot"}, + { 0x14, "Baseboard init"}, + { 0x15, "reserved"}, + { 0x16, "Floppy init"}, + { 0x17, "Keyboard test"}, + { 0x18, "Mouse test"}, + { 0x19, "Primary processor"}, + { 0x1A, "Reserved"} +}; + +#define NGDESC 7 +struct { + ushort g_id; + char desc[10]; +} gen_desc[NGDESC] = { /*empirical, format defined in IPMI 1.5 Table 23-5 */ + { 0x0000, "IPMB"}, + { 0x0001, "EFI "}, + { 0x0003, "BIOS"}, + { 0x0020, "BMC "}, + { 0x0021, "SMI "}, + { 0x0028, "CHAS"}, /* Chassis Bridge Controller */ +/*{0x0031, "SMI/IPMB"}, * ia64/mBMC POST errors (rqSa/rqLun) */ +/*{0x0033, "MemCtlr"}, * ia64 memory controller? (rqSa/rqLun) */ + { 0x00c0, "HSC "} /* SAF-TE Hot-Swap Controller*/ +}; + +#define NCRITS 10 +char * crit_int_str[NCRITS] = { /* Critical Interrupt descriptions */ + /*00*/ "FP NMI ", /* Front Panel NMI */ + /*01*/ "Bus Timout", + /*02*/ "IOch NMI ", /* IO channel check NMI */ + /*03*/ "Soft NMI ", + /*04*/ "PCI PERR ", + /*05*/ "PCI SERR ", + /*06*/ "EISA Timout", + /*07*/ "Bus Warn ", /* Bus Correctable Error */ + /*08*/ "Bus Error", /* Bus Uncorrectable Error */ + /*09*/ "Fatal NMI" }; + +#define NSLOTC 9 +char * slot_str[NSLOTC] = { /* Slot/Connector descriptions */ + /*00*/ "Fault ", + /*01*/ "Identify", + /*02*/ "Inserted", + /*03*/ "InsReady", + /*04*/ "RemReady", + /*05*/ "PowerOff", + /*06*/ "RemRequest", + /*07*/ "Interlock", + /*08*/ "Disabled" }; + +#define NSDESC 47 +struct { + ushort genid; /*generator id: BIOS, BMC, etc. (slave_addr/channel)*/ + uchar s_typ; /*1=temp,2=voltage,4=fan,... */ + uchar s_num; + uchar evtrg; /*event trigger/type, see IPMI 1.5 table 36.1 & 36.2 */ + uchar data1; + uchar data2; + uchar data3; + char desc[40]; +} sens_desc[NSDESC] = { +{0xffff,0x05, 0x05, 0x6f, 0x44, 0xff, 0xff, "LAN unplugged"}, /*chassis*/ +{0xffff,0x05, 0x05, 0xef, 0x44, 0xff, 0xff, "LAN restored "}, /*chassis*/ +{0xffff,0x06, 0xff, 0xff, 0x45, 0xff, 0xff, "Password"}, /*security*/ +{0xffff,0x07, 0xff, 0xff, 0x41, 0xff, 0xff, "Thermal trip"}, /*processor*/ +{0xffff,0x08, 0xff, 0x6f, 0x40, 0xff, 0xff, "Presence detected"},/*PowerSupply*/ +{0xffff,0x08, 0xff, 0x6f, 0x41, 0xff, 0xff, "Failure detected"},/*power supply*/ +{0xffff,0x08, 0xff, 0x6f, 0x42, 0xff, 0xff, "Predictive failure"}, +{0xffff,0x08, 0xff, 0x6f, 0x43, 0xff, 0xff, "AC Lost"}, +{0xffff,0x08, 0xff, 0xef, 0x40, 0xff, 0xff, "not present"}, /*power supply*/ +{0xffff,0x08, 0xff, 0xef, 0x41, 0xff, 0xff, "is OK "}, /*power supply*/ +{0xffff,0x08, 0xff, 0xef, 0x42, 0xff, 0xff, "Predictive OK"}, +{0xffff,0x08, 0xff, 0xef, 0x43, 0xff, 0xff, "AC Regained"}, /*power supply*/ +{0xffff,0x09, 0xff, 0xff, 0x40, 0xff, 0xff, "Redundancy OK "}, /*power unit*/ +{0xffff,0x09, 0xff, 0xff, 0x41, 0xff, 0xff, "Redundancy Lost"}, +{0xffff,0x09, 0xff, 0xff, 0x44, 0xff, 0xff, "AC Lost"}, +{0xffff,0x09, 0xff, 0xff, 0x46, 0xff, 0xff, "Failure detected"}, +{0xffff,0x09, 0xff, 0xff, 0x47, 0xff, 0xff, "Predictive failure"},/*power unit*/ +{0xffff,0x0c, 0xff, 0xff, 0x00, 0xff, 0xff, "Correctable ECC"}, /*memory*/ +{0xffff,0x0f, 0x06, 0xff, 0xff, 0xff, 0xff, "POST Code"}, +{0xffff,0x10, 0x09, 0xff, 0x42, 0x0f, 0xff, "Log Cleared"}, +{0xffff,0x10, 0x09, 0xff, 0xc0, 0x03, 0xff, "ECC Memory Errors"}, + /* Often see these 3 Boot records with reboot: + * 12 83 6f 05 00 ff = System/SEL Time Sync 1 (going down) + * 12 83 6f 05 80 ff = System/SEL Time Sync 2 (coming up) + * 12 83 6f 01 ff ff = OEM System Boot Event (Completed POST) */ +{0xffff,0x12, 0x83, 0xff, 0x05, 0x00, 0xff, "Boot: ClockSync 1"}, +{0xffff,0x12, 0x83, 0xff, 0x05, 0x80, 0xff, "Boot: ClockSync 2"}, +{0xffff,0x12, 0x83, 0xff, 0x01, 0xff, 0xff, "OEM System Booted"}, +{0xffff,0x12, 0x08, 0xff, 0x01, 0xff, 0xff, "OEM System Booted"}, /*ia64*/ +{0xffff,0x12, 0x00, 0x6f, 0xff, 0xff, 0xff, "PEF Action"}, /*ia64*/ +{0xffff,0x12, 0x83, 0x6f, 0x80, 0xff, 0xff, "System Reconfigured"}, /*BMC*/ +{0x00c0,0x0d, 0xff, 0x08, 0x00, 0xff, 0xff, "Device Removed"}, /*HSC*/ +{0x00c0,0x0d, 0xff, 0x08, 0x01, 0xff, 0xff, "Device Inserted"}, /*HSC*/ +{0xffff,0x14, 0xff, 0xff, 0x42, 0xff, 0xff, "Reset Button pressed"}, +{0xffff,0x14, 0xff, 0xff, 0x40, 0xff, 0xff, "Power Button pressed"}, +{0xffff,0x14, 0xff, 0xff, 0x01, 0xff, 0xff, "ID Button pressed"}, +{0xffff,0x23, 0xff, 0xff, 0x40, 0xff, 0xff, "Expired, no action"},/*watchdog2*/ +{0xffff,0x23, 0xff, 0xff, 0x41, 0xff, 0xff, "Hard Reset action"}, /*watchdog2*/ +{0xffff,0x23, 0xff, 0xff, 0x42, 0xff, 0xff, "Power down action"}, /*watchdog2*/ +{0xffff,0x23, 0xff, 0xff, 0x43, 0xff, 0xff, "Power cycle action"},/*watchdog2*/ +{0xffff,0x23, 0xff, 0xff, 0x48, 0xff, 0xff, "Timer interrupt"}, /*watchdog2*/ +{0xffff,0xf3, 0x85, 0xff, 0x41, 0xff, 0xff, "State is now OK"}, +{0xffff,0x20, 0x00, 0xff, 0xff, 0xff, 0xff, "OS Kernel Panic"}, +{0xffff,0xff, 0xff, 0x01, 0x57, 0xff, 0xff, "Hi Noncrit thresh"}, +{0xffff,0xff, 0xff, 0x01, 0x59, 0xff, 0xff, "Hi Crit thresh"}, +{0xffff,0xff, 0xff, 0x01, 0x50, 0xff, 0xff, "Lo Noncrit thresh"}, +{0xffff,0xff, 0xff, 0x01, 0x52, 0xff, 0xff, "Lo Crit thresh"}, +{0xffff,0xff, 0xff, 0x81, 0x57, 0xff, 0xff, "HiN thresh OK now"}, +{0xffff,0xff, 0xff, 0x81, 0x59, 0xff, 0xff, "HiC thresh OK now"}, +{0xffff,0xff, 0xff, 0x81, 0x50, 0xff, 0xff, "LoN thresh OK now"}, +{0xffff,0xff, 0xff, 0x81, 0x52, 0xff, 0xff, "LoC thresh OK now"} + /*Thresholds apply to sensor types 1=temp, 2=voltage, 4=fan */ + /*Note that last 2 bytes usu show actual & threshold values*/ + /*evtrg: 0x01=thresh, 0x81=restored */ +}; + +/*------------------------------------------------------------------------ + * get_misc_desc + * Uses the sens_desc array to decode misc entries not otherwise handled. + * Called by decode_sel_entry + *------------------------------------------------------------------------*/ +char * get_misc_desc(uchar type, uchar num, ushort genid, uchar trig, + uchar data1, uchar data2, uchar data3); +char * +get_misc_desc(uchar type, uchar num, ushort genid, uchar trig, + uchar data1, uchar data2, uchar data3) +{ + int i; + char *pstr = NULL; + + /* Use sens_desc array for other misc descriptions */ + data1 &= 0x0f; /*ignore top half of sensor offset for matching */ + for (i = 0; i < NSDESC; i++) { + if ((sens_desc[i].s_typ == 0xff) || + (sens_desc[i].s_typ == type)) { + if (sens_desc[i].s_num != 0xff && + sens_desc[i].s_num != num) + continue; + if (sens_desc[i].genid != 0xffff && + sens_desc[i].genid != genid) + continue; + if (sens_desc[i].evtrg != 0xff && + sens_desc[i].evtrg != trig) + continue; + if (sens_desc[i].data1 != 0xff && + (sens_desc[i].data1 & 0x0f) != data1) + continue; + if (sens_desc[i].data2 != 0xff && + sens_desc[i].data2 != data2) + continue; + if (sens_desc[i].data3 != 0xff && + sens_desc[i].data3 != data3) + continue; + /* have a match, use description */ + pstr = (char *)sens_desc[i].desc; + break; + } + } /*end for*/ + return(pstr); +} /* end get_misc_desc() */ + +void decode_sensor_event(uchar sensor_type, uchar sensor_number, ushort gen_id, + uchar event_trigger, uchar data1, uchar data2, uchar data3, + char *outbuf); +void +decode_sensor_event(uchar sensor_type, uchar sensor_number, ushort gen_id, + uchar event_trigger, uchar data1, uchar data2, uchar data3, + char *outbuf) +{ + char mystr[26] = "(123)"; /*for panic string*/ + char poststr[24] = "OEM Post Code = %x%x"; + char genstr[10] = "03 "; + char *gstr; + char *pstr; + uchar dtype; + int i; + + /* set dtype, used as array index below */ + if (sensor_type >= NSTYPES) dtype = 0; + else dtype = sensor_type; + switch(sensor_type) { + case 0x20: /*OS Crit Stop*/ + /* Show first 3 chars of panic string */ + mystr[0] = '('; + mystr[1] = sensor_number & 0x7f; + mystr[2] = data2 & 0x7f; + mystr[3] = data3 & 0x7f; + mystr[4] = ')'; + mystr[5] = 0; + pstr = mystr; + if (sensor_number & 0x80) strcat(mystr,"Oops!"); + if (data2 & 0x80) strcat(mystr,"Int!"); + if (data3 & 0x80) strcat(mystr,"NullPtr!"); + break; + case 0x0f: /*Post Errs*/ + switch (data1) + { + case 0x00: /* System firmware errors */ + i = data2; + if (i >= NFWERRS) i = NFWERRS - 1; + pstr = fwerrs[i].msg; + break; + case 0x01: /* System firmware hang */ + i = data2; + if (i >= NFWSTAT) i = NFWSTAT - 1; + sprintf(poststr,"hang, %s",fwstat[i].msg); + pstr = poststr; + break; + case 0x02: /* System firmware progress */ + i = data2; + if (i >= NFWSTAT) i = NFWSTAT - 1; + sprintf(poststr,"prog, %s",fwstat[i].msg); + pstr = poststr; + break; + case 0xa0: /* OEM post codes */ + /* OEM post codes in bytes 2 & 3 (lo-hi) */ + sprintf(poststr,"POST Code %02x%02x", + data3,data2); + pstr = poststr; + break; + default: + pstr = "POST Error"; /*default string*/ + } /*end switch(data1)*/ + break; + case 0x13: /*Crit Int*/ + i = data1 & 0x0f; + if (i >= NCRITS) i = NCRITS - 1; + pstr = crit_int_str[i]; + break; + case 0x21: /*Slot/Con*/ + i = data1 & 0x0f; + if (i >= NSLOTC) i = NSLOTC - 1; + sprintf(mystr,"%s",slot_str[i]); + /* could also decode data2/data3 here if valid */ + pstr = mystr; + break; + default: /* all other sensor types, see sens_desc */ + pstr = get_misc_desc( sensor_type, + sensor_number, gen_id, + event_trigger, data1, data2, data3); + if (pstr == NULL) { + mystr[0] = '-'; mystr[1] = 0; + pstr = mystr; + } + + } /*end switch(sensor_type)*/ + + /* show the Generator ID */ + sprintf(genstr,"%04x",gen_id); + gstr = genstr; /* default */ + for (i = 0; i < NGDESC; i++) + { + if (gen_desc[i].g_id == gen_id) + gstr = (char *)gen_desc[i].desc; + } + + /*firmware timestamp is #seconds since 1/1/1970 localtime*/ + /* timestamp handled by caller in HPI */ + + if ((event_trigger == 0x01) || /*threshold*/ + (event_trigger == 0x81)) { /*threshold ok*/ + sprintf(outbuf, + "%s %02x %s act=%02x thr=%02x", + sensor_types[dtype], sensor_number, pstr, + data2, /*actual reading*/ + data3 ); /*threshold value*/ + } else { + sprintf(outbuf, + "%s %02x %s %02x [%02x %02x %02x]", + sensor_types[dtype] , sensor_number, pstr, + event_trigger, data1, data2, data3 ); + } +} + +/*------------------------------------------------------------------------ + * decode_ipmi_event + * Parse and decode the SEL record into readable format. + * This routine is constructed so that it could be used as a library + * function. + * Input: psel, a pointer to the IPMI SEL record + * Output: outbuf, a description of the event, max 80 chars. + * Called by ReadSEL + *------------------------------------------------------------------------*/ +void decode_ipmi_event( SEL_RECORD *psel, char *outbuf); +void decode_ipmi_event( SEL_RECORD *psel, char *outbuf) +{ + char genstr[10] = "03 "; + int i, j; + + if (psel->record_type >= 0xe0) { /*OEM Record 26.3*/ + char *pc; + pc = (char *)&psel->timestamp; /*bytes 4:16*/ + sprintf(outbuf," OEM Event %02x %02x ", pc[0], pc[1]); + j = strlen(outbuf); + for (i = 2; i < 13; i++) { /* 4:16 = 13 bytes data */ + if (psel->record_type == 0xf0) { + /* panic string will be type 0xf0 */ + if (pc[i] == 0) break; + outbuf[j++] = pc[i]; + } else { + sprintf(&outbuf[j],"%02x ",pc[i]); + j += 3; + } + } + outbuf[j++] = '\n'; + outbuf[j++] = 0; + } else if (psel->record_type == 0x02) { + /* most records are record type 2 */ + decode_sensor_event(psel->sensor_type, + psel->sensor_number, psel->generator_id, + psel->event_trigger, psel->event_data1, + psel->event_data2, psel->event_data3, outbuf); + + } /*endif type 2 */ + else { /* other misc record type */ + uchar *pc; + pc = (uchar *)&psel->record_type; + sprintf(outbuf," Type%02x ", pc[0]); + j = strlen(outbuf); + for (i = 1; i < 14; i++) { + sprintf(genstr,"%02x ",pc[i]); + strcat(outbuf,genstr); + } + } /*endif misc type*/ + return; +} /*end decode_ipmi_event()*/ + +#define IF_IPMI 0 /* other interfaces, like H8, have diff numbers */ + /*Note that OpenHPI 2.0.0 does not yet fill this in*/ + +/*------------------------------------------------------------------------ + * decode_hpi_event + * Parse and decode the SensorEvent record into readable format. + * Input: pevent, a pointer to the HPI SensorEvent record + * Output: outbuf, a description of the event, max 80 chars. + * Called by ReadSEL + *------------------------------------------------------------------------*/ +void decode_hpi_event( SaHpiSensorEventT *pevent, char *outbuf); +void decode_hpi_event( SaHpiSensorEventT *pevent, char *outbuf) +{ + int ec, eci; + int es, esi; + int styp; + uchar data1, data2, data3, if_type; + uchar etrig; + ushort genid; + char estag[8]; + char sbuf[80]; + char *ecstr; + // char *pstr; + + /* decode event category */ + ec = pevent->EventCategory; + for (eci = 0; eci < NUM_EC; eci++) + if (eventcats[eci].val == ec) break; + if (eci >= NUM_EC) eci = 0; + ecstr = eventcats[eci].str; + genid = 0x0020; /* default to BMC */ + etrig = 0x6f; /* default to sensor-specific*/ + /* decode event state */ + es = pevent->EventState; + if (ec == SAHPI_EC_USER) { /*OpenHPI usu returns this (0x7e)*/ + sprintf(estag,"%02x",es); + } else if (eci == SAHPI_EC_THRESHOLD ) { /*0x01*/ + for (esi = 0; esi < NUM_ES; esi++) + if (eventstates[esi].val == es) break; + if (esi >= NUM_ES) esi = 0; + strcpy(estag,eventstates[esi].str); + if (pevent->Assertion) etrig = 0x01; + else etrig = 0x81; + } else { + sprintf(estag,"%02x:%02x",ec,es); + } + + /* decode sensor type */ + styp = pevent->SensorType; + if (styp >= NSTYPES) { styp = 0; } + + /* get if_type from SensorSpecific h.o. byte */ + if_type = (pevent->SensorSpecific & 0xff000000) >> 24; + data3 = (pevent->SensorSpecific & 0x00ff0000) >> 16; + data2 = (pevent->SensorSpecific & 0x0000ff00) >> 8; + data1 = (pevent->SensorSpecific & 0x000000ff); + if (if_type == IF_IPMI) { /* handle IPMI SensorSpecific stuff */ + /* fortunately, HPI & IPMI have the same sensor_type values */ + decode_sensor_event(styp, pevent->SensorNum, genid, + etrig, data1, data2, data3, sbuf); + sprintf(outbuf,"%s %s", estag, sbuf); + } + else { + sprintf(outbuf,"%s, %s %s %x [%02x %02x %02x]", + sensor_types[styp], ecstr, estag, + pevent->SensorNum, data1, data2, data3); + } + + return; +} + +static +char *decode_error(SaErrorT code) +{ + int i; + char *str = NULL; + for (i = 0; i < NECODES; i++) { + if (code == ecodes[i].code) { str = ecodes[i].str; break; } + } + if (str == NULL) { + sprintf(&def_estr[10],"%d",code); + str = &def_estr[0]; + } + return(str); +} + +void ShowSel( SaHpiSelEntryT *sel, SaHpiRdrT *rdr, SaHpiRptEntryT *rptentry); +void ShowSel( SaHpiSelEntryT *sel, SaHpiRdrT *rdr, + SaHpiRptEntryT *rptentry ) +{ + unsigned char evtype; + char timestr[40]; + time_t tt1; + char *srctag; + char *rdrtag; + char *pstr; + unsigned char *pd; + int outlen; + char outbuf[132]; + int styp; + unsigned char data3; + + /*format & print the EventLog entry*/ + if (sel->Event.Timestamp > SAHPI_TIME_MAX_RELATIVE) { /*absolute time*/ + tt1 = sel->Event.Timestamp / 1000000000; + strftime(timestr,sizeof(timestr),"%x %H:%M:%S", localtime(&tt1)); + } else if (sel->Event.Timestamp > SAHPI_TIME_UNSPECIFIED) { /*invalid time*/ + strcpy(timestr,"invalid time "); + } else { /*relative time*/ + tt1 = sel->Event.Timestamp / 1000000000; + sprintf(timestr,"rel(%lx)", (unsigned long)tt1); + } + if (rptentry->ResourceId == sel->Event.Source) + srctag = rptentry->ResourceTag.Data; + else srctag = "unspec "; /* SAHPI_UNSPECIFIED_RESOURCE_ID */ + evtype = sel->Event.EventType; + if (evtype > NEVTYPES) evtype = NEVTYPES - 1; + if (rdr->RdrType == SAHPI_NO_RECORD) rdrtag = "rdr-unkn"; + else { + rdr->IdString.Data[rdr->IdString.DataLength] = 0; + rdrtag = &rdr->IdString.Data[0]; + } + sprintf(outbuf,"%04x %s %s ", sel->EntryId, timestr, evtypes[evtype] ); + outlen = strlen(outbuf); + pstr = ""; +#ifdef HPI_A + pd = &sel->Event.EventDataUnion.UserEvent.UserEventData[0]; +#else + pd = &sel->Event.EventDataUnion.UserEvent.UserEventData.Data[0]; +#endif + + switch(evtype) + { + case SAHPI_ET_SENSOR: /*Sensor*/ + pd = (void *)&(sel->Event.EventDataUnion.SensorEvent); + decode_hpi_event((void *)pd,&outbuf[outlen]); + break; + case SAHPI_ET_USER: /*User, usu 16-byte IPMI SEL record */ + decode_ipmi_event((void *)pd,&outbuf[outlen]); + break; + default: + // decode_ipmi_event((void *)pd,&outbuf[outlen]); + styp = pd[10]; + data3 = pd[15]; + /* *sel->Event.EventDataUnion.SensorEvent.SensorSpecific+1 */ + if (styp >= NSTYPES) { + if (fdebug) printf("sensor type %d >= max %d\n",styp,NSTYPES); + styp = 0; + } + pstr = (char *)sensor_types[styp]; + sprintf(&outbuf[outlen], "%s, %x %x, %02x %02x %02x [%02x %02x %02x/%02x]", + pstr, pd[0], pd[7], pd[10], pd[11], pd[12], + pd[13], pd[14], pd[15], data3); + break; + } + printf("%s\n",outbuf); +} + +static SaErrorT +DoEventLogForResource(SaHpiSessionIdT sessionid, + SaHpiResourceIdT resourceid, + char *tagname) +{ + SaErrorT rv; + SaHpiSelInfoT info; + int free = 50; + SaHpiSelEntryIdT entryid; + SaHpiSelEntryIdT nextentryid; + SaHpiSelEntryIdT preventryid; + SaHpiSelEntryT sel; + SaHpiRdrT rdr; + SaHpiRptEntryT rptentry; + + printf("rptentry[%d] tag: %s\n", resourceid, tagname); + + rv = saHpiEventLogInfoGet(sessionid, resourceid, &info); + if (fdebug) + printf("saHpiEventLogInfoGet %s\n", decode_error(rv)); + if (rv == SA_OK) { + free = info.Size - info.Entries; + printf("EventLog entries=%d, size=%d, enabled=%d, free=%d\n", + info.Entries, info.Size, info.Enabled, free); + } + + entryid = SAHPI_OLDEST_ENTRY; + while ((rv == SA_OK) && (entryid != SAHPI_NO_MORE_ENTRIES)) + { + /* rv = saHpiEventLogEntryGet(sessionid,SAHPI_DOMAIN_CONTROLLER_ID,entryid, */ + rv = saHpiEventLogEntryGet(sessionid, resourceid, entryid, + &preventryid, &nextentryid, &sel, &rdr, &rptentry); + if (fdebug) + printf("saHpiEventLogEntryGet[%x] %s, next=%x\n", + entryid, decode_error(rv), nextentryid); + if (rv == SA_OK) { + ShowSel(&sel, &rdr, &rptentry); + if (entryid == nextentryid) + break; + preventryid = entryid; + entryid = nextentryid; + } + } + + if (free < 6) { + /* + * This test could be more generic if the log info fields above + * were accurate. IPMI SEL logs have a fixed size of 0x10000 + * bytes. New log records are thrown away when it gets full. + * (OLDEST = 0, NO_MORE = fffffffe , so these are ok.) + */ + /* free = (0x10000 - 20) - preventryid; */ + printf( "WARNING: Log free space is very low (%d records)\n" + " Clear log with hpisel -c\n", free); + } + + return SA_OK; +} + +int +main(int argc, char **argv) +{ + int c; + SaErrorT rv; + SaHpiSessionIdT sessionid; +#ifdef HPI_A + SaHpiVersionT hpiVer; + SaHpiRptInfoT rptinfo; +#endif + SaHpiRptEntryT rptentry; + SaHpiEntryIdT rptentryid; + SaHpiEntryIdT nextrptentryid; + SaHpiResourceIdT resourceid; + + printf("%s: version %s\n",argv[0],progver); + +#ifdef HPI_A +#define ARGSTR "cx?" +#else +#define ARGSTR "cdx?" +#endif + + while ( (c = getopt( argc, argv, ARGSTR)) != EOF ) + switch(c) { + case 'c': fclear = 1; break; +#ifndef HPI_A + case 'd': fdomain = 1; break; +#endif + case 'x': fdebug = 1; break; + default: + printf("Usage %s [-cx]\n",argv[0]); + printf("where -c clears the event log\n"); +#ifndef HPI_A + printf(" -d displays the domain event log\n"); +#endif + printf(" -x displays eXtra debug messages\n"); + exit(1); + } +#ifdef HPI_A + rv = saHpiInitialize(&hpiVer); + if (rv != SA_OK) { + printf("saHpiInitialize: %s\n",decode_error(rv)); + exit(-1); + } + rv = saHpiSessionOpen(SAHPI_DEFAULT_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + if (rv == SA_ERR_HPI_ERROR) + printf("saHpiSessionOpen: error %d, SpiLibd not running\n",rv); + else + printf("saHpiSessionOpen: %s\n",decode_error(rv)); + exit(-1); + } + rv = saHpiResourcesDiscover(sessionid); + if (fdebug) printf("saHpiResourcesDiscover %s\n",decode_error(rv)); + rv = saHpiRptInfoGet(sessionid,&rptinfo); + if (fdebug) printf("saHpiRptInfoGet %s\n",decode_error(rv)); + printf("RptInfo: UpdateCount = %x, UpdateTime = %lx\n", + rptinfo.UpdateCount, (unsigned long)rptinfo.UpdateTimestamp); +#else + rv = saHpiSessionOpen(SAHPI_UNSPECIFIED_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + printf("saHpiSessionOpen: %s\n",decode_error(rv)); + exit(-1); + } + rv = saHpiDiscover(sessionid); + if (fdebug) printf("saHpiDiscover %s\n",decode_error(rv)); +#endif + +#ifndef HPI_A + if (fdomain != 0) /* saw option for domain event log */ + { + /* resourceid = 1; * oh_get_default_domain_id() */ + resourceid = SAHPI_UNSPECIFIED_DOMAIN_ID; + if (fclear) { + rv = saHpiEventLogClear(sessionid,resourceid); + if (rv == SA_OK) printf("Domain EventLog successfully cleared\n"); + else printf("Domain EventLog clear, error = %d\n",rv); + } else { + rv = DoEventLogForResource(sessionid, resourceid, "Domain Event Log"); + } + } + else /* walk the RPT list */ +#endif + { + rptentryid = SAHPI_OLDEST_ENTRY; + while ((rv == SA_OK) && (rptentryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRptEntryGet(sessionid,rptentryid,&nextrptentryid,&rptentry); + if (fdebug) + printf("saHpiRptEntryGet[%d] %s\n",rptentryid,decode_error(rv)); + if (rv != SA_OK) + goto skip_to_next; + resourceid = rptentry.ResourceId; + if (fdebug) printf("RPT %x capabilities = %x\n", resourceid, + rptentry.ResourceCapabilities); + if ((rptentry.ResourceCapabilities & SAHPI_CAPABILITY_SEL) == 0) + goto skip_to_next; + if (fclear) { + rv = saHpiEventLogClear(sessionid,resourceid); + if (rv == SA_OK) printf("EventLog successfully cleared\n"); + else printf("EventLog clear, error = %d\n",rv); + break; + } + // rptentry.ResourceTag.Data[rptentry.ResourceTag.DataLength] = 0; + + rv = DoEventLogForResource(sessionid, resourceid, + rptentry.ResourceTag.Data); + skip_to_next: + rptentryid = nextrptentryid; + } + } + + rv = saHpiSessionClose(sessionid); +#ifdef HPI_A + rv = saHpiFinalize(); +#endif + + exit(0); +} + +/* end hpisel.c */ diff --git a/hpiutil/hpisensor.c b/hpiutil/hpisensor.c new file mode 100644 index 0000000..f7eef8f --- /dev/null +++ b/hpiutil/hpisensor.c @@ -0,0 +1,467 @@ +/* + * hpisensor.c + * + * Author: Andy Cress arcress at users.sourceforge.net + * Copyright (c) 2003 Intel Corporation. + * + * 04/15/03 Andy Cress - created + * 04/17/03 Andy Cress - mods for resourceid, first good run + * 04/28/03 Andy Cress - adding Convert + * 05/02/03 Andy Cress v0.6 more Convert changes in ShowSensor (e.g. units) + * 06/06/03 Andy Cress v0.7 add more units, and buffer type + * 06/09/03 Andy Cress v0.8 added more for Compact Sensors + * 06/26/03 Andy Cress v1.0 added -t for thresholds + * 02/19/04 Andy Cress v1.1 recognize common errors for Compact & mBMC sensors. + * 10/14/04 Andy Cress v1.2 added HPI_A/HPI_B logic + * 01/07/05 Andy Cress v1.3 added HPI_B sleep for OpenHPI bug + */ +/*M* +Copyright (c) 2003, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + a.. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b.. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + c.. Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *M*/ + +#include +#include +#include +#include +#include +#include "SaHpi.h" + +#ifdef HPI_A +char progver[] = "1.3 HPI-A"; +#else +char progver[] = "1.3 HPI-B"; +#endif +int fdebug = 0; +int fshowthr = 0; +char *rtypes[5] = {"None ", "Control ", "Sensor ", "Invent ", "Watchdog"}; + +#define NSU 77 +char *units[NSU] = { +"units", "degrees C", "degrees F", "degrees K", "volts", "amps", +"watts", "joules", "coulombs", "va", "nits", "lumen", +"lux", "candela", "kpa", "psi", "newton", "cfm", +"rpm", "Hz", "us", "ms", "sec", "min", +"hours", "days", "weeks", "mil", "in", "ft", +/*30*/ "cu in", "cu ft", "mm", "cm", "m", "cu cm", "cu m", +"liters", "fl oz", "radians", "sterad", "rev", +"cycles", "grav", "oz", "lbs", "ft lb", "oz in", "gauss", +"gilberts", "henry", "mhenry", "farad", "ufarad", "ohms", +/*55*/ "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "Gb", +/*70*/ "bytes", "KB", "MB", "GB", +/*74*/ "", "", "line" +}; + +#define NECODES 27 +struct { int code; char *str; +} ecodes[NECODES] = { + { 0, "Success" }, + { -1001, "HPI unspecified error" }, + { -1002, "HPI unsupported function" }, + { -1003, "HPI busy" }, + { -1004, "HPI request invalid" }, + { -1005, "HPI command invalid" }, + { -1006, "HPI timeout" }, + { -1007, "HPI out of space" }, + { -1008, "HPI data truncated" }, +#ifdef HPI_A + { -1009, "HPI data length invalid" }, +#else + { -1009, "HPI invalid parameter" }, +#endif + { -1010, "HPI data exceeds limits" }, + { -1011, "HPI invalid params" }, + { -1012, "HPI invalid data" }, + { -1013, "HPI not present" }, + { -1014, "HPI invalid data field" }, + { -1015, "HPI invalid sensor command" }, + { -1016, "HPI no response" }, + { -1017, "HPI duplicate request" }, + { -1018, "HPI updating" }, + { -1019, "HPI initializing" }, + { -1020, "HPI unknown error" }, + { -1021, "HPI invalid session" }, + { -1022, "HPI invalid domain" }, + { -1023, "HPI invalid resource id" }, + { -1024, "HPI invalid request" }, + { -1025, "HPI entity not present" }, + { -1026, "HPI uninitialized" } +}; +char def_estr[15] = "HPI error %d "; + +static +char *decode_error(SaErrorT code) +{ + int i; + char *str = NULL; + for (i = 0; i < NECODES; i++) { + if (code == ecodes[i].code) { str = ecodes[i].str; break; } + } + if (str == NULL) { + sprintf(&def_estr[10],"%d",code); + str = &def_estr[0]; + } + return(str); +} + +static +void ShowSensor( + SaHpiSessionIdT sessionid, + SaHpiResourceIdT resourceid, + SaHpiSensorRecT *sensorrec ) +{ + SaHpiSensorNumT sensornum; + SaHpiSensorReadingT reading; + SaHpiSensorThresholdsT senstbuff; +#ifdef HPI_A + SaHpiSensorReadingT conv_reading; +#else + SaHpiEventStateT evtstate; +#endif + SaErrorT rv; + char *unit; + int i; + + sensornum = sensorrec->Num; +#ifdef HPI_A + rv = saHpiSensorReadingGet(sessionid,resourceid, sensornum, &reading); +#else + rv = saHpiSensorReadingGet(sessionid,resourceid, sensornum, &reading,&evtstate); +#endif + /* ReadingGet returns -1024 if SDR type is mBMC */ + if (!fdebug && rv == SA_ERR_HPI_INVALID_REQUEST) { + printf(" = no reading\n"); + return; + } else if (rv != SA_OK) { + printf("ReadingGet ret=%d\n", rv); + return; + } + +#ifdef HPI_A + if ((reading.ValuesPresent & SAHPI_SRF_INTERPRETED) == 0) { + if ((reading.ValuesPresent & SAHPI_SRF_RAW) == 0) { + /* no raw or interpreted, so just show event status */ + /* This is a Compact Sensor */ + if (reading.ValuesPresent & SAHPI_SRF_EVENT_STATE) + printf(" = %x %x\n", reading.EventStatus.SensorStatus, + reading.EventStatus.EventStatus); + else printf(" = no reading\n"); + return; + } else { + /* have raw, but not interpreted, so try convert. */ + rv = saHpiSensorReadingConvert(sessionid, resourceid, sensornum, + &reading, &conv_reading); + if (rv != SA_OK) { + /* conv rv=-1012 on Compact sensors */ + if (!fdebug && rv == SA_ERR_HPI_INVALID_DATA) + printf(" = %02x raw\n", reading.Raw); + else printf("raw=%x conv_ret=%d\n", reading.Raw, rv); + /* printf("conv_rv=%s\n", decode_error(rv)); */ + return; + } + else { + if (fdebug) printf("conv ok: raw=%x conv=%x\n", reading.Raw, + conv_reading.Interpreted.Value.SensorUint32); + reading.Interpreted.Type = conv_reading.Interpreted.Type; + if (reading.Interpreted.Type == SAHPI_SENSOR_INTERPRETED_TYPE_BUFFER) + { + memcpy(reading.Interpreted.Value.SensorBuffer, + conv_reading.Interpreted.Value.SensorBuffer, + 4); /* SAHPI_SENSOR_BUFFER_LENGTH); */ + /* IPMI 1.5 only returns 4 bytes */ + } else + reading.Interpreted.Value.SensorUint32 = + conv_reading.Interpreted.Value.SensorUint32; + } + } + } + /* Also show units of interpreted reading */ + i = sensorrec->DataFormat.BaseUnits; + if (i >= NSU) i = 0; + unit = units[i]; + switch(reading.Interpreted.Type) + { + case SAHPI_SENSOR_INTERPRETED_TYPE_FLOAT32: + printf(" = %5.2f %s\n", + reading.Interpreted.Value.SensorFloat32,unit); + break; + case SAHPI_SENSOR_INTERPRETED_TYPE_UINT32: + printf(" = %d %s\n", + reading.Interpreted.Value.SensorUint32, unit); + break; + case SAHPI_SENSOR_INTERPRETED_TYPE_BUFFER: + printf(" = %02x %02x %02x %02x\n", + reading.Interpreted.Value.SensorBuffer[0], + reading.Interpreted.Value.SensorBuffer[1], + reading.Interpreted.Value.SensorBuffer[2], + reading.Interpreted.Value.SensorBuffer[3]); + break; + default: + printf(" = %x (itype=%x)\n", + reading.Interpreted.Value.SensorUint32, + reading.Interpreted.Type); + } + + if (fshowthr) { /* Show thresholds, if any */ +#ifdef SHOWMAX + if ( sensorrec->DataFormat.Range.Flags & SAHPI_SRF_MAX ) + printf( " Max of Range: %5.2f\n", + sensorrec->DataFormat.Range.Max.Interpreted.Value.SensorFloat32); + if ( sensorrec->DataFormat.Range.Flags & SAHPI_SRF_MIN ) + printf( " Min of Range: %5.2f\n", + sensorrec->DataFormat.Range.Min.Interpreted.Value.SensorFloat32); +#endif + if ((!sensorrec->Ignore) && (sensorrec->ThresholdDefn.IsThreshold)) { + rv = saHpiSensorThresholdsGet(sessionid, resourceid, + sensornum, &senstbuff); + if (rv != 0) { printf("ThresholdsGet ret=%d\n", rv); return; } + printf( "\t\t\t"); + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_LOW_MINOR ) { + printf( "LoMin %5.2f ", + senstbuff.LowMinor.Interpreted.Value.SensorFloat32); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_LOW_MAJOR ) { + printf( "LoMaj %5.2f ", + senstbuff.LowMajor.Interpreted.Value.SensorFloat32); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_LOW_CRIT ) { + printf( "LoCri %5.2f ", + senstbuff.LowCritical.Interpreted.Value.SensorFloat32); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_UP_MINOR ) { + printf( "HiMin %5.2f ", + senstbuff.UpMinor.Interpreted.Value.SensorFloat32); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_UP_MAJOR ) { + printf( "HiMaj %5.2f ", + senstbuff.UpMajor.Interpreted.Value.SensorFloat32); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_UP_CRIT ) { + printf( "HiCri %5.2f ", + senstbuff.UpCritical.Interpreted.Value.SensorFloat32); + } +#ifdef SHOWMAX + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_UP_HYSTERESIS ) { + printf( "Hi Hys %5.2f ", + senstbuff.PosThdHysteresis.Interpreted.Value.SensorFloat32); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_LOW_HYSTERESIS ) { + printf( "Lo Hys %5.2f ", + senstbuff.NegThdHysteresis.Interpreted.Value.SensorFloat32); + } +#endif + printf( "\n"); + } /* endif valid threshold */ + } /* endif showthr */ + +#else /* HPI_B: HPI B.01.01 logic */ + i = sensorrec->DataFormat.BaseUnits; + if (i >= NSU) i = 0; + unit = units[i]; + switch(reading.Type) + { + case SAHPI_SENSOR_READING_TYPE_FLOAT64: + printf(" = %5.2f %s\n", + reading.Value.SensorFloat64,unit); + break; + case SAHPI_SENSOR_READING_TYPE_UINT64: + printf(" = %lld %s\n", + reading.Value.SensorUint64, unit); + break; + case SAHPI_SENSOR_READING_TYPE_INT64: + printf(" = %lld %s\n", + reading.Value.SensorInt64, unit); + break; + case SAHPI_SENSOR_READING_TYPE_BUFFER: + printf(" = %02x %02x %02x %02x\n", + reading.Value.SensorBuffer[0], + reading.Value.SensorBuffer[1], + reading.Value.SensorBuffer[2], + reading.Value.SensorBuffer[3]); + break; + default: + printf(" = %llx (itype=%x)\n", + reading.Value.SensorUint64, + reading.Type); + } + if (fshowthr) { /* Show thresholds, if any */ + if (sensorrec->ThresholdDefn.IsAccessible) { + rv = saHpiSensorThresholdsGet(sessionid, resourceid, + sensornum, &senstbuff); + if (rv != SA_OK) { printf("ThresholdsGet ret=%d\n", rv); + } else { + printf( "\t\t\t"); + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_LOW_MINOR ) { + printf( "LoMin %5.2f ", + senstbuff.LowMinor.Value.SensorFloat64); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_LOW_MAJOR ) { + printf( "LoMaj %5.2f ", + senstbuff.LowMajor.Value.SensorFloat64); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_LOW_CRIT ) { + printf( "LoCri %5.2f ", + senstbuff.LowCritical.Value.SensorFloat64); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_UP_MINOR ) { + printf( "HiMin %5.2f ", + senstbuff.UpMinor.Value.SensorFloat64); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_UP_MAJOR ) { + printf( "HiMaj %5.2f ", + senstbuff.UpMajor.Value.SensorFloat64); + } + if ( sensorrec->ThresholdDefn.ReadThold & SAHPI_STM_UP_CRIT ) { + printf( "HiCri %5.2f ", + senstbuff.UpCritical.Value.SensorFloat64); + } + printf( "\n"); + } /*endif get ok*/ + } /* endif valid threshold */ + } /* endif showthr */ +#endif + return; +} /*end ShowSensor*/ + +int +main(int argc, char **argv) +{ + int c; + SaErrorT rv; + SaHpiSessionIdT sessionid; +#ifdef HPI_A + SaHpiVersionT hpiVer; + SaHpiRptInfoT rptinfo; +#endif + SaHpiRptEntryT rptentry; + SaHpiEntryIdT rptentryid; + SaHpiEntryIdT nextrptentryid; + SaHpiEntryIdT entryid; + SaHpiEntryIdT nextentryid; + SaHpiResourceIdT resourceid; + SaHpiRdrT rdr; + + printf("%s: version %s\n",argv[0],progver); + + while ( (c = getopt( argc, argv,"tx?")) != EOF ) + switch(c) { + case 't': fshowthr = 1; break; + case 'x': fdebug = 1; break; + default: + printf("Usage %s [-t -x]\n",argv[0]); + printf("where -t = show Thresholds also\n"); + printf(" -x = show eXtra debug messages\n"); + exit(1); + } + if (fdebug) printf("fshowthr = %d, fdebug = %d\n",fshowthr,fdebug); +#ifdef HPI_A + rv = saHpiInitialize(&hpiVer); + if (rv != SA_OK) { + printf("saHpiInitialize: %s\n",decode_error(rv)); + exit(-1); + } + rv = saHpiSessionOpen(SAHPI_DEFAULT_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + if (rv == SA_ERR_HPI_ERROR) + printf("saHpiSessionOpen: error %d, SpiLibd not running\n",rv); + else + printf("saHpiSessionOpen: %s\n",decode_error(rv)); + exit(-1); + } + if (fdebug) printf("Starting Discovery ...\n"); + rv = saHpiResourcesDiscover(sessionid); + if (fdebug) printf("saHpiResourcesDiscover %s\n",decode_error(rv)); + rv = saHpiRptInfoGet(sessionid,&rptinfo); + if (fdebug) printf("saHpiRptInfoGet %s\n",decode_error(rv)); + printf("RptInfo: UpdateCount = %x, UpdateTime = %lx\n", + rptinfo.UpdateCount, (unsigned long)rptinfo.UpdateTimestamp); +#else + rv = saHpiSessionOpen(SAHPI_UNSPECIFIED_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + printf("saHpiSessionOpen: %s\n",decode_error(rv)); + exit(-1); + } + if (fdebug) printf("Starting Discovery ...\n"); + rv = saHpiDiscover(sessionid); + if (fdebug) printf("saHpiDiscover %s\n",decode_error(rv)); + if (fshowthr) { + /* + * If OpenHPI, we need to wait extra time before doing + * ThresholdsGet because its discovery isn't really done. + */ + sleep(5); + } +#endif + + /* walk the RPT list */ + rptentryid = SAHPI_FIRST_ENTRY; + while ((rv == SA_OK) && (rptentryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRptEntryGet(sessionid,rptentryid,&nextrptentryid,&rptentry); + if (fdebug) printf("saHpiRptEntryGet %s\n",decode_error(rv)); + if (rv == SA_OK) { + /* walk the RDR list for this RPT entry */ + entryid = SAHPI_FIRST_ENTRY; + resourceid = rptentry.ResourceId; +#ifdef HPI_A + rptentry.ResourceTag.Data[rptentry.ResourceTag.DataLength] = 0; +#endif + printf("rptentry[%d] resourceid=%d tag: %s\n", + rptentryid,resourceid, rptentry.ResourceTag.Data); + while ((rv == SA_OK) && (entryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRdrGet(sessionid,resourceid, + entryid,&nextentryid, &rdr); + if (fdebug) printf("saHpiRdrGet[%d] rv = %d\n",entryid,rv); + if (rv == SA_OK) { + char *eol; + rdr.IdString.Data[rdr.IdString.DataLength] = 0; + if (rdr.RdrType == SAHPI_SENSOR_RDR) eol = " \t"; + else eol = "\n"; + printf("RDR[%02d]: %s %s %s",rdr.RecordId, + rtypes[rdr.RdrType],rdr.IdString.Data,eol); + if (rdr.RdrType == SAHPI_SENSOR_RDR) { + ShowSensor(sessionid,resourceid, + &rdr.RdrTypeUnion.SensorRec); + } + entryid = nextentryid; + } + } + rptentryid = nextrptentryid; + } + } + + rv = saHpiSessionClose(sessionid); +#ifdef HPI_A + rv = saHpiFinalize(); +#endif + + exit(0); + return(0); +} + +/* end hpisensor.c */ diff --git a/hpiutil/hpiutil.spec b/hpiutil/hpiutil.spec new file mode 100644 index 0000000..9fe7a5e --- /dev/null +++ b/hpiutil/hpiutil.spec @@ -0,0 +1,199 @@ +Name: hpiutil +%define Version 1.1.11 +Version: %Version +Release: 1 +Summary: Contains HPI server management utilities and library. +License: BSD +Group: System/Management +Source: hpiutil-%Version.tar.gz +URL: http://ipmiutil.sourceforge.net +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +BuildRequires: gcc + +%ifarch x86_pentium3 +AutoReqProv: No +%endif +%ifarch x86_pentium4 +AutoReqProv: No +%endif + +%description +The HPI utilities package provides system management utilities that +conform to the SA Forum's Hardware Platform Interface specification, and +as such are hardware-independent across platforms that have an HPI +library implementation. The HPI library on Intel platforms requires +an IPMI driver. An IPMI driver can be provided by either the Intel +IPMI driver (/dev/imb) or the OpenIPMI driver (/dev/ipmi0) in Linux +kernel versions 2.4.20 and greater. + +This package includes the HPI binary libraries and the following +HPI utilities. + hpisensor + hpisel + hpireset + hpiwdt + hpifru + hpialarmpanel + +%prep +#%setup -q + +#%build +#sh configure +#make + +#%install +#RPM_BUILD_ROOT=`pwd` +#make DESTDIR=${RPM_BUILD_ROOT} install +#( cd ${RPM_BUILD_ROOT}/usr/man/man8; gzip -f *.8 ) + +%files +%defattr(0755,root,root) +/usr/bin/hpifru +/usr/bin/hpisensor +/usr/bin/hpialarmpanel +/usr/bin/hpisel +/usr/bin/hpiwdt +/usr/bin/hpireset +/usr/bin/SpiLibd +/usr/lib/libSaHpi.so +/usr/lib/libSpiDaemonCore.so +/usr/lib/libSpiModGeneric.so +/usr/lib/libSpiModIpmi.so +/usr/lib/libSpiModIpmi.so-open +/usr/lib/libSpiIpmiImb.so +/usr/lib/libSpiIpmiOpenIpmi.so +/usr/lib/libSpiTsdMaplx.so +/etc/hpi/hpiinit.sh +/usr/share/hpiutil/env.hpi +%defattr(0664,root,root) +/usr/share/hpiutil/README +/usr/share/hpiutil/COPYING +/etc/hpi/spi-daemon.conf +/etc/hpi/spi-lib.conf +# %defattr(-,root,root) +# %doc README TODO COPYING ChangeLog + +%pre +# before install +sdir=/usr/share/hpiutil +edir=/etc/hpi +echo "Installing HPI Utilities ..." +mkdir -p $sdir +mkdir -p $edir + +# Check for an IPMI driver +rpm -qa |grep ipmidrvr >/dev/null +if [ $? -ne 0 ] +then + # Intel ipmidrvr package is not installed, but other IPMI drivers + # could also be used, so test for device files. + dev1=/dev/imb + dev2=/dev/ipmi0 + dev3=/dev/ipmi/0 + dev4=/dev/ipmikcs + if [ ! -c $dev1 ] + then + if [ ! -c $dev2 ] + then + if [ ! -c $dev3 ] + then + echo "WARNING: No IPMI devices found ($dev1, $dev2 or $dev3)." + echo "The HPI utilities depend on an IPMI driver. " + fi + fi + fi +fi + +%post +# after install +sdir=/usr/share/hpiutil +edir=/etc/hpi + +echo "hpiutil install started `date`" +# Assumes that the kernel modules are already in place. + +# The spi-daemon.conf file should have 'localhost' as the +# server name. User can modify this if remote. + +# set up the init.d jobs +loadhpi=/etc/hpi/hpiinit.sh +if [ -d /etc/rc.d/init.d ] +then + # RedHat init.d structure + cd /etc/rc.d/init.d + cp $loadhpi ./hpi + echo "To autostart hpi, enter: chkconfig --add hpi" +# chkconfig --add hpi +# Or manually create links +# cd ../rc3.d +# ln -s ../init.d/hpi S81hpi 2>/dev/null +# ln -s ../init.d/hpi K35hpi 2>/dev/null +# cd ../rc5.d +# ln -s ../init.d/hpi S81hpi 2>/dev/null +# ln -s ../init.d/hpi K35hpi 2>/dev/null +# cd ../rc6.d +# ln -s ../init.d/hpi K35hpi 2>/dev/null +# cd ../rc0.d +# ln -s ../init.d/hpi K35hpi 2>/dev/null +else + # SuSE init.d structure + cd /etc/init.d + cp $loadhpi ./hpi + echo "To autostart hpi, enter: /usr/lib/lsb/install_initd /etc/init.d/hpi " +# /usr/lib/lsb/install_initd /etc/init.d/hpi +# Or manually create links +# cd rc3.d +# ln -s ../hpi S81hpi 2>/dev/null +# ln -s ../hpi K35hpi 2>/dev/null +# cd ../rc5.d +# ln -s ../hpi S81hpi 2>/dev/null +# ln -s ../hpi K35hpi 2>/dev/null +# cd ../rc6.d +# ln -s ../hpi K35hpi 2>/dev/null +# cd ../rc0.d +# ln -s ../hpi K35hpi 2>/dev/null +fi + +echo "done `date`" + +%preun +# before uninstall +echo "Uninstalling HPI Utilities feature ..." +/etc/hpi/hpiinit.sh stop 2>/dev/null + +%postun +# after uninstall, clean up anything left over +sdir=/usr/share/hpiutil +edir=/etc/hpi +tmped=/tmp/edmk.tmp + +if [ -d /etc/rc.d/init.d ] +then + # RedHat init.d structure +# chkconfig --del hpi + cd /etc/rc.d/init.d + rm -f hpi ../rc?.d/S81hpi ../rc?.d/K35hpi +else + # SuSE init.d structure +# /usr/lib/lsb/remove_initd /etc/init.d/hpi + cd /etc/init.d + rm -f hpi rc?.d/S81hpi rc?.d/K35hpi +fi +rm -rf $sdir 2>/dev/null + +%changelog +* Tue Apr 06 2004 Andrew Cress + changed to not turn on hpi autostart scripts at rpm install +* Fri Mar 26 2004 Andrew Cress +- changed to include proper kill scripts and chkconfig info +* Thu Feb 12 2004 Andrew Cress +- changed naming from /etc/init.d/hpiinit.sh to /etc/init.d/hpi +* Fri Jun 27 2003 Andrew Cress +- updated to check for ipmidrvr rpm, since no /dev/imb until reboot. +* Fri Jun 20 2003 Andrew Cress +- updated for README & released file locations +* Thu Jun 12 2003 Andrew Cress +- updated for beta2 file naming +* Tue May 05 2003 Andrew Cress +- created diff --git a/hpiutil/hpiwdt.c b/hpiutil/hpiwdt.c new file mode 100644 index 0000000..efa732d --- /dev/null +++ b/hpiutil/hpiwdt.c @@ -0,0 +1,272 @@ +/* + * hpiwdt.c + * + * Copyright (c) 2003-2004 Intel Corporation. + * + * This tool reads and enables the watchdog timer via HPI. + * Note that there are other methods for doing this, and the + * standard interface is for the driver to expose a /dev/watchdog + * device interface. + * WARNING: If you enable/reset the watchdog, make sure you have + * something set up to keep resetting the timer at regular intervals, + * or it will reset your system. + * + * Author: Andy Cress arcress at users.sourceforge.net + * + * 05/02/03 Andy Cress - created + * 06/06/03 Andy Cress - added more logic with beta2 SPI release + * 06/11/03 Andy Cress - successful test of options to set WDT values. + * 03/15/04 Andy Cress v1.0 - added strings for use & actions in show_wdt + * 12/02/04 Andy Cress v1.1 - fixed RPT loop, added more decoding, + * added flags for HPI_A/HPI_B. + */ +/*M* +Copyright (c) 2004, Intel Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + a.. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b.. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + c.. Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *M*/ + +#include +#include +#include +#include +#include "SaHpi.h" + +#define uchar unsigned char +#ifdef HPI_A +char *progver = "1.1 HPI-A"; +#else +char *progver = "1.1 HPI-B"; +#endif +char fdebug = 0; +#define NUSE 6 +char *usedesc[NUSE] = {"reserved", "BIOS FRB2", "BIOS/POST", + "OS Load", "SMS/OS", "OEM" }; +#define NACT 5 +char *actions[NACT] = {"No action", "Hard Reset", "Power down", + "Power cycle", "Reserved" }; + +static void +show_wdt(SaHpiWatchdogNumT wdnum, SaHpiWatchdogT *wdt) +{ + int icount, pcount; + char ustr[12]; + char astr[16]; + char estr[30]; + char *pstr; + icount = wdt->InitialCount /1000; /*1000 msec = 1 sec*/ + pcount = wdt->PresentCount /1000; + + if (wdt->TimerUse > NUSE) sprintf(ustr,"%d", wdt->TimerUse ); + else strcpy(ustr, usedesc[wdt->TimerUse]); + if (wdt->TimerAction > NACT) sprintf(astr,"%d", wdt->TimerAction ); + else strcpy(astr, actions[wdt->TimerAction]); + printf("Watchdog: Num=%d, Log=%d, Running=%d, TimerUse=%s, TimerAction=%s\n", + wdnum,wdt->Log,wdt->Running,ustr, astr); + if (wdt->TimerUseExpFlags == 0) strcpy(estr,"none"); + else { + estr[0] = 0; + if (wdt->TimerUseExpFlags & 0x01) strcat(estr,"FRB2 "); + if (wdt->TimerUseExpFlags & 0x02) strcat(estr,"POST "); + if (wdt->TimerUseExpFlags & 0x04) strcat(estr,"OS_Load "); + if (wdt->TimerUseExpFlags & 0x08) strcat(estr,"SMS_OS "); + if (wdt->TimerUseExpFlags & 0x10) strcat(estr,"OEM "); + } + printf(" ExpiredUse=%s, Timeout=%d sec, Counter=%d sec\n", + estr, icount,pcount); + switch(wdt->PretimerInterrupt) { + case 1: pstr = "SMI"; break; + case 2: pstr = "NMI"; break; + case 3: pstr = "MsgInt"; break; + default: pstr = "none"; break; + } + printf(" PreTimerInterrupt=%s, PreTimeoutInterval=%d msec\n", + pstr,wdt->PreTimeoutInterval); + return; +} /*end show_wdt*/ + +int +main(int argc, char **argv) +{ + int c; + SaErrorT rv; + SaHpiSessionIdT sessionid; +#ifdef HPI_A + SaHpiVersionT hpiVer; + SaHpiRptInfoT rptinfo; +#else + SaHpiDomainInfoT domainInfo; +#endif + SaHpiRptEntryT rptentry; + SaHpiEntryIdT rptentryid; + SaHpiEntryIdT nextrptentryid; + SaHpiResourceIdT resourceid; + SaHpiWatchdogNumT wdnum; + SaHpiWatchdogT wdt; + int t = 0; + char freset = 0; + char fenable = 0; + char fdisable = 0; + + printf("%s ver %s\n", argv[0],progver); + while ( (c = getopt( argc, argv,"dert:x?")) != EOF ) + switch(c) { + case 'r': /* reset wdt */ + freset = 1; + break; + case 'e': /* disable wdt */ + fenable = 1; + break; + case 'd': /* disable wdt */ + fdisable = 1; + break; + case 't': /* timeout (enable implied) */ + t = atoi(optarg); + fenable = 1; + break; + case 'x': fdebug = 1; break; /* debug messages */ + default: + printf("Usage: %s [-derx -t sec]\n", argv[0]); + printf(" where -e enables the watchdog timer\n"); + printf(" -d disables the watchdog timer\n"); + printf(" -r resets the watchdog timer\n"); + printf(" -t N sets timeout to N seconds\n"); + printf(" -x show eXtra debug messages\n"); + exit(1); + } + if (t == 0) t = 120; + +#ifdef HPI_A + rv = saHpiInitialize(&hpiVer); + if (rv != SA_OK) { + printf("saHpiInitialize error %d\n",rv); + exit(-1); + } + rv = saHpiSessionOpen(SAHPI_DEFAULT_DOMAIN_ID,&sessionid,NULL); + if (rv != SA_OK) { + if (rv == SA_ERR_HPI_ERROR) + printf("saHpiSessionOpen: error %d, library not running\n",rv); + else printf("saHpiSessionOpen error %d\n",rv); + exit(-1); + } + rv = saHpiResourcesDiscover(sessionid); + if (fdebug) printf("saHpiResourcesDiscover rv = %d\n",rv); + rv = saHpiRptInfoGet(sessionid,&rptinfo); + if (fdebug) printf("saHpiRptInfoGet rv = %d\n",rv); + printf("RptInfo: UpdateCount = %x, UpdateTime = %lx\n", + rptinfo.UpdateCount, (unsigned long)rptinfo.UpdateTimestamp); +#else + rv = saHpiSessionOpen(SAHPI_UNSPECIFIED_DOMAIN_ID, &sessionid, NULL); + if (rv != SA_OK) { + printf("saHpiSessionOpen error %d\n",rv); + exit(-1); + } + rv = saHpiDiscover(sessionid); + if (fdebug) printf("saHpiDiscover rv = %d\n",rv); + rv = saHpiDomainInfoGet(sessionid, &domainInfo); + if (fdebug) printf("saHpiDomainInfoGet rv = %d\n",rv); + printf("DomainInfo: UpdateCount = %x, UpdateTime = %lx\n", + domainInfo.RptUpdateCount, (unsigned long)domainInfo.RptUpdateTimestamp); +#endif + + /* walk the RPT list */ + rptentryid = SAHPI_FIRST_ENTRY; + while ((rv == SA_OK) && (rptentryid != SAHPI_LAST_ENTRY)) + { + rv = saHpiRptEntryGet(sessionid,rptentryid,&nextrptentryid,&rptentry); + if (rv != SA_OK) printf("RptEntryGet: rv = %d\n",rv); + if (rv == SA_OK) { + /* handle WDT for this RPT entry */ + resourceid = rptentry.ResourceId; +#ifdef HPI_A + rptentry.ResourceTag.Data[rptentry.ResourceTag.DataLength] = 0; +#endif + if (fdebug) + printf("rptentry[%d] resourceid=%d capab=%x tag: %s\n", + rptentryid, resourceid, rptentry.ResourceCapabilities, + rptentry.ResourceTag.Data); + + if (rptentry.ResourceCapabilities & SAHPI_CAPABILITY_WATCHDOG) { + printf("%s has watchdog capability\n",rptentry.ResourceTag.Data); + + wdnum = SAHPI_DEFAULT_WATCHDOG_NUM; + rv = saHpiWatchdogTimerGet(sessionid,resourceid,wdnum,&wdt); + if (fdebug) printf("saHpiWatchdogTimerGet rv = %d\n",rv); + if (rv != 0) { + printf("saHpiWatchdogTimerGet error = %d\n",rv); + rv = 0; + rptentryid = nextrptentryid; + continue; + } + show_wdt(wdnum,&wdt); + + if (fdisable) { + printf("Disabling watchdog timer ...\n"); + /* clear FRB2, timeout back to 120 sec */ + /* TODO: add setting wdt values here */ + wdt.TimerUse = SAHPI_WTU_NONE; /* 1=FRB2 2=POST 3=OSLoad 4=SMS_OS 5=OEM */ + wdt.TimerAction = SAHPI_WAE_NO_ACTION; /* 0=none 1=reset 2=powerdown 3=powercycle */ + wdt.PretimerInterrupt = SAHPI_WPI_NONE; /* 0=none 1=SMI 2=NMI 3=message */ + wdt.PreTimeoutInterval = 60000; /*msec*/ + wdt.InitialCount = 120000; /*msec*/ + wdt.PresentCount = 120000; /*msec*/ + + rv = saHpiWatchdogTimerSet(sessionid,resourceid,wdnum,&wdt); + if (fdebug) printf("saHpiWatchdogTimerSet rv = %d\n",rv); + if (rv == 0) show_wdt(wdnum,&wdt); + } else if (fenable) { + printf("Enabling watchdog timer ...\n"); + /* hard reset action, no pretimeout, clear SMS/OS when done */ + /* use t for timeout */ + wdt.TimerUse = SAHPI_WTU_SMS_OS; /* 1=FRB2 2=POST 3=OSLoad 4=SMS_OS 5=OEM */ + wdt.TimerAction = SAHPI_WAE_RESET; /* 0=none 1=reset 2=powerdown 3=powercycle */ + wdt.PretimerInterrupt = SAHPI_WPI_NMI; /* 0=none 1=SMI 2=NMI 3=message */ + wdt.PreTimeoutInterval = (t / 2) * 1000; /*msec*/ + wdt.InitialCount = t * 1000; /*msec*/ + wdt.PresentCount = t * 1000; /*msec*/ + + rv = saHpiWatchdogTimerSet(sessionid,resourceid,wdnum,&wdt); + if (fdebug) printf("saHpiWatchdogTimerSet rv = %d\n",rv); + if (rv == 0) show_wdt(wdnum,&wdt); + } + if (freset && !fdisable) { + printf("Resetting watchdog timer ...\n"); + rv = saHpiWatchdogTimerReset(sessionid,resourceid,wdnum); + if (fdebug) printf("saHpiWatchdogTimerReset rv = %d\n",rv); + } + } /*watchdog capability*/ + rptentryid = nextrptentryid; /* get next RPT (usu only one anyway) */ + } /*endif RPT ok*/ + } /*end while loop*/ + + rv = saHpiSessionClose(sessionid); + +#ifdef HPI_A + rv = saHpiFinalize(); +#endif + exit(0); +} + +/* end hpiwdt.c */ diff --git a/hpiutil/mkrpm b/hpiutil/mkrpm new file mode 100755 index 0000000..e64f995 --- /dev/null +++ b/hpiutil/mkrpm @@ -0,0 +1,135 @@ +# mkrpm +# Make the rpms for hpiutil +# +# Reliab11 = RedHat 8.0 (rh80) +# Reliab12 = RedHat 9.0 (rh90) +# Reliab13 = MV CGE 2.1 (mv21) +# Reliab14 = MV CGE 3.0 (mv30p3) +# Reliab01 = MV CGE 3.1 (mv31p3) +# Reliab03 = RedHat AS 2.1 (as21) +# chapin4 = MV CGE 3.1 (mv31p4) +# grumpy = RedHat EL 3 (el3) +# chesnee1 = RedHat EL 3 (el3) +# telcoraid= SuSE UL 1.0 (ul10) +# +ROOT=`pwd` +# usually /mnt/pub/panich/hpi/hpiutil +RTARG=rpm +RSPEC=hpiutil.spec +RTO=$ROOT/$RTARG/usr/bin +STO=$ROOT/$RTARG/usr/share/hpiutil +ETO=$ROOT/$RTARG/etc/hpi +OS=el3 +VER=`grep "^%define Version" $RSPEC |cut -f3 -d' '` +tmpe=/tmp/ed.tmp +rpmcmd=rpmbuild + +if [ $# -ge 1 ] +then + OS=$1 +fi +case $OS in +"mv21") + archv=x86_pentium3 + ;; +"mv30") + archv=x86_pentium3 + ;; +"mv30wv") + archv=x86_pentium4 + ;; +"mv31p4") + archv=x86_pentium4 + ;; +"mv31p3") + archv=x86_pentium3 + ;; +"ul10") + rpmcmd=rpm + archv=i386 + ;; +*) + archv=i386 + ;; +esac + +# Modify the env for EL3 & others +if [ "$OS" = "el3" ] +then + cmt= +else + cmt="#" +fi +cat - <<%%% >$tmpe +1 +/LD_ASSUME_KERNEL +c +$cmt export LD_ASSUME_KERNEL=2.4.1 +. +w +q +%%% +ed hpiinit.sh <$tmpe +ed env.hpi <$tmpe +ed obj/env.hpi <$tmpe + +echo "Copying lib files to rpm, OS=$OS ..." +mkdir -p $RTO +mkdir -p $ROOT/$RTARG/usr/lib +cp -uf $ROOT/obj/${OS}/SpiLibd $RTO +cp -uf $ROOT/obj/${OS}/*.so $ROOT/$RTARG/usr/lib +cp -uf $ROOT/obj/${OS}/*.so-open $ROOT/$RTARG/usr/lib + +# Make the matching hpiutil binaries +cd $ROOT +make clean +make +echo "Copying files for rpm, OS=$OS ..." +mkdir -p $ETO +mkdir -p $ROOT/$RTARG/etc/init.d +mkdir -p $STO +cp -uf $ROOT/hpialarmpanel $RTO +cp -uf $ROOT/hpisensor $RTO +cp -uf $ROOT/hpisel $RTO +cp -uf $ROOT/hpifru $RTO +cp -uf $ROOT/hpiwdt $RTO +cp -uf $ROOT/hpireset $RTO +cp -uf $ROOT/hpiinit.sh $ETO +cp -uf $ROOT/README $STO +cp -uf $ROOT/COPYING $STO +cp -uf $ROOT/obj/env.hpi $STO +cp -uf $ROOT/obj/spi-daemon.conf $ETO +cp -uf $ROOT/obj/spi-lib.conf $ETO + + +# (new:) +# libSaHpi.so libSpiIpmiImb.so libSpiModIpmi.so SpiLibd +# libSpiDaemonCore.so libSpiModGeneric.so libSpiTsdMaplx.so +# (old:) +# libSaHpi.so libSpiDaemonCore.so libSpiGenericMaplx.so libSpiModGeneric.so +# libSpiModIpmi.so libSpiModMullins.so libSpiMullinsMaplx.so +# libSpiIpmiImb.so libSpiIpmiOpenIpmi.so + +echo "Making hpiutil rpm ..." +#rpmbuild -bb $RSPEC +#HOME=`pwd` +#export HOME +rm -f $ROOT/$RTARG/$archv/hpiutil*.rpm +echo "%_rpmdir ${ROOT}/${RTARG}" > $HOME/.rpmmacros +$rpmcmd -bb --buildroot ${ROOT}/${RTARG} $RSPEC +rm -f $HOME/.rpmmacros + +# save the rpm +rfil=$ROOT/$RTARG/$archv/hpiutil-$VER-?.$archv.rpm +echo $OS |grep mv31p4 >/dev/null 2>&1 +if [ $? -eq 0 ] +then + rfil=/usr/src/montavista/RPMS/$archv/hpiutil-$VER-?.$archv.rpm +fi +cp $rfil $ROOT/obj/hpiutil-$VER-$OS.$archv.rpm +if [ $? -eq 0 ] +then + # remove the directory + rm -rf $ROOT/$RTARG +fi + diff --git a/hpiutil/upd b/hpiutil/upd new file mode 100755 index 0000000..0967595 --- /dev/null +++ b/hpiutil/upd @@ -0,0 +1,24 @@ +# upd +# update hpi library objects to public share +# +# todir=/mnt/pub/panich/hpi/hpiutil +todir=/mnt/pub/cress/hpi/hpiutil +hdir=/root/hpi +cdir=`pwd` + +if [ $# -ge 1 ] +then + OS=$1 +else + OS=el3 +fi +mkdir -p $todir/obj/$OS +# cd $SAHPI_HOME +cd $hdir +cp bin/SpiLibd $todir/obj/$OS +cp lib/*.so* $todir/obj/$OS +if [ -f lib/Server ] +then + cp lib/Server $todir/obj/$OS +fi +cd $cdir diff --git a/install-sh b/install-sh new file mode 100755 index 0000000..4d4a951 --- /dev/null +++ b/install-sh @@ -0,0 +1,323 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2005-05-14.22 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + shift + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Copy the file name to the temp name. + $doit $cpprog "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit 1; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit 0 +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/kern/alarms.h b/kern/alarms.h new file mode 100644 index 0000000..c0ca46a --- /dev/null +++ b/kern/alarms.h @@ -0,0 +1,43 @@ +/* + * alarms.h + * + * Description of what the alarm panel bits mean. + * + * Note that bit = 0 means on, and bit = 1 means off for these LEDs + * (e.g. 0xFF is everything off). + * The low nibble (bits 0x0F) is for LEDs, and the high nibble (bits 0x30) is + * for the relays. The relays are triggered from the LED settings so the high + * nibble doesn't really matter when setting alarms (usu 0xF* in TAM though). + * + * The TAM API is available with the TAM rpm, for your convenience. + * See the bmcpanic.patch for an example of how to set an LED, + * at http://panicsel.sourceforge.net + */ + +// +// masks used to set LED states +// +#define AP_SET_NO_LED_MASK 0x0F // bits 0-3 = 1 +#define AP_SET_POWER_MASK 0x0E // bit0 = 0, others = 1 +#define AP_SET_CRITICAL_MASK 0x0D // bit1 = 0 +#define AP_SET_MAJOR_MASK 0x0B // bit2 = 0 +#define AP_SET_MINOR_MASK 0x07 // bit3 = 0 + +// +// masks used to get LED states +// +#define AP_NO_LED_SET 0x0E +#define AP_POWER_SET 0x01 +#define AP_CRITICAL_SET 0x0C +#define AP_MAJOR_SET 0x0A +#define AP_MINOR_SET 0x06 + +// +// masks used to get relay state +// +#define AP_ALL_RELAY_MASK 0x00 +#define AP_MINOR_RELAY_MASK 0x10 +#define AP_MAJOR_RELAY_MASK 0x20 +#define AP_NO_RELAY_MASK 0x30 + +/* end alarms.h */ diff --git a/kern/bmcpanic-2.4.18.patch b/kern/bmcpanic-2.4.18.patch new file mode 100644 index 0000000..9eae959 --- /dev/null +++ b/kern/bmcpanic-2.4.18.patch @@ -0,0 +1,997 @@ +--- linux-2.4.18-orig/drivers/char/misc.c Fri Nov 2 20:46:47 2001 ++++ linux-2.4.18/drivers/char/misc.c Thu Feb 27 14:28:39 2003 +@@ -70,6 +70,7 @@ + extern void gfx_register(void); + #endif + extern void streamable_init(void); ++extern int bmc_panic_init(void); + extern int rtc_DP8570A_init(void); + extern int rtc_MK48T08_init(void); + extern int ds1286_init(void); +@@ -264,6 +265,9 @@ + #endif + #ifdef CONFIG_PMAC_PBOOK + pmu_device_init(); ++#endif ++#ifdef CONFIG_BMCPANIC ++ bmc_panic_init(); + #endif + #ifdef CONFIG_SGI_NEWPORT_GFX + gfx_register (); +--- linux-2.4.18-orig/kernel/panic.c Sun Sep 30 15:26:08 2001 ++++ linux-2.4.18/kernel/panic.c Thu Feb 27 14:28:39 2003 +@@ -17,6 +17,10 @@ + #include + #include + ++char *panic_string; ++#ifdef CONFIG_BMCPANIC ++ extern void bmcpanic_action(void); ++#endif + asmlinkage void sys_sync(void); /* it's really int */ + + int panic_timeout; +@@ -53,6 +57,7 @@ + va_start(args, fmt); + vsprintf(buf, fmt, args); + va_end(args); ++ panic_string = buf; + printk(KERN_EMERG "Kernel panic: %s\n",buf); + if (in_interrupt()) + printk(KERN_EMERG "In interrupt handler - not syncing\n"); +@@ -81,7 +86,11 @@ + * choosing not too. It might crash, be corrupt or do + * more harm than good for other reasons. + */ +- machine_restart(NULL); ++#ifdef CONFIG_BMCPANIC ++ bmcpanic_action(); ++#else ++ machine_restart(NULL); ++#endif + } + #ifdef __sparc__ + { +--- linux-2.4.18-orig/kernel/ksyms.c Mon Feb 25 14:38:13 2002 ++++ linux-2.4.18/kernel/ksyms.c Thu Feb 27 14:29:30 2003 +@@ -60,6 +60,7 @@ + + extern void *sys_call_table; + ++extern char *panic_string; + extern struct timezone sys_tz; + extern int request_dma(unsigned int dmanr, char * deviceID); + extern void free_dma(unsigned int dmanr); +@@ -559,3 +560,5 @@ + + EXPORT_SYMBOL(tasklist_lock); + EXPORT_SYMBOL(pidhash); ++EXPORT_SYMBOL(panic_notifier_list); ++EXPORT_SYMBOL(panic_string); +--- linux-2.4.18-orig/Documentation/Configure.help Mon Feb 25 14:37:51 2002 ++++ linux-2.4.18/Documentation/Configure.help Thu Feb 27 14:28:39 2003 +@@ -16277,6 +16277,20 @@ + + If unsure, say N. + ++BMC Panic Handler ++CONFIG_BMCPANIC ++ If you say Y here, additional functions will be added to the ++ panic handler via the panic notifier list. ++ ++ If your system has IPMI support and a BMC (Baseboard Management ++ Controller) on the motherboard, then the following additional ++ functions will be performed if a panic occurs: ++ - Write an OS Critical Stop message to the firmware System Event Log ++ - Turn on the Critical LED on the Telco Alarms panel (if present) ++ - Send a BMC LAN alert via SNMP to a network operations center, ++ if the firmware Platform Event Filter configuration is set to ++ enable this. ++ + Cobalt Networks support + CONFIG_COBALT + Support for Cobalt Networks x86-based servers. +--- linux-2.4.18-orig/drivers/char/Makefile Mon Feb 25 14:37:57 2002 ++++ linux-2.4.18/drivers/char/Makefile Thu Feb 27 14:28:39 2003 +@@ -209,6 +209,9 @@ + obj-y += ftape/ftape.o + endif + ++bmc_panic-objs := bmc_ipmi.o bmc_selmsg.o ++obj-$(CONFIG_BMCPANIC) += bmc_panic.o ++ + obj-$(CONFIG_H8) += h8.o + obj-$(CONFIG_PPDEV) += ppdev.o + obj-$(CONFIG_DZ) += dz.o +@@ -252,6 +255,9 @@ + ./conmakehash $(FONTMAPFILE) > consolemap_deftbl.c + + consolemap_deftbl.o: consolemap_deftbl.c $(TOPDIR)/include/linux/types.h ++ ++bmc_panic.o: $(bmc_panic-objs) ++ $(LD) -r -o $@ $(bmc_panic-objs) + + .DELETE_ON_ERROR: + +--- linux-2.4.18-orig/drivers/char/Config.in Mon Feb 25 14:37:57 2002 ++++ linux-2.4.18/drivers/char/Config.in Thu Feb 27 14:28:39 2003 +@@ -97,6 +97,10 @@ + if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then + int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256 + fi ++bool 'BMC Panic Handler' CONFIG_BMCPANIC ++if [ "$CONFIG_BMCPANIC" != "n" ]; then ++ int ' Action after Panic (0=reset,1=power down,2=power cycle)' CONFIG_BMCPANIC_ACTION 0 ++fi + if [ "$CONFIG_PARPORT" != "n" ]; then + dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT + if [ "$CONFIG_PRINTER" != "n" ]; then +--- /dev/null Fri Mar 23 23:37:44 2001 ++++ linux-2.4.18/drivers/char/bmc_ipmi.c Thu Feb 27 14:28:39 2003 +@@ -0,0 +1,531 @@ ++/* ++ * bmc_ipmi.c ++ * ++ * This code is needed to run a streamlined IPMI KCS command when ++ * the rest of the system may be dead (panic time). It must wait ++ * for completion of the receive function also. ++ * There will be zero or one BMC, with KCS as a minimum and perhaps ++ * other interfaces, so doing KCS to a default BMC LUN is valid here. ++ * ++ * Note that CONFIG_BMCPANIC should be =y (rather than =m) to ++ * ensure that this handler is loaded early enough to cover boot ++ * time panic conditions. CONFIG_BMCPANIC_ACTION can only be ++ * defined if CONFIG_BMCPANIC=y. ++ * ++ * Author: Andy Cress ++ * ++ * Change History: ++ * 01/31/03 Andy Cress - created from valinux ipmi_kcs driver v2.1 ++ * ++ * Copyright 2003 Intel Corp. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * ++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS ++ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ++ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ++ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define uchar unsigned char ++ ++#define KCS_READY_DELAY 5 ++#define BMC_RESPONSE_DELAY 5 ++#define BMC_RETRY_DELAY 60 ++ ++#if defined(__ia64__) ++#define KCS_BASE 0x8a2 ++#else ++#define KCS_BASE 0xca2 ++#endif ++#define KCS_STATUS_REG (KCS_BASE + 1) ++#define KCS_COMMAND_REG (KCS_BASE + 1) ++#define KCS_DATAIN_REG (KCS_BASE + 0) ++#define KCS_DATAOUT_REG (KCS_BASE + 0) ++ ++/* State bits based on S1 & S0 below */ ++#define KCS_STATE_MASK 0xC0 ++#define KCS_IDLE_STATE 0x00 ++#define KCS_READ_STATE 0x40 ++#define KCS_WRITE_STATE 0x80 ++#define KCS_ERROR_STATE 0xC0 ++ ++#define KCS_IBF 0x02 ++#define KCS_OBF 0x01 ++#define KCS_SMS_ATN 0x04 ++ ++#define SEND_INIT 1 ++#define SEND_START 2 ++#define SEND_NEXT 3 ++#define SEND_END 4 ++#define RECV_START 5 ++#define RECV_INIT 6 ++#define RECV_NEXT 7 ++#define RECV_INIT2 8 ++#define RECV_END 9 ++#define END 10 ++#define ERROR 0 ++ ++/* SMS Transfer Stream Control Codes */ ++#define GET_STATUS_ABORT 0x60 ++#define WRITE_START 0x61 ++#define WRITE_END 0x62 ++#define KCS_READ 0x68 ++ ++#define MAX_INVALID_RESPONSE_COUNT 2 ++#define MIN_BMC_RESPONSE_SIZE 3 ++#define MAX_IMB_PACKET_SIZE 33 ++#define MAX_BMC_RESPONSE_SIZE (MIN_BMC_RESPONSE_SIZE + MAX_IMB_PACKET_SIZE) ++#define MAX_XFER_LENGTH (MAX_IMB_PACKET_SIZE * 2) ++ ++#define MAX_BUFFER_SIZE 64 ++ ++typedef struct bmc_response ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ unsigned char cmd; ++ unsigned char cc; ++ unsigned char data[1]; ++ }BMC_RESPONSE; ++ ++typedef struct bmc_request ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ unsigned char cmd; ++ unsigned char data[1]; ++ }BMC_REQUEST; ++ ++/* GET_DEVICE_ID RESPONSE (11 bytes) */ ++typedef struct device_id_response ++ { ++ unsigned char device_id; ++ ++ unsigned char device_revision :4; ++ unsigned char reserved :3; ++ unsigned char provides_sdr :1; ++ ++ unsigned char major_firmware_revision :7; ++ #define NORMAL_OPERATION 0 ++ #define DEVICE_BUSY 1 ++ unsigned char device_available :1; ++ ++ unsigned char minor_firmware_revision; ++ unsigned char ipmi_version_major :4; ++ unsigned char ipmi_version_minor :4; ++ ++ unsigned char supports_sensor_device :1; ++ unsigned char supports_sdr_device :1; ++ unsigned char supports_sel_device :1; ++ unsigned char supports_fru_device :1; ++ unsigned char supports_ipmb_receiver :1; ++ unsigned char supports_ipmb_generator :1; ++ unsigned char supports_bridge :1; ++ unsigned char supports_chassis_device :1; ++ ++ unsigned char manufacturer_id1; ++ unsigned char manufacturer_id2; ++ unsigned char manufacturer_id3; ++ unsigned short product_id; ++ } DEVICE_ID_RESPONSE; ++ ++/*************************************/ ++ ++#if defined(__ia64__) ++static char kcs_new = 1; /* don't even try old kcs */ ++#else ++static char kcs_new = 0; ++#endif ++DECLARE_MUTEX(kcs_sem); ++ ++/*************************************/ ++ ++/* ++ * kcs chip mashing stuff ++ */ ++static int wait_while_ibf(void) ++{ ++ unsigned char status_byte; ++ ++ status_byte = inb_p(KCS_STATUS_REG); ++ if ((status_byte & KCS_IBF) == 0) return (0); ++ mdelay(KCS_READY_DELAY); ++ status_byte = inb_p(KCS_STATUS_REG); ++ if (status_byte & KCS_IBF) return (-1); ++ return (0); ++} ++ ++static int is_obf_set(void) ++{ ++ unsigned char cs; ++ cs = inb_p(KCS_STATUS_REG); ++ return ((cs & KCS_OBF) == KCS_OBF); ++} ++ ++static int wait_until_obf(void) ++{ ++ int retries = 0; ++ ++ while (retries < 2) { ++ if (is_obf_set()) return (0); ++ mdelay(KCS_READY_DELAY); ++ retries++; ++ } ++ return (-ETIMEDOUT); ++} ++ ++static unsigned char get_kcs_state(void) ++{ ++ unsigned char cs; ++ ++ cs = inb_p(KCS_STATUS_REG); ++ return (cs & KCS_STATE_MASK); ++} ++ ++static unsigned char read_kcs_data(void) ++{ ++ unsigned char data; ++ ++ data = inb_p(KCS_DATAOUT_REG); ++ return (data); ++} ++ ++static void write_kcs_data(unsigned char data) ++{ ++ outb_p(data, KCS_DATAIN_REG); ++} ++ ++static void write_kcs_cmd(unsigned char cmd) ++{ ++ outb_p(cmd, KCS_COMMAND_REG); ++} ++ ++static int clear_obf(void) ++{ ++ read_kcs_data(); ++ return (0); ++} ++ ++static int kcs_xfer(BMC_REQUEST * request, int request_len, ++ BMC_RESPONSE * response, int *response_len) ++{ ++ unsigned char *xmit_buffer, *recv_buffer; ++ int i = 0, rc = 0, state = SEND_INIT, bad = 0; ++ ++ xmit_buffer = (unsigned char *) request; ++ recv_buffer = (unsigned char *) response; ++ ++ while (1) { ++ if (state == END) ++ break; ++ else if (bad > 2) { ++ printk("[ipmi_panic] Maximum retries exceeded.\n"); ++ rc = -EIO; ++ break; ++ } ++ switch (state) { ++ case SEND_INIT: ++ { ++ i = 0; ++ state = SEND_START; ++ wait_while_ibf(); ++ if (kcs_new) clear_obf(); ++ } ++ case SEND_START: ++ { ++ state = SEND_NEXT; ++ write_kcs_cmd(WRITE_START); ++ wait_while_ibf(); ++ } ++ case SEND_NEXT: ++ { ++ if (i == (request_len - 1)) { ++ state = SEND_END; ++ break; ++ } ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ if (kcs_new) clear_obf(); ++ break; ++ } ++ case SEND_END: ++ { ++ if (!kcs_new) wait_while_ibf(); ++ write_kcs_cmd(WRITE_END); ++ wait_while_ibf(); ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ if (kcs_new) clear_obf(); ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ state = RECV_START; ++ } ++ case RECV_START: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_WRITE_STATE: ++ case KCS_IDLE_STATE: ++ { ++ mdelay(BMC_RESPONSE_DELAY); ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ i = 0; ++ memset(recv_buffer, 0, ++ *response_len); ++ state = RECV_INIT; ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_INIT: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ state = RECV_END; ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ else mdelay(1); ++ break; ++ } ++ default: ++ { ++ mdelay(1); ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_NEXT: ++ { ++ if (i >= *response_len) { ++ rc = -EOVERFLOW; ++ state = ERROR; ++ break; ++ } ++ recv_buffer[i++] = read_kcs_data(); ++ if (!kcs_new) wait_while_ibf(); ++ write_kcs_data(KCS_READ); ++ if (kcs_new) wait_while_ibf(); ++ state = RECV_INIT2; ++ break; ++ } ++ case RECV_INIT2: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ if (kcs_new) { ++ if (wait_until_obf() == 0) { ++ clear_obf(); ++ state = RECV_END; ++ } else { ++ state = ERROR; ++ } ++ } else { ++ state = RECV_END; ++ } ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (kcs_new) { ++ if (wait_until_obf() == 0) ++ state = RECV_NEXT; ++ else state = ERROR; ++ } else { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ } ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_END: ++ { ++ if ((i < MIN_BMC_RESPONSE_SIZE) || ++ (response->netfn != (request->netfn | 0x01)) ++ || (response->cmd != request->cmd)) { ++ if (request->cmd == 0x01 && ++ request->netfn == 0x06 && ++ response->netfn == 0x2b) /*ok*/; ++ else { /* flag the error */ ++ printk("[ipmi_panic] Request/Response CMD/NETFN mismatch error\n"); ++ ++ printk(" i=%d, RQcmd/RQnetfn=0x%x/0x%x,RScmd/RSnetfn=0x%x/0x%x\n", ++ i, request->cmd, request->netfn, ++ response->cmd, response->netfn); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ ++ *response_len = i; ++ rc = 0; ++ state = END; ++ break; ++ } ++ case ERROR: ++ default: ++ { ++ printk("[ipmi_panic] BMC in bad state (%d) cmd=%02x. Retrying transfer\n", state,request->cmd); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ } ++ return (rc); ++} ++ ++int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, uchar *sbuf, int slen, ++ uchar *rbuf, int rlen, int *nret, uchar *cc) ++{ ++ uchar bmc_outbuf[MAX_BUFFER_SIZE]; ++ uchar bmc_inbuf[MAX_BUFFER_SIZE]; ++ BMC_REQUEST *bmc_req; ++ BMC_RESPONSE *bmc_resp; ++ int bmc_outlen; ++ int bmc_inlen; ++ int rc = 0; ++ ++ if (kcs_new == 2) return (-ENXIO); ++ ++ memset(bmc_outbuf,0, sizeof(bmc_outbuf)); ++ memset(bmc_inbuf,0, sizeof(bmc_inbuf)); ++ bmc_req = (BMC_REQUEST *)bmc_outbuf; ++ bmc_resp = (BMC_RESPONSE *)bmc_inbuf; ++ bmc_req->cmd = cmd; ++ bmc_req->netfn = netfn; ++ bmc_req->lun = lun; ++ bmc_outlen = slen + 2; ++ bmc_inlen = sizeof(bmc_inbuf); ++ if (slen > 0) memcpy(bmc_req->data,sbuf,slen); ++ ++ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); ++ if (bmc_resp->cc == 0xcc) /* flaky NMI fixup */ ++ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); /*retry*/ ++ ++ /* copy the response */ ++ *cc = bmc_resp->cc; ++ if (bmc_inlen > rlen) bmc_inlen = rlen; ++ *nret = bmc_inlen; ++ if (bmc_inlen > 0) memcpy(rbuf,bmc_resp->data,bmc_inlen); ++ ++ return(rc); ++} ++ ++extern void init_SEL(void); ++extern void cleanup_SEL(void); ++ ++int bmc_panic_init(void) ++{ ++ int i, rc; ++ uchar cc; ++ uchar bdev[16]; ++ DEVICE_ID_RESPONSE *dev_id; ++ ++ printk("bmc_panic ipmi driver at io 0x%x\n", KCS_BASE); ++ if ((inb_p(KCS_STATUS_REG) == 0xFF) && ++ (inb_p(KCS_DATAIN_REG) == 0xFF)) { ++ printk("--KCS ISA window not present, exiting.\n"); ++ return (-ENXIO); ++ } ++ ++ /* Get Device ID */ ++ rc = ipmi_send_recv(0x01,0x06,0,NULL,0,bdev,sizeof(bdev),&i,&cc); ++ if (rc != 0) kcs_new = 2; /* bad */ ++ else if (cc != 0) kcs_new = 2; /* bad */ ++ else ++ { ++ dev_id = (DEVICE_ID_RESPONSE *)&bdev[0]; ++ printk("--BMC version %x.%x, IPMI version %d.%d\n", ++ dev_id->major_firmware_revision, ++ dev_id->minor_firmware_revision, ++ dev_id->ipmi_version_major, dev_id->ipmi_version_minor); ++ if ((dev_id->ipmi_version_major == 0) && ++ (dev_id->ipmi_version_minor == 9)) { ++ printk("--Using legacy KCS state machine\n"); ++ kcs_new = 0; ++ } else { ++ printk("--Using new KCS state machine\n"); ++ kcs_new = 1; ++ } ++ } ++ init_SEL(); ++ ++ return(rc); ++} ++ ++#ifdef MODULE ++int init_module(void) ++{ ++ return (bmc_panic_init()); ++} ++ ++void cleanup_module(void) ++{ ++ printk("bmc_panic: Driver shutting down.\n"); ++ cleanup_SEL(); ++} ++#endif ++ ++/* end bmc_ipmi.c */ +--- /dev/null Fri Mar 23 23:37:44 2001 ++++ linux-2.4.18/drivers/char/bmc_selmsg.c Thu Feb 27 14:28:39 2003 +@@ -0,0 +1,269 @@ ++/* ++ * bmc_selmsg.c ++ * routines to send IMB and BMC requests to the SEL and alarms panel. ++ * ++ * 05/07/01 Todd Davis - created ++ * 09/17/01 Andy Cress - some cleanup ++ * 09/26/01 Andy Cress - added setAlarmLED, changed notifier priority ++ * 10/05/01 Andy Cress - fixed setAlarmLED, changed OEM bytes in panic ++ * 10/08/01 Andy Cress - added getAlarmLED ++ * 10/09/01 Andy Cress - save 3 chars of panic_string in SEL ++ * 10/25/01 Andy Cress - fixed confusion w DEBUG macro & LINUX_DEBUG ++ * 11/05/01 Andy Cress - adapted to open source driver calls ++ * 11/14/01 Andy Cress - code complete, see also bmc_ipmi.c ++ * 01/15/02 Andy Cress - changed to show BMC_PANIC tags ++ * 03/22/02 Andy Cress - changed printk messages ++ * 04/16/02 Andy Cress - added bmcpanic_action() routine ++ * 06/04/02 Andy Cress - added bmc_poweroff() routine ++ * 02/26/02 Andy Cress - major rework to use ipmi_send_recv, trim bloat ++ */ ++#include ++#include ++#include /* Routines to manage notifier chains for passing ++ * status changes to any interested routines. */ ++ ++/////////////////////////////////////////////////////////// ++// Global definitions ++////////////////////////////////////////////////////////// ++#define uchar unsigned char ++#define ulong unsigned long ++ ++#define BMC_SA 0x20 // BMC slave address ++#define NETFN_CHAS 0x00 ++#define NETFN_SENS_EVENT 0x04 ++#define NETFN_APP 0x06 ++#define NETFN_STORAGE 0x0A ++ ++#define CHASSIS_CTL 0x02 ++#define GET_SEL_INFO 0x40 ++#define PLATFORM_EVENT 0x02 ++#define KERNEL_SENSOR_ID 0x21 ++ ++/* Defines for the Alarms Panel */ ++#define MASTER_WRITE_READ 0x52 // Command from IPMI 1.5 Table 38-8 ++#define ALARMS_PANEL_WRITE 0x40 // I2C Address 0x40 write to front panel ++#define ALARMS_PANEL_READ 0x41 // I2C Address 0x41 read from front panel ++#define PRIVATE_BUS_ID 0x03 // TAM 8574 lives on 2ndary private bus ++ ++// See Table 36-3 for sensor types - 20h for OS critical stop ++// See Table 36-1 for event types - 6Fh Sensor Specific ++// discrete sensor class ++// See Table 23-6/36-3 for event data ++// data1 - 00b 00b 0001b (runtime) 0000b (initialization stop) ++// data2 - ffh (unspecified) ++// data3 - ffh (unspecified) ++ ++/////////////////////////////////////////////////////////// ++// Global variables ++////////////////////////////////////////////////////////// ++static int fIPMIok = 1; /* Are IPMI commands supported? */ ++static int has_paniced; ++ ++extern struct notifier_block *panic_notifier_list; ++extern char *panic_string; ++extern char *die_str; ++extern long die_err; ++ ++extern void machine_restart(char *cmd); /*from include/linux/reboot.h*/ ++extern int ipmi_panic_init(void); ++extern int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, ++ uchar *sbuf, int slen, uchar *rbuf, int rlen, ++ int *nret, uchar *cc); ++ ++/////////////////////////////////////////////////////////// ++// Subroutines ++////////////////////////////////////////////////////////// ++ ++static int ReadSELinfo(void) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int rc, i; ++ ++ rc = ipmi_send_recv(GET_SEL_INFO,NETFN_STORAGE,0,obuf,0, ++ ibuf,sizeof(ibuf),&i,&cc); ++ if (rc == 0 && cc != 0) rc = cc; ++ if (rc == 0) ++ printk("bmc_panic: Code %d SEL Ver %d Support %d\n", ++ ibuf[0],ibuf[1],ibuf[14]); ++ return(rc); ++} /* end ReadSELinfo()*/ ++ ++static unsigned char getAlarmLED(void) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc, i; ++ unsigned char alarms; ++ ++ /* Get Alarm LED values */ ++ obuf[0] = PRIVATE_BUS_ID; // 0x03; ++ obuf[1] = ALARMS_PANEL_READ; // 0x41; ++ obuf[2] = 1; // one byte of alarms data ++ obuf[3] = 0; // initial alarms value ++ olen = 3; ++ rc = ipmi_send_recv(MASTER_WRITE_READ,NETFN_APP,0, ++ obuf,olen,ibuf,4,&i,&cc); ++ alarms = ibuf[0]; ++ printk("ipmi_panic: get alarms rc=%d cc=%x, alarms=%02x\n", ++ rc,cc,alarms); ++ return(alarms); ++} /*end getAlarmLED*/ ++ ++static int setAlarmLED(unsigned char alarms) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc, i; ++ ++ obuf[0] = PRIVATE_BUS_ID; // 0x03; ++ obuf[1] = ALARMS_PANEL_WRITE; // 0x40; ++ obuf[2] = 1; // one byte of alarms data ++ obuf[3] = (alarms & 0x0D) | 0xF0; // turn on critical alarm ++ olen = 4; ++ rc = ipmi_send_recv(MASTER_WRITE_READ,NETFN_APP,0, ++ obuf,olen,ibuf,0,&i,&cc); ++ printk("ipmi_panic: set crit alarm rc=%d cc=%x\n",rc,cc); ++ if (rc == 0 && cc != 0) rc = cc; ++ return(rc); ++} /*end setAlarmLED*/ ++ ++static int insertPanicRecord(ulong event) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc, i; ++ ++ /* Log the OS Critical Stop to the SEL (BMC firmware log). */ ++ obuf[0] = 0x21; /* Kernel generator ID, IPMI table 5-4 */ ++ obuf[1] = 0x03; /* 3=IPMI10, 4=IPMI15, set as back-compatible w 1.0 */ ++ obuf[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */ ++ obuf[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */ ++ obuf[5] = 0xa1; /* Runtime stop OEM bytes 2 & 3. */ ++ /* ++ * Most panics only have event codes == 0, so use panic_string. ++ * Start of panic string usu indicates module name. ++ */ ++ obuf[3] = panic_string[0]; ++ obuf[6] = panic_string[1]; ++ obuf[7] = panic_string[2]; ++ /* ++ * Add some bits to decode panic type ++ * String above is ASCII, so it will be betw 0x20 and 0x7f. ++ */ ++ if (die_str != NULL && strncmp(die_str,"Oops",4) == 0) ++ obuf[3] |= 0x80; /* Is an Oops */ ++ if (event == 1) obuf[6] |= 0x80; /* In interrupt handler */ ++ if (die_err & 0x01) obuf[7] |= 0x80; /* Null ptr dereference */ ++ olen = 8; ++ rc = ipmi_send_recv(PLATFORM_EVENT,NETFN_SENS_EVENT,0, ++ obuf,olen,ibuf,0,&i,&cc); ++ printk("bmc_panic: log OS Critical Stop rc=%d cc=%x, %c%c%c\n", ++ rc,cc, obuf[3],obuf[6],obuf[7]); ++ if (rc == 0 && cc != 0) rc = cc; ++ return(rc); ++} /*end insertPanicRecord()*/ ++ ++ ++static int panic_event(struct notifier_block *this, unsigned long event, ++ void *ptr) ++{ ++ unsigned char alarm; ++ ++ if (has_paniced) return NOTIFY_DONE; ++ has_paniced = 1; ++ ++#ifdef LINUX_DEBUG ++ SELprintf("panic_string(%p): %s\n",panic_string,panic_string); ++#endif ++ ++ if (fIPMIok) { ++ insertPanicRecord(event); ++ alarm = getAlarmLED(); ++ if (alarm != 0) // valid, ok to setAlarmLED ++ setAlarmLED(alarm); ++ } ++ return NOTIFY_DONE; ++} ++ ++static struct notifier_block panic_block = { ++ panic_event, ++ NULL, ++ 200 /* priority: INT_MAX >= x >= 0 */ ++}; ++ ++/* Initialize the module - Try SEL routines */ ++void init_SEL(void) ++{ ++#ifdef LINUX_DEBUG ++ printk (KERN_INFO "init_SEL: Reading SEL info\n"); ++#endif ++ if (ReadSELinfo() != 0) { ++ /* Nothing to do if the system can't do SEL functions. */ ++ fIPMIok = 0; ++ printk(KERN_ERR "bmc_panic: IPMI failure. unregister device\n"); ++ } ++ else { ++ fIPMIok = 1; ++ printk (KERN_INFO "Registering bmc_panic with panic notifier\n"); ++ notifier_chain_register(&panic_notifier_list, &panic_block); ++ } ++ return ; ++} ++ ++ ++/* Cleanup - unregister the appropriate file from /proc */ ++void cleanup_SEL(void) ++{ ++ printk ( KERN_INFO "Unregistering with panic notifier\n"); ++ notifier_chain_unregister(&panic_notifier_list, &panic_block); ++} ++ ++#ifdef CONFIG_BMCPANIC_ACTION ++#define BMCPANIC_ACTION CONFIG_BMCPANIC_ACTION ++#else ++#define BMCPANIC_ACTION 0 ++#endif ++void bmcpanic_action(void) ++{ ++ int ret, i; ++ unsigned char obuf, cc; ++ ++ if (fIPMIok) ret = BMCPANIC_ACTION; ++ else ret = 0; /* do machine_reset */ ++ switch(ret) ++ { ++ case 1: /* power down */ ++ obuf = 0; ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ break; ++ case 2: /* power cycle */ ++ obuf = 2; ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ break; ++ case 3: /* hard reset */ ++ obuf = 3; /* IPMI hard reset */ ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ break; ++ case 0: /* soft reset */ ++ default: ++ machine_restart(NULL); /* normal Linux reset (arch/i386/) */ ++ } ++} ++ ++void bmc_poweroff(void) ++{ ++ int ret, i; ++ unsigned char obuf, cc; ++ ++ if (fIPMIok) { ++ obuf = 0; ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ } ++} ++ ++/* end bmc_selmsg.c */ +--- linux-2.4.18-orig/arch/i386/kernel/process.c Mon Feb 25 14:37:53 2002 ++++ linux-2.4.18/arch/i386/kernel/process.c Thu Feb 27 14:28:39 2003 +@@ -426,10 +426,19 @@ + { + } + ++#ifdef CONFIG_BMCPANIC ++extern void bmc_poweroff(void); ++#endif ++ + void machine_power_off(void) + { + if (pm_power_off) + pm_power_off(); ++ ++#ifdef CONFIG_BMCPANIC ++ bmc_poweroff(); ++#endif ++ + } + + extern void show_trace(unsigned long* esp); +--- linux-2.4.18-orig/arch/i386/kernel/traps.c Sun Sep 30 15:26:08 2001 ++++ linux-2.4.18/arch/i386/kernel/traps.c Thu Feb 27 14:28:39 2003 +@@ -238,6 +238,8 @@ + } + + spinlock_t die_lock = SPIN_LOCK_UNLOCKED; ++char die_str[64] = ""; ++long die_err = 0; + + void die(const char * str, struct pt_regs * regs, long err) + { +@@ -245,6 +247,8 @@ + spin_lock_irq(&die_lock); + bust_spinlocks(1); + printk("%s: %04lx\n", str, err & 0xffff); ++ die_err = err; ++ strncpy(die_str,str,sizeof(die_str)-1); + show_registers(regs); + bust_spinlocks(0); + spin_unlock_irq(&die_lock); +--- linux-2.4.18-orig/arch/i386/kernel/i386_ksyms.c Mon Feb 25 14:37:53 2002 ++++ linux-2.4.18/arch/i386/kernel/i386_ksyms.c Thu Feb 27 14:28:39 2003 +@@ -31,6 +31,8 @@ + + extern void dump_thread(struct pt_regs *, struct user *); + extern spinlock_t rtc_lock; ++extern char *die_str; ++extern long die_err; + + #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) + extern void machine_real_restart(unsigned char *, int); +@@ -140,6 +142,9 @@ + EXPORT_SYMBOL(__global_save_flags); + EXPORT_SYMBOL(__global_restore_flags); + EXPORT_SYMBOL(smp_call_function); ++ ++EXPORT_SYMBOL(die_str); ++EXPORT_SYMBOL(die_err); + + /* TLB flushing */ + EXPORT_SYMBOL(flush_tlb_page); diff --git a/kern/bmcpanic-2.4.19.patch b/kern/bmcpanic-2.4.19.patch new file mode 100644 index 0000000..ab1d5dd --- /dev/null +++ b/kern/bmcpanic-2.4.19.patch @@ -0,0 +1,997 @@ +--- linux-2.4.19-orig/drivers/char/misc.c Fri Aug 2 20:39:43 2002 ++++ linux-2.4.19/drivers/char/misc.c Thu Feb 27 15:07:25 2003 +@@ -70,6 +70,7 @@ + extern void gfx_register(void); + #endif + extern void streamable_init(void); ++extern int bmc_panic_init(void); + extern int rtc_DP8570A_init(void); + extern int rtc_MK48T08_init(void); + extern int ds1286_init(void); +@@ -266,6 +267,9 @@ + #endif + #ifdef CONFIG_PMAC_PBOOK + pmu_device_init(); ++#endif ++#ifdef CONFIG_BMCPANIC ++ bmc_panic_init(); + #endif + #ifdef CONFIG_SGI_NEWPORT_GFX + gfx_register (); +--- linux-2.4.19-orig/kernel/panic.c Fri Aug 2 20:39:46 2002 ++++ linux-2.4.19/kernel/panic.c Thu Feb 27 15:07:25 2003 +@@ -17,6 +17,10 @@ + #include + #include + ++char *panic_string; ++#ifdef CONFIG_BMCPANIC ++ extern void bmcpanic_action(void); ++#endif + asmlinkage void sys_sync(void); /* it's really int */ + + int panic_timeout; +@@ -53,6 +57,7 @@ + va_start(args, fmt); + vsprintf(buf, fmt, args); + va_end(args); ++ panic_string = buf; + printk(KERN_EMERG "Kernel panic: %s\n",buf); + if (in_interrupt()) + printk(KERN_EMERG "In interrupt handler - not syncing\n"); +@@ -81,7 +86,11 @@ + * choosing not too. It might crash, be corrupt or do + * more harm than good for other reasons. + */ +- machine_restart(NULL); ++#ifdef CONFIG_BMCPANIC ++ bmcpanic_action(); ++#else ++ machine_restart(NULL); ++#endif + } + #ifdef __sparc__ + { +--- linux-2.4.19-orig/kernel/ksyms.c Fri Aug 2 20:39:46 2002 ++++ linux-2.4.19/kernel/ksyms.c Thu Feb 27 15:07:25 2003 +@@ -60,6 +60,7 @@ + + extern void *sys_call_table; + ++extern char *panic_string; + extern struct timezone sys_tz; + extern int request_dma(unsigned int dmanr, char * deviceID); + extern void free_dma(unsigned int dmanr); +@@ -570,3 +571,5 @@ + + EXPORT_SYMBOL(tasklist_lock); + EXPORT_SYMBOL(pidhash); ++EXPORT_SYMBOL(panic_notifier_list); ++EXPORT_SYMBOL(panic_string); +--- linux-2.4.19-orig/Documentation/Configure.help Fri Aug 2 20:39:42 2002 ++++ linux-2.4.19/Documentation/Configure.help Thu Feb 27 15:07:25 2003 +@@ -16640,6 +16640,20 @@ + + If unsure, say N. + ++BMC Panic Handler ++CONFIG_BMCPANIC ++ If you say Y here, additional functions will be added to the ++ panic handler via the panic notifier list. ++ ++ If your system has IPMI support and a BMC (Baseboard Management ++ Controller) on the motherboard, then the following additional ++ functions will be performed if a panic occurs: ++ - Write an OS Critical Stop message to the firmware System Event Log ++ - Turn on the Critical LED on the Telco Alarms panel (if present) ++ - Send a BMC LAN alert via SNMP to a network operations center, ++ if the firmware Platform Event Filter configuration is set to ++ enable this. ++ + Cobalt Networks support + CONFIG_COBALT + Support for Cobalt Networks x86-based servers. +--- linux-2.4.19-orig/drivers/char/Makefile Fri Aug 2 20:39:43 2002 ++++ linux-2.4.19/drivers/char/Makefile Thu Feb 27 15:07:25 2003 +@@ -230,6 +230,9 @@ + obj-y += ftape/ftape.o + endif + ++bmc_panic-objs := bmc_ipmi.o bmc_selmsg.o ++obj-$(CONFIG_BMCPANIC) += bmc_panic.o ++ + obj-$(CONFIG_H8) += h8.o + obj-$(CONFIG_PPDEV) += ppdev.o + obj-$(CONFIG_DZ) += dz.o +@@ -279,6 +282,9 @@ + ./conmakehash $(FONTMAPFILE) > consolemap_deftbl.c + + consolemap_deftbl.o: consolemap_deftbl.c $(TOPDIR)/include/linux/types.h ++ ++bmc_panic.o: $(bmc_panic-objs) ++ $(LD) -r -o $@ $(bmc_panic-objs) + + .DELETE_ON_ERROR: + +--- linux-2.4.19-orig/drivers/char/Config.in Fri Aug 2 20:39:43 2002 ++++ linux-2.4.19/drivers/char/Config.in Thu Feb 27 15:07:25 2003 +@@ -127,6 +127,10 @@ + if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then + int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256 + fi ++bool 'BMC Panic Handler' CONFIG_BMCPANIC ++if [ "$CONFIG_BMCPANIC" != "n" ]; then ++ int ' Action after Panic (0=reset,1=power down,2=power cycle)' CONFIG_BMCPANIC_ACTION 0 ++fi + if [ "$CONFIG_PARPORT" != "n" ]; then + dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT + if [ "$CONFIG_PRINTER" != "n" ]; then +--- /dev/null Fri Mar 23 23:37:44 2001 ++++ linux-2.4.19/drivers/char/bmc_ipmi.c Thu Feb 27 15:07:25 2003 +@@ -0,0 +1,531 @@ ++/* ++ * bmc_ipmi.c ++ * ++ * This code is needed to run a streamlined IPMI KCS command when ++ * the rest of the system may be dead (panic time). It must wait ++ * for completion of the receive function also. ++ * There will be zero or one BMC, with KCS as a minimum and perhaps ++ * other interfaces, so doing KCS to a default BMC LUN is valid here. ++ * ++ * Note that CONFIG_BMCPANIC should be =y (rather than =m) to ++ * ensure that this handler is loaded early enough to cover boot ++ * time panic conditions. CONFIG_BMCPANIC_ACTION can only be ++ * defined if CONFIG_BMCPANIC=y. ++ * ++ * Author: Andy Cress ++ * ++ * Change History: ++ * 01/31/03 Andy Cress - created from valinux ipmi_kcs driver v2.1 ++ * ++ * Copyright 2003 Intel Corp. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * ++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS ++ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ++ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ++ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define uchar unsigned char ++ ++#define KCS_READY_DELAY 5 ++#define BMC_RESPONSE_DELAY 5 ++#define BMC_RETRY_DELAY 60 ++ ++#if defined(__ia64__) ++#define KCS_BASE 0x8a2 ++#else ++#define KCS_BASE 0xca2 ++#endif ++#define KCS_STATUS_REG (KCS_BASE + 1) ++#define KCS_COMMAND_REG (KCS_BASE + 1) ++#define KCS_DATAIN_REG (KCS_BASE + 0) ++#define KCS_DATAOUT_REG (KCS_BASE + 0) ++ ++/* State bits based on S1 & S0 below */ ++#define KCS_STATE_MASK 0xC0 ++#define KCS_IDLE_STATE 0x00 ++#define KCS_READ_STATE 0x40 ++#define KCS_WRITE_STATE 0x80 ++#define KCS_ERROR_STATE 0xC0 ++ ++#define KCS_IBF 0x02 ++#define KCS_OBF 0x01 ++#define KCS_SMS_ATN 0x04 ++ ++#define SEND_INIT 1 ++#define SEND_START 2 ++#define SEND_NEXT 3 ++#define SEND_END 4 ++#define RECV_START 5 ++#define RECV_INIT 6 ++#define RECV_NEXT 7 ++#define RECV_INIT2 8 ++#define RECV_END 9 ++#define END 10 ++#define ERROR 0 ++ ++/* SMS Transfer Stream Control Codes */ ++#define GET_STATUS_ABORT 0x60 ++#define WRITE_START 0x61 ++#define WRITE_END 0x62 ++#define KCS_READ 0x68 ++ ++#define MAX_INVALID_RESPONSE_COUNT 2 ++#define MIN_BMC_RESPONSE_SIZE 3 ++#define MAX_IMB_PACKET_SIZE 33 ++#define MAX_BMC_RESPONSE_SIZE (MIN_BMC_RESPONSE_SIZE + MAX_IMB_PACKET_SIZE) ++#define MAX_XFER_LENGTH (MAX_IMB_PACKET_SIZE * 2) ++ ++#define MAX_BUFFER_SIZE 64 ++ ++typedef struct bmc_response ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ unsigned char cmd; ++ unsigned char cc; ++ unsigned char data[1]; ++ }BMC_RESPONSE; ++ ++typedef struct bmc_request ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ unsigned char cmd; ++ unsigned char data[1]; ++ }BMC_REQUEST; ++ ++/* GET_DEVICE_ID RESPONSE (11 bytes) */ ++typedef struct device_id_response ++ { ++ unsigned char device_id; ++ ++ unsigned char device_revision :4; ++ unsigned char reserved :3; ++ unsigned char provides_sdr :1; ++ ++ unsigned char major_firmware_revision :7; ++ #define NORMAL_OPERATION 0 ++ #define DEVICE_BUSY 1 ++ unsigned char device_available :1; ++ ++ unsigned char minor_firmware_revision; ++ unsigned char ipmi_version_major :4; ++ unsigned char ipmi_version_minor :4; ++ ++ unsigned char supports_sensor_device :1; ++ unsigned char supports_sdr_device :1; ++ unsigned char supports_sel_device :1; ++ unsigned char supports_fru_device :1; ++ unsigned char supports_ipmb_receiver :1; ++ unsigned char supports_ipmb_generator :1; ++ unsigned char supports_bridge :1; ++ unsigned char supports_chassis_device :1; ++ ++ unsigned char manufacturer_id1; ++ unsigned char manufacturer_id2; ++ unsigned char manufacturer_id3; ++ unsigned short product_id; ++ } DEVICE_ID_RESPONSE; ++ ++/*************************************/ ++ ++#if defined(__ia64__) ++static char kcs_new = 1; /* don't even try old kcs */ ++#else ++static char kcs_new = 0; ++#endif ++DECLARE_MUTEX(kcs_sem); ++ ++/*************************************/ ++ ++/* ++ * kcs chip mashing stuff ++ */ ++static int wait_while_ibf(void) ++{ ++ unsigned char status_byte; ++ ++ status_byte = inb_p(KCS_STATUS_REG); ++ if ((status_byte & KCS_IBF) == 0) return (0); ++ mdelay(KCS_READY_DELAY); ++ status_byte = inb_p(KCS_STATUS_REG); ++ if (status_byte & KCS_IBF) return (-1); ++ return (0); ++} ++ ++static int is_obf_set(void) ++{ ++ unsigned char cs; ++ cs = inb_p(KCS_STATUS_REG); ++ return ((cs & KCS_OBF) == KCS_OBF); ++} ++ ++static int wait_until_obf(void) ++{ ++ int retries = 0; ++ ++ while (retries < 2) { ++ if (is_obf_set()) return (0); ++ mdelay(KCS_READY_DELAY); ++ retries++; ++ } ++ return (-ETIMEDOUT); ++} ++ ++static unsigned char get_kcs_state(void) ++{ ++ unsigned char cs; ++ ++ cs = inb_p(KCS_STATUS_REG); ++ return (cs & KCS_STATE_MASK); ++} ++ ++static unsigned char read_kcs_data(void) ++{ ++ unsigned char data; ++ ++ data = inb_p(KCS_DATAOUT_REG); ++ return (data); ++} ++ ++static void write_kcs_data(unsigned char data) ++{ ++ outb_p(data, KCS_DATAIN_REG); ++} ++ ++static void write_kcs_cmd(unsigned char cmd) ++{ ++ outb_p(cmd, KCS_COMMAND_REG); ++} ++ ++static int clear_obf(void) ++{ ++ read_kcs_data(); ++ return (0); ++} ++ ++static int kcs_xfer(BMC_REQUEST * request, int request_len, ++ BMC_RESPONSE * response, int *response_len) ++{ ++ unsigned char *xmit_buffer, *recv_buffer; ++ int i = 0, rc = 0, state = SEND_INIT, bad = 0; ++ ++ xmit_buffer = (unsigned char *) request; ++ recv_buffer = (unsigned char *) response; ++ ++ while (1) { ++ if (state == END) ++ break; ++ else if (bad > 2) { ++ printk("[ipmi_panic] Maximum retries exceeded.\n"); ++ rc = -EIO; ++ break; ++ } ++ switch (state) { ++ case SEND_INIT: ++ { ++ i = 0; ++ state = SEND_START; ++ wait_while_ibf(); ++ if (kcs_new) clear_obf(); ++ } ++ case SEND_START: ++ { ++ state = SEND_NEXT; ++ write_kcs_cmd(WRITE_START); ++ wait_while_ibf(); ++ } ++ case SEND_NEXT: ++ { ++ if (i == (request_len - 1)) { ++ state = SEND_END; ++ break; ++ } ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ if (kcs_new) clear_obf(); ++ break; ++ } ++ case SEND_END: ++ { ++ if (!kcs_new) wait_while_ibf(); ++ write_kcs_cmd(WRITE_END); ++ wait_while_ibf(); ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ if (kcs_new) clear_obf(); ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ state = RECV_START; ++ } ++ case RECV_START: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_WRITE_STATE: ++ case KCS_IDLE_STATE: ++ { ++ mdelay(BMC_RESPONSE_DELAY); ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ i = 0; ++ memset(recv_buffer, 0, ++ *response_len); ++ state = RECV_INIT; ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_INIT: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ state = RECV_END; ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ else mdelay(1); ++ break; ++ } ++ default: ++ { ++ mdelay(1); ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_NEXT: ++ { ++ if (i >= *response_len) { ++ rc = -EOVERFLOW; ++ state = ERROR; ++ break; ++ } ++ recv_buffer[i++] = read_kcs_data(); ++ if (!kcs_new) wait_while_ibf(); ++ write_kcs_data(KCS_READ); ++ if (kcs_new) wait_while_ibf(); ++ state = RECV_INIT2; ++ break; ++ } ++ case RECV_INIT2: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ if (kcs_new) { ++ if (wait_until_obf() == 0) { ++ clear_obf(); ++ state = RECV_END; ++ } else { ++ state = ERROR; ++ } ++ } else { ++ state = RECV_END; ++ } ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (kcs_new) { ++ if (wait_until_obf() == 0) ++ state = RECV_NEXT; ++ else state = ERROR; ++ } else { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ } ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_END: ++ { ++ if ((i < MIN_BMC_RESPONSE_SIZE) || ++ (response->netfn != (request->netfn | 0x01)) ++ || (response->cmd != request->cmd)) { ++ if (request->cmd == 0x01 && ++ request->netfn == 0x06 && ++ response->netfn == 0x2b) /*ok*/; ++ else { /* flag the error */ ++ printk("[ipmi_panic] Request/Response CMD/NETFN mismatch error\n"); ++ ++ printk(" i=%d, RQcmd/RQnetfn=0x%x/0x%x,RScmd/RSnetfn=0x%x/0x%x\n", ++ i, request->cmd, request->netfn, ++ response->cmd, response->netfn); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ ++ *response_len = i; ++ rc = 0; ++ state = END; ++ break; ++ } ++ case ERROR: ++ default: ++ { ++ printk("[ipmi_panic] BMC in bad state (%d) cmd=%02x. Retrying transfer\n", state,request->cmd); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ } ++ return (rc); ++} ++ ++int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, uchar *sbuf, int slen, ++ uchar *rbuf, int rlen, int *nret, uchar *cc) ++{ ++ uchar bmc_outbuf[MAX_BUFFER_SIZE]; ++ uchar bmc_inbuf[MAX_BUFFER_SIZE]; ++ BMC_REQUEST *bmc_req; ++ BMC_RESPONSE *bmc_resp; ++ int bmc_outlen; ++ int bmc_inlen; ++ int rc = 0; ++ ++ if (kcs_new == 2) return (-ENXIO); ++ ++ memset(bmc_outbuf,0, sizeof(bmc_outbuf)); ++ memset(bmc_inbuf,0, sizeof(bmc_inbuf)); ++ bmc_req = (BMC_REQUEST *)bmc_outbuf; ++ bmc_resp = (BMC_RESPONSE *)bmc_inbuf; ++ bmc_req->cmd = cmd; ++ bmc_req->netfn = netfn; ++ bmc_req->lun = lun; ++ bmc_outlen = slen + 2; ++ bmc_inlen = sizeof(bmc_inbuf); ++ if (slen > 0) memcpy(bmc_req->data,sbuf,slen); ++ ++ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); ++ if (bmc_resp->cc == 0xcc) /* flaky NMI fixup */ ++ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); /*retry*/ ++ ++ /* copy the response */ ++ *cc = bmc_resp->cc; ++ if (bmc_inlen > rlen) bmc_inlen = rlen; ++ *nret = bmc_inlen; ++ if (bmc_inlen > 0) memcpy(rbuf,bmc_resp->data,bmc_inlen); ++ ++ return(rc); ++} ++ ++extern void init_SEL(void); ++extern void cleanup_SEL(void); ++ ++int bmc_panic_init(void) ++{ ++ int i, rc; ++ uchar cc; ++ uchar bdev[16]; ++ DEVICE_ID_RESPONSE *dev_id; ++ ++ printk("bmc_panic ipmi driver at io 0x%x\n", KCS_BASE); ++ if ((inb_p(KCS_STATUS_REG) == 0xFF) && ++ (inb_p(KCS_DATAIN_REG) == 0xFF)) { ++ printk("--KCS ISA window not present, exiting.\n"); ++ return (-ENXIO); ++ } ++ ++ /* Get Device ID */ ++ rc = ipmi_send_recv(0x01,0x06,0,NULL,0,bdev,sizeof(bdev),&i,&cc); ++ if (rc != 0) kcs_new = 2; /* bad */ ++ else if (cc != 0) kcs_new = 2; /* bad */ ++ else ++ { ++ dev_id = (DEVICE_ID_RESPONSE *)&bdev[0]; ++ printk("--BMC version %x.%x, IPMI version %d.%d\n", ++ dev_id->major_firmware_revision, ++ dev_id->minor_firmware_revision, ++ dev_id->ipmi_version_major, dev_id->ipmi_version_minor); ++ if ((dev_id->ipmi_version_major == 0) && ++ (dev_id->ipmi_version_minor == 9)) { ++ printk("--Using legacy KCS state machine\n"); ++ kcs_new = 0; ++ } else { ++ printk("--Using new KCS state machine\n"); ++ kcs_new = 1; ++ } ++ } ++ init_SEL(); ++ ++ return(rc); ++} ++ ++#ifdef MODULE ++int init_module(void) ++{ ++ return (bmc_panic_init()); ++} ++ ++void cleanup_module(void) ++{ ++ printk("bmc_panic: Driver shutting down.\n"); ++ cleanup_SEL(); ++} ++#endif ++ ++/* end bmc_ipmi.c */ +--- /dev/null Fri Mar 23 23:37:44 2001 ++++ linux-2.4.19/drivers/char/bmc_selmsg.c Thu Feb 27 15:07:25 2003 +@@ -0,0 +1,269 @@ ++/* ++ * bmc_selmsg.c ++ * routines to send IMB and BMC requests to the SEL and alarms panel. ++ * ++ * 05/07/01 Todd Davis - created ++ * 09/17/01 Andy Cress - some cleanup ++ * 09/26/01 Andy Cress - added setAlarmLED, changed notifier priority ++ * 10/05/01 Andy Cress - fixed setAlarmLED, changed OEM bytes in panic ++ * 10/08/01 Andy Cress - added getAlarmLED ++ * 10/09/01 Andy Cress - save 3 chars of panic_string in SEL ++ * 10/25/01 Andy Cress - fixed confusion w DEBUG macro & LINUX_DEBUG ++ * 11/05/01 Andy Cress - adapted to open source driver calls ++ * 11/14/01 Andy Cress - code complete, see also bmc_ipmi.c ++ * 01/15/02 Andy Cress - changed to show BMC_PANIC tags ++ * 03/22/02 Andy Cress - changed printk messages ++ * 04/16/02 Andy Cress - added bmcpanic_action() routine ++ * 06/04/02 Andy Cress - added bmc_poweroff() routine ++ * 02/26/02 Andy Cress - major rework to use ipmi_send_recv, trim bloat ++ */ ++#include ++#include ++#include /* Routines to manage notifier chains for passing ++ * status changes to any interested routines. */ ++ ++/////////////////////////////////////////////////////////// ++// Global definitions ++////////////////////////////////////////////////////////// ++#define uchar unsigned char ++#define ulong unsigned long ++ ++#define BMC_SA 0x20 // BMC slave address ++#define NETFN_CHAS 0x00 ++#define NETFN_SENS_EVENT 0x04 ++#define NETFN_APP 0x06 ++#define NETFN_STORAGE 0x0A ++ ++#define CHASSIS_CTL 0x02 ++#define GET_SEL_INFO 0x40 ++#define PLATFORM_EVENT 0x02 ++#define KERNEL_SENSOR_ID 0x21 ++ ++/* Defines for the Alarms Panel */ ++#define MASTER_WRITE_READ 0x52 // Command from IPMI 1.5 Table 38-8 ++#define ALARMS_PANEL_WRITE 0x40 // I2C Address 0x40 write to front panel ++#define ALARMS_PANEL_READ 0x41 // I2C Address 0x41 read from front panel ++#define PRIVATE_BUS_ID 0x03 // TAM 8574 lives on 2ndary private bus ++ ++// See Table 36-3 for sensor types - 20h for OS critical stop ++// See Table 36-1 for event types - 6Fh Sensor Specific ++// discrete sensor class ++// See Table 23-6/36-3 for event data ++// data1 - 00b 00b 0001b (runtime) 0000b (initialization stop) ++// data2 - ffh (unspecified) ++// data3 - ffh (unspecified) ++ ++/////////////////////////////////////////////////////////// ++// Global variables ++////////////////////////////////////////////////////////// ++static int fIPMIok = 1; /* Are IPMI commands supported? */ ++static int has_paniced; ++ ++extern struct notifier_block *panic_notifier_list; ++extern char *panic_string; ++extern char *die_str; ++extern long die_err; ++ ++extern void machine_restart(char *cmd); /*from include/linux/reboot.h*/ ++extern int ipmi_panic_init(void); ++extern int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, ++ uchar *sbuf, int slen, uchar *rbuf, int rlen, ++ int *nret, uchar *cc); ++ ++/////////////////////////////////////////////////////////// ++// Subroutines ++////////////////////////////////////////////////////////// ++ ++static int ReadSELinfo(void) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int rc, i; ++ ++ rc = ipmi_send_recv(GET_SEL_INFO,NETFN_STORAGE,0,obuf,0, ++ ibuf,sizeof(ibuf),&i,&cc); ++ if (rc == 0 && cc != 0) rc = cc; ++ if (rc == 0) ++ printk("bmc_panic: Code %d SEL Ver %d Support %d\n", ++ ibuf[0],ibuf[1],ibuf[14]); ++ return(rc); ++} /* end ReadSELinfo()*/ ++ ++static unsigned char getAlarmLED(void) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc, i; ++ unsigned char alarms; ++ ++ /* Get Alarm LED values */ ++ obuf[0] = PRIVATE_BUS_ID; // 0x03; ++ obuf[1] = ALARMS_PANEL_READ; // 0x41; ++ obuf[2] = 1; // one byte of alarms data ++ obuf[3] = 0; // initial alarms value ++ olen = 3; ++ rc = ipmi_send_recv(MASTER_WRITE_READ,NETFN_APP,0, ++ obuf,olen,ibuf,4,&i,&cc); ++ alarms = ibuf[0]; ++ printk("ipmi_panic: get alarms rc=%d cc=%x, alarms=%02x\n", ++ rc,cc,alarms); ++ return(alarms); ++} /*end getAlarmLED*/ ++ ++static int setAlarmLED(unsigned char alarms) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc, i; ++ ++ obuf[0] = PRIVATE_BUS_ID; // 0x03; ++ obuf[1] = ALARMS_PANEL_WRITE; // 0x40; ++ obuf[2] = 1; // one byte of alarms data ++ obuf[3] = (alarms & 0x0D) | 0xF0; // turn on critical alarm ++ olen = 4; ++ rc = ipmi_send_recv(MASTER_WRITE_READ,NETFN_APP,0, ++ obuf,olen,ibuf,0,&i,&cc); ++ printk("ipmi_panic: set crit alarm rc=%d cc=%x\n",rc,cc); ++ if (rc == 0 && cc != 0) rc = cc; ++ return(rc); ++} /*end setAlarmLED*/ ++ ++static int insertPanicRecord(ulong event) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc, i; ++ ++ /* Log the OS Critical Stop to the SEL (BMC firmware log). */ ++ obuf[0] = 0x21; /* Kernel generator ID, IPMI table 5-4 */ ++ obuf[1] = 0x03; /* 3=IPMI10, 4=IPMI15, set as back-compatible w 1.0 */ ++ obuf[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */ ++ obuf[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */ ++ obuf[5] = 0xa1; /* Runtime stop OEM bytes 2 & 3. */ ++ /* ++ * Most panics only have event codes == 0, so use panic_string. ++ * Start of panic string usu indicates module name. ++ */ ++ obuf[3] = panic_string[0]; ++ obuf[6] = panic_string[1]; ++ obuf[7] = panic_string[2]; ++ /* ++ * Add some bits to decode panic type ++ * String above is ASCII, so it will be betw 0x20 and 0x7f. ++ */ ++ if (die_str != NULL && strncmp(die_str,"Oops",4) == 0) ++ obuf[3] |= 0x80; /* Is an Oops */ ++ if (event == 1) obuf[6] |= 0x80; /* In interrupt handler */ ++ if (die_err & 0x01) obuf[7] |= 0x80; /* Null ptr dereference */ ++ olen = 8; ++ rc = ipmi_send_recv(PLATFORM_EVENT,NETFN_SENS_EVENT,0, ++ obuf,olen,ibuf,0,&i,&cc); ++ printk("bmc_panic: log OS Critical Stop rc=%d cc=%x, %c%c%c\n", ++ rc,cc, obuf[3],obuf[6],obuf[7]); ++ if (rc == 0 && cc != 0) rc = cc; ++ return(rc); ++} /*end insertPanicRecord()*/ ++ ++ ++static int panic_event(struct notifier_block *this, unsigned long event, ++ void *ptr) ++{ ++ unsigned char alarm; ++ ++ if (has_paniced) return NOTIFY_DONE; ++ has_paniced = 1; ++ ++#ifdef LINUX_DEBUG ++ SELprintf("panic_string(%p): %s\n",panic_string,panic_string); ++#endif ++ ++ if (fIPMIok) { ++ insertPanicRecord(event); ++ alarm = getAlarmLED(); ++ if (alarm != 0) // valid, ok to setAlarmLED ++ setAlarmLED(alarm); ++ } ++ return NOTIFY_DONE; ++} ++ ++static struct notifier_block panic_block = { ++ panic_event, ++ NULL, ++ 200 /* priority: INT_MAX >= x >= 0 */ ++}; ++ ++/* Initialize the module - Try SEL routines */ ++void init_SEL(void) ++{ ++#ifdef LINUX_DEBUG ++ printk (KERN_INFO "init_SEL: Reading SEL info\n"); ++#endif ++ if (ReadSELinfo() != 0) { ++ /* Nothing to do if the system can't do SEL functions. */ ++ fIPMIok = 0; ++ printk(KERN_ERR "bmc_panic: IPMI failure. unregister device\n"); ++ } ++ else { ++ fIPMIok = 1; ++ printk (KERN_INFO "Registering bmc_panic with panic notifier\n"); ++ notifier_chain_register(&panic_notifier_list, &panic_block); ++ } ++ return ; ++} ++ ++ ++/* Cleanup - unregister the appropriate file from /proc */ ++void cleanup_SEL(void) ++{ ++ printk ( KERN_INFO "Unregistering with panic notifier\n"); ++ notifier_chain_unregister(&panic_notifier_list, &panic_block); ++} ++ ++#ifdef CONFIG_BMCPANIC_ACTION ++#define BMCPANIC_ACTION CONFIG_BMCPANIC_ACTION ++#else ++#define BMCPANIC_ACTION 0 ++#endif ++void bmcpanic_action(void) ++{ ++ int ret, i; ++ unsigned char obuf, cc; ++ ++ if (fIPMIok) ret = BMCPANIC_ACTION; ++ else ret = 0; /* do machine_reset */ ++ switch(ret) ++ { ++ case 1: /* power down */ ++ obuf = 0; ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ break; ++ case 2: /* power cycle */ ++ obuf = 2; ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ break; ++ case 3: /* hard reset */ ++ obuf = 3; /* IPMI hard reset */ ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ break; ++ case 0: /* soft reset */ ++ default: ++ machine_restart(NULL); /* normal Linux reset (arch/i386/) */ ++ } ++} ++ ++void bmc_poweroff(void) ++{ ++ int ret, i; ++ unsigned char obuf, cc; ++ ++ if (fIPMIok) { ++ obuf = 0; ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ } ++} ++ ++/* end bmc_selmsg.c */ +--- linux-2.4.19-orig/arch/i386/kernel/process.c Fri Aug 2 20:39:42 2002 ++++ linux-2.4.19/arch/i386/kernel/process.c Thu Feb 27 15:07:25 2003 +@@ -426,10 +426,19 @@ + { + } + ++#ifdef CONFIG_BMCPANIC ++extern void bmc_poweroff(void); ++#endif ++ + void machine_power_off(void) + { + if (pm_power_off) + pm_power_off(); ++ ++#ifdef CONFIG_BMCPANIC ++ bmc_poweroff(); ++#endif ++ + } + + extern void show_trace(unsigned long* esp); +--- linux-2.4.19-orig/arch/i386/kernel/traps.c Fri Aug 2 20:39:42 2002 ++++ linux-2.4.19/arch/i386/kernel/traps.c Thu Feb 27 15:07:25 2003 +@@ -273,6 +273,8 @@ + } + + spinlock_t die_lock = SPIN_LOCK_UNLOCKED; ++char die_str[64] = ""; ++long die_err = 0; + + void die(const char * str, struct pt_regs * regs, long err) + { +@@ -281,6 +283,8 @@ + bust_spinlocks(1); + handle_BUG(regs); + printk("%s: %04lx\n", str, err & 0xffff); ++ die_err = err; ++ strncpy(die_str,str,sizeof(die_str)-1); + show_registers(regs); + bust_spinlocks(0); + spin_unlock_irq(&die_lock); +--- linux-2.4.19-orig/arch/i386/kernel/i386_ksyms.c Fri Aug 2 20:39:42 2002 ++++ linux-2.4.19/arch/i386/kernel/i386_ksyms.c Thu Feb 27 15:07:25 2003 +@@ -31,6 +31,8 @@ + + extern void dump_thread(struct pt_regs *, struct user *); + extern spinlock_t rtc_lock; ++extern char *die_str; ++extern long die_err; + + #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) + extern void machine_real_restart(unsigned char *, int); +@@ -141,6 +143,9 @@ + EXPORT_SYMBOL(__global_save_flags); + EXPORT_SYMBOL(__global_restore_flags); + EXPORT_SYMBOL(smp_call_function); ++ ++EXPORT_SYMBOL(die_str); ++EXPORT_SYMBOL(die_err); + + /* TLB flushing */ + EXPORT_SYMBOL(flush_tlb_page); diff --git a/kern/bmcpanic-2.4.20.patch b/kern/bmcpanic-2.4.20.patch new file mode 100644 index 0000000..11caf32 --- /dev/null +++ b/kern/bmcpanic-2.4.20.patch @@ -0,0 +1,1000 @@ +--- linux-2.4.20-orig/drivers/char/misc.c Fri Aug 2 20:39:43 2002 ++++ linux-2.4.20/drivers/char/misc.c Wed Feb 26 16:33:48 2003 +@@ -70,6 +70,7 @@ + extern void gfx_register(void); + #endif + extern void streamable_init(void); ++extern int bmc_panic_init(void); + extern int rtc_DP8570A_init(void); + extern int rtc_MK48T08_init(void); + extern int ds1286_init(void); +@@ -266,6 +267,9 @@ + #endif + #ifdef CONFIG_PMAC_PBOOK + pmu_device_init(); ++#endif ++#ifdef CONFIG_BMCPANIC ++ bmc_panic_init(); + #endif + #ifdef CONFIG_SGI_NEWPORT_GFX + gfx_register (); +--- linux-2.4.20-orig/kernel/panic.c Thu Nov 28 18:53:15 2002 ++++ linux-2.4.20/kernel/panic.c Wed Feb 26 14:26:36 2003 +@@ -17,6 +17,10 @@ + #include + #include + ++char *panic_string; ++#ifdef CONFIG_BMCPANIC ++ extern void bmcpanic_action(void); ++#endif + asmlinkage void sys_sync(void); /* it's really int */ + + int panic_timeout; +@@ -53,6 +57,7 @@ + va_start(args, fmt); + vsprintf(buf, fmt, args); + va_end(args); ++ panic_string = buf; + printk(KERN_EMERG "Kernel panic: %s\n",buf); + if (in_interrupt()) + printk(KERN_EMERG "In interrupt handler - not syncing\n"); +@@ -81,7 +86,11 @@ + * choosing not too. It might crash, be corrupt or do + * more harm than good for other reasons. + */ +- machine_restart(NULL); ++#ifdef CONFIG_BMCPANIC ++ bmcpanic_action(); ++#else ++ machine_restart(NULL); ++#endif + } + #ifdef __sparc__ + { +--- linux-2.4.20-orig/kernel/ksyms.c Thu Nov 28 18:53:15 2002 ++++ linux-2.4.20/kernel/ksyms.c Wed Feb 26 14:27:26 2003 +@@ -61,6 +61,7 @@ + + extern void *sys_call_table; + ++extern char *panic_string; + extern struct timezone sys_tz; + extern int request_dma(unsigned int dmanr, char * deviceID); + extern void free_dma(unsigned int dmanr); +@@ -576,6 +577,8 @@ + + EXPORT_SYMBOL(tasklist_lock); + EXPORT_SYMBOL(pidhash); ++EXPORT_SYMBOL(panic_notifier_list); ++EXPORT_SYMBOL(panic_string); + + /* debug */ + EXPORT_SYMBOL(dump_stack); +--- linux-2.4.20-orig/Documentation/Configure.help Thu Nov 28 18:53:08 2002 ++++ linux-2.4.20/Documentation/Configure.help Wed Feb 26 14:26:36 2003 +@@ -17414,6 +17414,20 @@ + + If unsure, say N. + ++BMC Panic Handler ++CONFIG_BMCPANIC ++ If you say Y here, additional functions will be added to the ++ panic handler via the panic notifier list. ++ ++ If your system has IPMI support and a BMC (Baseboard Management ++ Controller) on the motherboard, then the following additional ++ functions will be performed if a panic occurs: ++ - Write an OS Critical Stop message to the firmware System Event Log ++ - Turn on the Critical LED on the Telco Alarms panel (if present) ++ - Send a BMC LAN alert via SNMP to a network operations center, ++ if the firmware Platform Event Filter configuration is set to ++ enable this. ++ + Cobalt Networks support + CONFIG_COBALT + Support for Cobalt Networks x86-based servers. +--- linux-2.4.20-orig/drivers/char/Makefile Thu Nov 28 18:53:12 2002 ++++ linux-2.4.20/drivers/char/Makefile Wed Feb 26 14:26:36 2003 +@@ -249,6 +249,9 @@ + obj-y += ftape/ftape.o + endif + ++bmc_panic-objs := bmc_ipmi.o bmc_selmsg.o ++obj-$(CONFIG_BMCPANIC) += bmc_panic.o ++ + obj-$(CONFIG_H8) += h8.o + obj-$(CONFIG_PPDEV) += ppdev.o + obj-$(CONFIG_DZ) += dz.o +@@ -300,6 +303,9 @@ + ./conmakehash $(FONTMAPFILE) > consolemap_deftbl.c + + consolemap_deftbl.o: consolemap_deftbl.c $(TOPDIR)/include/linux/types.h ++ ++bmc_panic.o: $(bmc_panic-objs) ++ $(LD) -r -o $@ $(bmc_panic-objs) + + .DELETE_ON_ERROR: + +--- linux-2.4.20-orig/drivers/char/Config.in Thu Nov 28 18:53:12 2002 ++++ linux-2.4.20/drivers/char/Config.in Wed Feb 26 14:26:36 2003 +@@ -141,6 +141,10 @@ + if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then + int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256 + fi ++bool 'BMC Panic Handler' CONFIG_BMCPANIC ++if [ "$CONFIG_BMCPANIC" != "n" ]; then ++ int ' Action after Panic (0=reset,1=power down,2=power cycle)' CONFIG_BMCPANIC_ACTION 0 ++fi + if [ "$CONFIG_PARPORT" != "n" ]; then + dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT + if [ "$CONFIG_PRINTER" != "n" ]; then +--- /dev/null Fri Mar 23 23:37:44 2001 ++++ linux-2.4.20/drivers/char/bmc_ipmi.c Thu Feb 27 11:54:39 2003 +@@ -0,0 +1,531 @@ ++/* ++ * bmc_ipmi.c ++ * ++ * This code is needed to run a streamlined IPMI KCS command when ++ * the rest of the system may be dead (panic time). It must wait ++ * for completion of the receive function also. ++ * There will be zero or one BMC, with KCS as a minimum and perhaps ++ * other interfaces, so doing KCS to a default BMC LUN is valid here. ++ * ++ * Note that CONFIG_BMCPANIC should be =y (rather than =m) to ++ * ensure that this handler is loaded early enough to cover boot ++ * time panic conditions. CONFIG_BMCPANIC_ACTION can only be ++ * defined if CONFIG_BMCPANIC=y. ++ * ++ * Author: Andy Cress ++ * ++ * Change History: ++ * 01/31/03 Andy Cress - created from valinux ipmi_kcs driver v2.1 ++ * ++ * Copyright 2003 Intel Corp. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * ++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS ++ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ++ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ++ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define uchar unsigned char ++ ++#define KCS_READY_DELAY 5 ++#define BMC_RESPONSE_DELAY 5 ++#define BMC_RETRY_DELAY 60 ++ ++#if defined(__ia64__) ++#define KCS_BASE 0x8a2 ++#else ++#define KCS_BASE 0xca2 ++#endif ++#define KCS_STATUS_REG (KCS_BASE + 1) ++#define KCS_COMMAND_REG (KCS_BASE + 1) ++#define KCS_DATAIN_REG (KCS_BASE + 0) ++#define KCS_DATAOUT_REG (KCS_BASE + 0) ++ ++/* State bits based on S1 & S0 below */ ++#define KCS_STATE_MASK 0xC0 ++#define KCS_IDLE_STATE 0x00 ++#define KCS_READ_STATE 0x40 ++#define KCS_WRITE_STATE 0x80 ++#define KCS_ERROR_STATE 0xC0 ++ ++#define KCS_IBF 0x02 ++#define KCS_OBF 0x01 ++#define KCS_SMS_ATN 0x04 ++ ++#define SEND_INIT 1 ++#define SEND_START 2 ++#define SEND_NEXT 3 ++#define SEND_END 4 ++#define RECV_START 5 ++#define RECV_INIT 6 ++#define RECV_NEXT 7 ++#define RECV_INIT2 8 ++#define RECV_END 9 ++#define END 10 ++#define ERROR 0 ++ ++/* SMS Transfer Stream Control Codes */ ++#define GET_STATUS_ABORT 0x60 ++#define WRITE_START 0x61 ++#define WRITE_END 0x62 ++#define KCS_READ 0x68 ++ ++#define MAX_INVALID_RESPONSE_COUNT 2 ++#define MIN_BMC_RESPONSE_SIZE 3 ++#define MAX_IMB_PACKET_SIZE 33 ++#define MAX_BMC_RESPONSE_SIZE (MIN_BMC_RESPONSE_SIZE + MAX_IMB_PACKET_SIZE) ++#define MAX_XFER_LENGTH (MAX_IMB_PACKET_SIZE * 2) ++ ++#define MAX_BUFFER_SIZE 64 ++ ++typedef struct bmc_response ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ unsigned char cmd; ++ unsigned char cc; ++ unsigned char data[1]; ++ }BMC_RESPONSE; ++ ++typedef struct bmc_request ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ unsigned char cmd; ++ unsigned char data[1]; ++ }BMC_REQUEST; ++ ++/* GET_DEVICE_ID RESPONSE (11 bytes) */ ++typedef struct device_id_response ++ { ++ unsigned char device_id; ++ ++ unsigned char device_revision :4; ++ unsigned char reserved :3; ++ unsigned char provides_sdr :1; ++ ++ unsigned char major_firmware_revision :7; ++ #define NORMAL_OPERATION 0 ++ #define DEVICE_BUSY 1 ++ unsigned char device_available :1; ++ ++ unsigned char minor_firmware_revision; ++ unsigned char ipmi_version_major :4; ++ unsigned char ipmi_version_minor :4; ++ ++ unsigned char supports_sensor_device :1; ++ unsigned char supports_sdr_device :1; ++ unsigned char supports_sel_device :1; ++ unsigned char supports_fru_device :1; ++ unsigned char supports_ipmb_receiver :1; ++ unsigned char supports_ipmb_generator :1; ++ unsigned char supports_bridge :1; ++ unsigned char supports_chassis_device :1; ++ ++ unsigned char manufacturer_id1; ++ unsigned char manufacturer_id2; ++ unsigned char manufacturer_id3; ++ unsigned short product_id; ++ } DEVICE_ID_RESPONSE; ++ ++/*************************************/ ++ ++#if defined(__ia64__) ++static char kcs_new = 1; /* don't even try old kcs */ ++#else ++static char kcs_new = 0; ++#endif ++DECLARE_MUTEX(kcs_sem); ++ ++/*************************************/ ++ ++/* ++ * kcs chip mashing stuff ++ */ ++static int wait_while_ibf(void) ++{ ++ unsigned char status_byte; ++ ++ status_byte = inb_p(KCS_STATUS_REG); ++ if ((status_byte & KCS_IBF) == 0) return (0); ++ mdelay(KCS_READY_DELAY); ++ status_byte = inb_p(KCS_STATUS_REG); ++ if (status_byte & KCS_IBF) return (-1); ++ return (0); ++} ++ ++static int is_obf_set(void) ++{ ++ unsigned char cs; ++ cs = inb_p(KCS_STATUS_REG); ++ return ((cs & KCS_OBF) == KCS_OBF); ++} ++ ++static int wait_until_obf(void) ++{ ++ int retries = 0; ++ ++ while (retries < 2) { ++ if (is_obf_set()) return (0); ++ mdelay(KCS_READY_DELAY); ++ retries++; ++ } ++ return (-ETIMEDOUT); ++} ++ ++static unsigned char get_kcs_state(void) ++{ ++ unsigned char cs; ++ ++ cs = inb_p(KCS_STATUS_REG); ++ return (cs & KCS_STATE_MASK); ++} ++ ++static unsigned char read_kcs_data(void) ++{ ++ unsigned char data; ++ ++ data = inb_p(KCS_DATAOUT_REG); ++ return (data); ++} ++ ++static void write_kcs_data(unsigned char data) ++{ ++ outb_p(data, KCS_DATAIN_REG); ++} ++ ++static void write_kcs_cmd(unsigned char cmd) ++{ ++ outb_p(cmd, KCS_COMMAND_REG); ++} ++ ++static int clear_obf(void) ++{ ++ read_kcs_data(); ++ return (0); ++} ++ ++static int kcs_xfer(BMC_REQUEST * request, int request_len, ++ BMC_RESPONSE * response, int *response_len) ++{ ++ unsigned char *xmit_buffer, *recv_buffer; ++ int i = 0, rc = 0, state = SEND_INIT, bad = 0; ++ ++ xmit_buffer = (unsigned char *) request; ++ recv_buffer = (unsigned char *) response; ++ ++ while (1) { ++ if (state == END) ++ break; ++ else if (bad > 2) { ++ printk("[ipmi_panic] Maximum retries exceeded.\n"); ++ rc = -EIO; ++ break; ++ } ++ switch (state) { ++ case SEND_INIT: ++ { ++ i = 0; ++ state = SEND_START; ++ wait_while_ibf(); ++ if (kcs_new) clear_obf(); ++ } ++ case SEND_START: ++ { ++ state = SEND_NEXT; ++ write_kcs_cmd(WRITE_START); ++ wait_while_ibf(); ++ } ++ case SEND_NEXT: ++ { ++ if (i == (request_len - 1)) { ++ state = SEND_END; ++ break; ++ } ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ if (kcs_new) clear_obf(); ++ break; ++ } ++ case SEND_END: ++ { ++ if (!kcs_new) wait_while_ibf(); ++ write_kcs_cmd(WRITE_END); ++ wait_while_ibf(); ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ if (kcs_new) clear_obf(); ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ state = RECV_START; ++ } ++ case RECV_START: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_WRITE_STATE: ++ case KCS_IDLE_STATE: ++ { ++ mdelay(BMC_RESPONSE_DELAY); ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ i = 0; ++ memset(recv_buffer, 0, ++ *response_len); ++ state = RECV_INIT; ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_INIT: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ state = RECV_END; ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ else mdelay(1); ++ break; ++ } ++ default: ++ { ++ mdelay(1); ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_NEXT: ++ { ++ if (i >= *response_len) { ++ rc = -EOVERFLOW; ++ state = ERROR; ++ break; ++ } ++ recv_buffer[i++] = read_kcs_data(); ++ if (!kcs_new) wait_while_ibf(); ++ write_kcs_data(KCS_READ); ++ if (kcs_new) wait_while_ibf(); ++ state = RECV_INIT2; ++ break; ++ } ++ case RECV_INIT2: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ if (kcs_new) { ++ if (wait_until_obf() == 0) { ++ clear_obf(); ++ state = RECV_END; ++ } else { ++ state = ERROR; ++ } ++ } else { ++ state = RECV_END; ++ } ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (kcs_new) { ++ if (wait_until_obf() == 0) ++ state = RECV_NEXT; ++ else state = ERROR; ++ } else { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ } ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_END: ++ { ++ if ((i < MIN_BMC_RESPONSE_SIZE) || ++ (response->netfn != (request->netfn | 0x01)) ++ || (response->cmd != request->cmd)) { ++ if (request->cmd == 0x01 && ++ request->netfn == 0x06 && ++ response->netfn == 0x2b) /*ok*/; ++ else { /* flag the error */ ++ printk("[ipmi_panic] Request/Response CMD/NETFN mismatch error\n"); ++ ++ printk(" i=%d, RQcmd/RQnetfn=0x%x/0x%x,RScmd/RSnetfn=0x%x/0x%x\n", ++ i, request->cmd, request->netfn, ++ response->cmd, response->netfn); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ ++ *response_len = i; ++ rc = 0; ++ state = END; ++ break; ++ } ++ case ERROR: ++ default: ++ { ++ printk("[ipmi_panic] BMC in bad state (%d) cmd=%02x. Retrying transfer\n", state,request->cmd); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ } ++ return (rc); ++} ++ ++int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, uchar *sbuf, int slen, ++ uchar *rbuf, int rlen, int *nret, uchar *cc) ++{ ++ uchar bmc_outbuf[MAX_BUFFER_SIZE]; ++ uchar bmc_inbuf[MAX_BUFFER_SIZE]; ++ BMC_REQUEST *bmc_req; ++ BMC_RESPONSE *bmc_resp; ++ int bmc_outlen; ++ int bmc_inlen; ++ int rc = 0; ++ ++ if (kcs_new == 2) return (-ENXIO); ++ ++ memset(bmc_outbuf,0, sizeof(bmc_outbuf)); ++ memset(bmc_inbuf,0, sizeof(bmc_inbuf)); ++ bmc_req = (BMC_REQUEST *)bmc_outbuf; ++ bmc_resp = (BMC_RESPONSE *)bmc_inbuf; ++ bmc_req->cmd = cmd; ++ bmc_req->netfn = netfn; ++ bmc_req->lun = lun; ++ bmc_outlen = slen + 2; ++ bmc_inlen = sizeof(bmc_inbuf); ++ if (slen > 0) memcpy(bmc_req->data,sbuf,slen); ++ ++ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); ++ if (bmc_resp->cc == 0xcc) /* flaky NMI fixup */ ++ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); /*retry*/ ++ ++ /* copy the response */ ++ *cc = bmc_resp->cc; ++ if (bmc_inlen > rlen) bmc_inlen = rlen; ++ *nret = bmc_inlen; ++ if (bmc_inlen > 0) memcpy(rbuf,bmc_resp->data,bmc_inlen); ++ ++ return(rc); ++} ++ ++extern void init_SEL(void); ++extern void cleanup_SEL(void); ++ ++int bmc_panic_init(void) ++{ ++ int i, rc; ++ uchar cc; ++ uchar bdev[16]; ++ DEVICE_ID_RESPONSE *dev_id; ++ ++ printk("bmc_panic ipmi driver at io 0x%x\n", KCS_BASE); ++ if ((inb_p(KCS_STATUS_REG) == 0xFF) && ++ (inb_p(KCS_DATAIN_REG) == 0xFF)) { ++ printk("--KCS ISA window not present, exiting.\n"); ++ return (-ENXIO); ++ } ++ ++ /* Get Device ID */ ++ rc = ipmi_send_recv(0x01,0x06,0,NULL,0,bdev,sizeof(bdev),&i,&cc); ++ if (rc != 0) kcs_new = 2; /* bad */ ++ else if (cc != 0) kcs_new = 2; /* bad */ ++ else ++ { ++ dev_id = (DEVICE_ID_RESPONSE *)&bdev[0]; ++ printk("--BMC version %x.%x, IPMI version %d.%d\n", ++ dev_id->major_firmware_revision, ++ dev_id->minor_firmware_revision, ++ dev_id->ipmi_version_major, dev_id->ipmi_version_minor); ++ if ((dev_id->ipmi_version_major == 0) && ++ (dev_id->ipmi_version_minor == 9)) { ++ printk("--Using legacy KCS state machine\n"); ++ kcs_new = 0; ++ } else { ++ printk("--Using new KCS state machine\n"); ++ kcs_new = 1; ++ } ++ } ++ init_SEL(); ++ ++ return(rc); ++} ++ ++#ifdef MODULE ++int init_module(void) ++{ ++ return (bmc_panic_init()); ++} ++ ++void cleanup_module(void) ++{ ++ printk("bmc_panic: Driver shutting down.\n"); ++ cleanup_SEL(); ++} ++#endif ++ ++/* end bmc_ipmi.c */ +--- /dev/null Fri Mar 23 23:37:44 2001 ++++ linux-2.4.20/drivers/char/bmc_selmsg.c Thu Feb 27 11:58:31 2003 +@@ -0,0 +1,269 @@ ++/* ++ * bmc_selmsg.c ++ * routines to send IMB and BMC requests to the SEL and alarms panel. ++ * ++ * 05/07/01 Todd Davis - created ++ * 09/17/01 Andy Cress - some cleanup ++ * 09/26/01 Andy Cress - added setAlarmLED, changed notifier priority ++ * 10/05/01 Andy Cress - fixed setAlarmLED, changed OEM bytes in panic ++ * 10/08/01 Andy Cress - added getAlarmLED ++ * 10/09/01 Andy Cress - save 3 chars of panic_string in SEL ++ * 10/25/01 Andy Cress - fixed confusion w DEBUG macro & LINUX_DEBUG ++ * 11/05/01 Andy Cress - adapted to open source driver calls ++ * 11/14/01 Andy Cress - code complete, see also bmc_ipmi.c ++ * 01/15/02 Andy Cress - changed to show BMC_PANIC tags ++ * 03/22/02 Andy Cress - changed printk messages ++ * 04/16/02 Andy Cress - added bmcpanic_action() routine ++ * 06/04/02 Andy Cress - added bmc_poweroff() routine ++ * 02/26/02 Andy Cress - major rework to use ipmi_send_recv, trim bloat ++ */ ++#include ++#include ++#include /* Routines to manage notifier chains for passing ++ * status changes to any interested routines. */ ++ ++/////////////////////////////////////////////////////////// ++// Global definitions ++////////////////////////////////////////////////////////// ++#define uchar unsigned char ++#define ulong unsigned long ++ ++#define BMC_SA 0x20 // BMC slave address ++#define NETFN_CHAS 0x00 ++#define NETFN_SENS_EVENT 0x04 ++#define NETFN_APP 0x06 ++#define NETFN_STORAGE 0x0A ++ ++#define CHASSIS_CTL 0x02 ++#define GET_SEL_INFO 0x40 ++#define PLATFORM_EVENT 0x02 ++#define KERNEL_SENSOR_ID 0x21 ++ ++/* Defines for the Alarms Panel */ ++#define MASTER_WRITE_READ 0x52 // Command from IPMI 1.5 Table 38-8 ++#define ALARMS_PANEL_WRITE 0x40 // I2C Address 0x40 write to front panel ++#define ALARMS_PANEL_READ 0x41 // I2C Address 0x41 read from front panel ++#define PRIVATE_BUS_ID 0x03 // TAM 8574 lives on 2ndary private bus ++ ++// See Table 36-3 for sensor types - 20h for OS critical stop ++// See Table 36-1 for event types - 6Fh Sensor Specific ++// discrete sensor class ++// See Table 23-6/36-3 for event data ++// data1 - 00b 00b 0001b (runtime) 0000b (initialization stop) ++// data2 - ffh (unspecified) ++// data3 - ffh (unspecified) ++ ++/////////////////////////////////////////////////////////// ++// Global variables ++////////////////////////////////////////////////////////// ++static int fIPMIok = 1; /* Are IPMI commands supported? */ ++static int has_paniced; ++ ++extern struct notifier_block *panic_notifier_list; ++extern char *panic_string; ++extern char *die_str; ++extern long die_err; ++ ++extern void machine_restart(char *cmd); /*from include/linux/reboot.h*/ ++extern int ipmi_panic_init(void); ++extern int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, ++ uchar *sbuf, int slen, uchar *rbuf, int rlen, ++ int *nret, uchar *cc); ++ ++/////////////////////////////////////////////////////////// ++// Subroutines ++////////////////////////////////////////////////////////// ++ ++static int ReadSELinfo(void) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int rc, i; ++ ++ rc = ipmi_send_recv(GET_SEL_INFO,NETFN_STORAGE,0,obuf,0, ++ ibuf,sizeof(ibuf),&i,&cc); ++ if (rc == 0 && cc != 0) rc = cc; ++ if (rc == 0) ++ printk("bmc_panic: Code %d SEL Ver %d Support %d\n", ++ ibuf[0],ibuf[1],ibuf[14]); ++ return(rc); ++} /* end ReadSELinfo()*/ ++ ++static unsigned char getAlarmLED(void) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc, i; ++ unsigned char alarms; ++ ++ /* Get Alarm LED values */ ++ obuf[0] = PRIVATE_BUS_ID; // 0x03; ++ obuf[1] = ALARMS_PANEL_READ; // 0x41; ++ obuf[2] = 1; // one byte of alarms data ++ obuf[3] = 0; // initial alarms value ++ olen = 3; ++ rc = ipmi_send_recv(MASTER_WRITE_READ,NETFN_APP,0, ++ obuf,olen,ibuf,4,&i,&cc); ++ alarms = ibuf[0]; ++ printk("ipmi_panic: get alarms rc=%d cc=%x, alarms=%02x\n", ++ rc,cc,alarms); ++ return(alarms); ++} /*end getAlarmLED*/ ++ ++static int setAlarmLED(unsigned char alarms) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc, i; ++ ++ obuf[0] = PRIVATE_BUS_ID; // 0x03; ++ obuf[1] = ALARMS_PANEL_WRITE; // 0x40; ++ obuf[2] = 1; // one byte of alarms data ++ obuf[3] = (alarms & 0x0D) | 0xF0; // turn on critical alarm ++ olen = 4; ++ rc = ipmi_send_recv(MASTER_WRITE_READ,NETFN_APP,0, ++ obuf,olen,ibuf,0,&i,&cc); ++ printk("ipmi_panic: set crit alarm rc=%d cc=%x\n",rc,cc); ++ if (rc == 0 && cc != 0) rc = cc; ++ return(rc); ++} /*end setAlarmLED*/ ++ ++static int insertPanicRecord(ulong event) ++{ ++ unsigned char cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc, i; ++ ++ /* Log the OS Critical Stop to the SEL (BMC firmware log). */ ++ obuf[0] = 0x21; /* Kernel generator ID, IPMI table 5-4 */ ++ obuf[1] = 0x03; /* 3=IPMI10, 4=IPMI15, set as back-compatible w 1.0 */ ++ obuf[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */ ++ obuf[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */ ++ obuf[5] = 0xa1; /* Runtime stop OEM bytes 2 & 3. */ ++ /* ++ * Most panics only have event codes == 0, so use panic_string. ++ * Start of panic string usu indicates module name. ++ */ ++ obuf[3] = panic_string[0]; ++ obuf[6] = panic_string[1]; ++ obuf[7] = panic_string[2]; ++ /* ++ * Add some bits to decode panic type ++ * String above is ASCII, so it will be betw 0x20 and 0x7f. ++ */ ++ if (die_str != NULL && strncmp(die_str,"Oops",4) == 0) ++ obuf[3] |= 0x80; /* Is an Oops */ ++ if (event == 1) obuf[6] |= 0x80; /* In interrupt handler */ ++ if (die_err & 0x01) obuf[7] |= 0x80; /* Null ptr dereference */ ++ olen = 8; ++ rc = ipmi_send_recv(PLATFORM_EVENT,NETFN_SENS_EVENT,0, ++ obuf,olen,ibuf,0,&i,&cc); ++ printk("bmc_panic: log OS Critical Stop rc=%d cc=%x, %c%c%c\n", ++ rc,cc, obuf[3],obuf[6],obuf[7]); ++ if (rc == 0 && cc != 0) rc = cc; ++ return(rc); ++} /*end insertPanicRecord()*/ ++ ++ ++static int panic_event(struct notifier_block *this, unsigned long event, ++ void *ptr) ++{ ++ unsigned char alarm; ++ ++ if (has_paniced) return NOTIFY_DONE; ++ has_paniced = 1; ++ ++#ifdef LINUX_DEBUG ++ SELprintf("panic_string(%p): %s\n",panic_string,panic_string); ++#endif ++ ++ if (fIPMIok) { ++ insertPanicRecord(event); ++ alarm = getAlarmLED(); ++ if (alarm != 0) // valid, ok to setAlarmLED ++ setAlarmLED(alarm); ++ } ++ return NOTIFY_DONE; ++} ++ ++static struct notifier_block panic_block = { ++ panic_event, ++ NULL, ++ 200 /* priority: INT_MAX >= x >= 0 */ ++}; ++ ++/* Initialize the module - Try SEL routines */ ++void init_SEL(void) ++{ ++#ifdef LINUX_DEBUG ++ printk (KERN_INFO "init_SEL: Reading SEL info\n"); ++#endif ++ if (ReadSELinfo() != 0) { ++ /* Nothing to do if the system can't do SEL functions. */ ++ fIPMIok = 0; ++ printk(KERN_ERR "bmc_panic: IPMI failure. unregister device\n"); ++ } ++ else { ++ fIPMIok = 1; ++ printk (KERN_INFO "Registering bmc_panic with panic notifier\n"); ++ notifier_chain_register(&panic_notifier_list, &panic_block); ++ } ++ return ; ++} ++ ++ ++/* Cleanup - unregister the appropriate file from /proc */ ++void cleanup_SEL(void) ++{ ++ printk ( KERN_INFO "Unregistering with panic notifier\n"); ++ notifier_chain_unregister(&panic_notifier_list, &panic_block); ++} ++ ++#ifdef CONFIG_BMCPANIC_ACTION ++#define BMCPANIC_ACTION CONFIG_BMCPANIC_ACTION ++#else ++#define BMCPANIC_ACTION 0 ++#endif ++void bmcpanic_action(void) ++{ ++ int ret, i; ++ unsigned char obuf, cc; ++ ++ if (fIPMIok) ret = BMCPANIC_ACTION; ++ else ret = 0; /* do machine_reset */ ++ switch(ret) ++ { ++ case 1: /* power down */ ++ obuf = 0; ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ break; ++ case 2: /* power cycle */ ++ obuf = 2; ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ break; ++ case 3: /* hard reset */ ++ obuf = 3; /* IPMI hard reset */ ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ break; ++ case 0: /* soft reset */ ++ default: ++ machine_restart(NULL); /* normal Linux reset (arch/i386/) */ ++ } ++} ++ ++void bmc_poweroff(void) ++{ ++ int ret, i; ++ unsigned char obuf, cc; ++ ++ if (fIPMIok) { ++ obuf = 0; ++ ret = ipmi_send_recv(CHASSIS_CTL,NETFN_CHAS,0,&obuf,1,NULL,0,&i,&cc); ++ } ++} ++ ++/* end bmc_selmsg.c */ +--- linux-2.4.20-orig/arch/i386/kernel/process.c Fri Aug 2 20:39:42 2002 ++++ linux-2.4.20/arch/i386/kernel/process.c Wed Feb 26 14:26:36 2003 +@@ -426,10 +426,19 @@ + { + } + ++#ifdef CONFIG_BMCPANIC ++extern void bmc_poweroff(void); ++#endif ++ + void machine_power_off(void) + { + if (pm_power_off) + pm_power_off(); ++ ++#ifdef CONFIG_BMCPANIC ++ bmc_poweroff(); ++#endif ++ + } + + extern void show_trace(unsigned long* esp); +--- linux-2.4.20-orig/arch/i386/kernel/traps.c Thu Nov 28 18:53:09 2002 ++++ linux-2.4.20/arch/i386/kernel/traps.c Wed Feb 26 15:49:54 2003 +@@ -281,6 +281,8 @@ + } + + spinlock_t die_lock = SPIN_LOCK_UNLOCKED; ++char die_str[64] = ""; ++long die_err = 0; + + void die(const char * str, struct pt_regs * regs, long err) + { +@@ -289,6 +291,8 @@ + bust_spinlocks(1); + handle_BUG(regs); + printk("%s: %04lx\n", str, err & 0xffff); ++ die_err = err; ++ strncpy(die_str,str,sizeof(die_str)-1); + show_registers(regs); + bust_spinlocks(0); + spin_unlock_irq(&die_lock); +--- linux-2.4.20-orig/arch/i386/kernel/i386_ksyms.c Fri Aug 2 20:39:42 2002 ++++ linux-2.4.20/arch/i386/kernel/i386_ksyms.c Wed Feb 26 16:01:01 2003 +@@ -31,6 +31,8 @@ + + extern void dump_thread(struct pt_regs *, struct user *); + extern spinlock_t rtc_lock; ++extern char *die_str; ++extern long die_err; + + #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) + extern void machine_real_restart(unsigned char *, int); +@@ -141,6 +143,9 @@ + EXPORT_SYMBOL(__global_save_flags); + EXPORT_SYMBOL(__global_restore_flags); + EXPORT_SYMBOL(smp_call_function); ++ ++EXPORT_SYMBOL(die_str); ++EXPORT_SYMBOL(die_err); + + /* TLB flushing */ + EXPORT_SYMBOL(flush_tlb_page); diff --git a/kern/bmcpanic-2.5.44.patch b/kern/bmcpanic-2.5.44.patch new file mode 100644 index 0000000..eb0e1d0 --- /dev/null +++ b/kern/bmcpanic-2.5.44.patch @@ -0,0 +1,795 @@ +--- linux-2.5.44-orig/kernel/panic.c Sat Oct 19 00:02:32 2002 ++++ linux-2.5.44/kernel/panic.c Fri Jan 31 13:03:55 2003 +@@ -20,6 +20,10 @@ + asmlinkage void sys_sync(void); /* it's really int */ + + int panic_timeout; ++char *panic_string; ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ extern void ipmi_reset(int mode); ++#endif + + struct notifier_block *panic_notifier_list; + +@@ -53,6 +57,7 @@ + va_start(args, fmt); + vsprintf(buf, fmt, args); + va_end(args); ++ panic_string = buf; + printk(KERN_EMERG "Kernel panic: %s\n",buf); + if (in_interrupt()) + printk(KERN_EMERG "In interrupt handler - not syncing\n"); +@@ -81,7 +86,11 @@ + * choosing not too. It might crash, be corrupt or do + * more harm than good for other reasons. + */ ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ ipmi_reset(CONFIG_IPMI_PANIC_ACTION); ++#else + machine_restart(NULL); ++#endif + } + #ifdef __sparc__ + { +--- linux-2.5.44-orig/kernel/ksyms.c Sat Oct 19 00:01:08 2002 ++++ linux-2.5.44/kernel/ksyms.c Wed Jan 29 10:09:26 2003 +@@ -63,6 +63,8 @@ + #endif + + extern void set_device_ro(kdev_t dev,int flag); ++extern int panic_timeout; ++extern char *panic_string; + + extern struct timezone sys_tz; + +@@ -601,3 +603,6 @@ + + /* debug */ + EXPORT_SYMBOL(dump_stack); ++EXPORT_SYMBOL(panic_notifier_list); ++EXPORT_SYMBOL(panic_timeout); ++EXPORT_SYMBOL(panic_string); +--- linux-2.5.44-orig/drivers/char/Config.in Thu Jan 30 12:59:15 2003 ++++ linux-2.5.44/drivers/char/Config.in Thu Jan 30 12:55:53 2003 +@@ -110,6 +110,9 @@ + dep_tristate ' Device interface for IPMI' CONFIG_IPMI_DEVICE_INTERFACE $CONFIG_IPMI_HANDLER + dep_tristate ' IPMI KCS handler' CONFIG_IPMI_KCS $CONFIG_IPMI_HANDLER + dep_tristate ' IPMI Watchdog Timer' CONFIG_IPMI_WATCHDOG $CONFIG_IPMI_HANDLER ++if [ "$CONFIG_IPMI_HANDLER" == "y" ]; then ++ int ' Action after Panic (0=reset,1=power down,2=power cycle)' CONFIG_IPMI_PANIC_ACTION 0 ++fi + + mainmenu_option next_comment + comment 'Watchdog Cards' +--- linux-2.5.44-orig/drivers/char/ipmi/Makefile Thu Jan 30 12:59:15 2003 ++++ linux-2.5.44/drivers/char/ipmi/Makefile Fri Jan 31 11:40:33 2003 +@@ -6,7 +6,7 @@ + + ipmi_kcs_drv-objs := ipmi_kcs_sm.o ipmi_kcs_intf.o + +-obj-$(CONFIG_IPMI_HANDLER) += ipmi_msghandler.o ++obj-$(CONFIG_IPMI_HANDLER) += ipmi_msghandler.o ipmi_panic.o + obj-$(CONFIG_IPMI_DEVICE_INTERFACE) += ipmi_devintf.o + obj-$(CONFIG_IPMI_KCS) += ipmi_kcs_drv.o + obj-$(CONFIG_IPMI_WATCHDOG) += ipmi_watchdog.o +--- linux-2.5.44-orig/drivers/char/ipmi/ipmi_msghandler.c Thu Jan 30 12:59:15 2003 ++++ linux-2.5.44/drivers/char/ipmi/ipmi_msghandler.c Tue Feb 4 10:46:51 2003 +@@ -44,6 +44,14 @@ + #include + #include + ++#ifdef CONFIG_IPMI_PANIC_ACTION ++#define uchar unsigned char ++extern int ipmi_panic_init(void); ++extern int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, ++ uchar *sbuf, int slen, uchar *rbuf, int rlen, ++ int *nret, uchar *cc); ++#endif ++ + struct ipmi_recv_msg *ipmi_alloc_recv_msg(void); + static int ipmi_init_msghandler(void); + +@@ -369,6 +377,7 @@ + return rv; + } + ++static int fIPMIok = 0; /* true if an IPMI interface is valid */ + + int ipmi_create_user(unsigned int if_num, + struct ipmi_user_hndl *handler, +@@ -413,6 +422,7 @@ + goto out_unlock; + } + ++ fIPMIok = 1; /* at least one IPMI interface is valid */ + new_user->handler = handler; + new_user->handler_data = handler_data; + new_user->intf = ipmi_interfaces[if_num]; +@@ -1618,8 +1628,13 @@ + return rv; + } + ++extern void machine_restart(char * __unused); ++extern void machine_power_off(void); ++extern char *panic_string; ++ + #ifdef CONFIG_IPMI_PANIC_EVENT + ++#ifndef CONFIG_IPMI_PANIC_ACTION + static void dummy_smi_done_handler(struct ipmi_smi_msg *msg) + { + } +@@ -1652,12 +1667,9 @@ + data[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */ + data[5] = 0xa1; /* Runtime stop OEM bytes 2 & 3. */ + +- /* These used to have the first three bytes of the panic string, +- but not only is that not terribly useful, it's not available +- any more. */ +- data[3] = 0; +- data[6] = 0; +- data[7] = 0; ++ data[3] = panic_string[0]; ++ data[6] = panic_string[1]; ++ data[7] = panic_string[2]; + + smi_msg.done = dummy_smi_done_handler; + recv_msg.done = dummy_recv_done_handler; +@@ -1681,6 +1693,30 @@ + intf->my_lun); + } + } ++#endif ++ ++void ipmi_reset(int mode) ++{ ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ unsigned char imode; ++ unsigned char cc; ++ int rc, i; ++ ++ /* Input mode param: 0 = soft reset, 1 = power down, 2 = power cycle */ ++ if (!fIPMIok || mode == 0 || mode > 3) { ++ machine_restart(NULL); /* normal Linux reset (arch/i386/) */ ++ return; ++ } ++ /* ++ * IPMI Chassis Reset modes: ++ * 0 = power down, 1 = power up, 2 = power cycle, 3 = hard reset ++ */ ++ if (mode == 1) imode = 0; ++ else imode = mode; ++ rc = ipmi_send_recv(0x02,0x00,0,&imode,1,NULL,0,&i,&cc); ++#endif ++ return; ++} + #endif /* CONFIG_IPMI_PANIC_EVENT */ + + static int has_paniced = 0; +@@ -1699,14 +1735,55 @@ + /* For every registered interface, set it to run to completion. */ + for (i=0; ihandlers->set_run_to_completion(intf->send_info, 1); + } + + #ifdef CONFIG_IPMI_PANIC_EVENT +- send_panic_events(); ++ if (fIPMIok) { ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ unsigned char alarms, cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc; ++ ++ /* Get Alarm LED values */ ++ obuf[0] = 0x03; // PRIVATE_BUS_ID; ++ obuf[1] = 0x41; // ALARMS_PANEL_READ; ++ obuf[2] = 1; // one byte of alarms data ++ obuf[3] = 0; // initial alarms value ++ olen = 3; ++ rc = ipmi_send_recv(0x52,0x06,0,obuf,olen,ibuf,4,&i,&cc); ++ alarms = ibuf[0]; ++ printk("ipmi_panic: get alarms rc=%d cc=%x, alarms=%02x\n", ++ rc,cc,alarms); ++ if (alarms == 0) alarms = 0x0F; /* 0=err, fallback to default */ ++ if (rc == 0) { // valid, so ok to set alarm LED ++ /* Set Crit Alarm LED */ ++ obuf[0] = 0x03; // PRIVATE_BUS_ID; ++ obuf[1] = 0x40; // ALARMS_PANEL_WRITE; ++ obuf[2] = 1; // one byte of alarms data ++ obuf[3] = (alarms & 0x0D) | 0xF0; // turn on critical alarm ++ olen = 4; ++ rc = ipmi_send_recv(0x52,0x06,0,obuf,olen,NULL,0,&i,&cc); ++ printk("ipmi_panic: set crit alarm rc=%d cc=%x\n",rc,cc); ++ } ++ /* Log the OS Critical Stop to the SEL (BMC firmware log). */ ++ obuf[0] = 0x21; /* Kernel generator ID, IPMI table 5-4 */ ++ obuf[1] = 0x03; /* This is for IPMI 1.0. */ ++ obuf[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */ ++ obuf[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */ ++ obuf[5] = 0xa1; /* Runtime stop OEM bytes 2 & 3. */ ++ obuf[3] = panic_string[0]; ++ obuf[6] = panic_string[1]; ++ obuf[7] = panic_string[2]; ++ olen = 8; ++ rc = ipmi_send_recv(0x02,0x04,0,obuf,olen,NULL,0,&i,&cc); ++ printk("ipmi_panic: log OS Critical Stop rc=%d cc=%x\n",rc,cc); ++#else ++ send_panic_events(); ++#endif ++ } + #endif + + return NOTIFY_DONE; +@@ -1738,6 +1815,9 @@ + + notifier_chain_register(&panic_notifier_list, &panic_block); + ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ ipmi_panic_init(); ++#endif + initialized = 1; + + printk(KERN_INFO "ipmi: message handler initialized\n"); +@@ -1795,3 +1875,6 @@ + EXPORT_SYMBOL(ipmi_get_my_address); + EXPORT_SYMBOL(ipmi_set_my_LUN); + EXPORT_SYMBOL(ipmi_get_my_LUN); ++#ifdef CONFIG_IPMI_PANIC_ACTION ++EXPORT_SYMBOL(ipmi_reset); ++#endif +--- /dev/null Fri Mar 23 23:37:44 2001 ++++ linux-2.5.44/drivers/char/ipmi/ipmi_panic.c Tue Feb 4 10:50:45 2003 +@@ -0,0 +1,515 @@ ++/* ++ * ipmi_panic.c ++ * ++ * This code is needed to run a streamlined IPMI KCS command when ++ * the rest of the system may be dead (panic time). It must wait ++ * for completion of the receive function also. ++ * There will be zero or one BMC, with KCS as a minimum and perhaps ++ * other interfaces, so doing KCS to a default BMC LUN is valid here. ++ * ++ * Note that CONFIG_IPMI_HANDLER should be =y (rather than =m) to ++ * ensure that this handler is loaded early enough to cover boot ++ * time panic conditions. CONFIG_IPMI_PANIC_ACTION can only be ++ * defined if CONFIG_IPMI_HANDLER=y. ++ * ++ * Author: Andy Cress ++ * ++ * Change History: ++ * 01/31/03 Andy Cress - created for kernel 2.5.44 with OpenIPMI ++ * ++ * Copyright 2003 Intel Corp. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * ++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS ++ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ++ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ++ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define uchar unsigned char ++ ++#define KCS_READY_DELAY 5 ++#define BMC_RESPONSE_DELAY 5 ++#define BMC_RETRY_DELAY 60 ++ ++#if defined(__ia64__) ++#define KCS_BASE 0x8a2 ++#else ++#define KCS_BASE 0xca2 ++#endif ++#define KCS_STATUS_REG (KCS_BASE + 1) ++#define KCS_COMMAND_REG (KCS_BASE + 1) ++#define KCS_DATAIN_REG (KCS_BASE + 0) ++#define KCS_DATAOUT_REG (KCS_BASE + 0) ++ ++/* State bits based on S1 & S0 below */ ++#define KCS_STATE_MASK 0xC0 ++#define KCS_IDLE_STATE 0x00 ++#define KCS_READ_STATE 0x40 ++#define KCS_WRITE_STATE 0x80 ++#define KCS_ERROR_STATE 0xC0 ++ ++#define KCS_IBF 0x02 ++#define KCS_OBF 0x01 ++#define KCS_SMS_ATN 0x04 ++ ++#define SEND_INIT 1 ++#define SEND_START 2 ++#define SEND_NEXT 3 ++#define SEND_END 4 ++#define RECV_START 5 ++#define RECV_INIT 6 ++#define RECV_NEXT 7 ++#define RECV_INIT2 8 ++#define RECV_END 9 ++#define END 10 ++#define ERROR 0 ++ ++/* SMS Transfer Stream Control Codes */ ++#define GET_STATUS_ABORT 0x60 ++#define WRITE_START 0x61 ++#define WRITE_END 0x62 ++#define KCS_READ 0x68 ++ ++#define MAX_INVALID_RESPONSE_COUNT 2 ++#define MIN_BMC_RESPONSE_SIZE 3 ++#define MAX_IMB_PACKET_SIZE 33 ++#define MAX_BMC_RESPONSE_SIZE (MIN_BMC_RESPONSE_SIZE + MAX_IMB_PACKET_SIZE) ++#define MAX_XFER_LENGTH (MAX_IMB_PACKET_SIZE * 2) ++ ++#define MAX_BUFFER_SIZE 64 ++ ++typedef struct bmc_response ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ unsigned char cmd; ++ unsigned char cc; ++ unsigned char data[1]; ++ }BMC_RESPONSE; ++ ++typedef struct bmc_request ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ unsigned char cmd; ++ unsigned char data[1]; ++ }BMC_REQUEST; ++ ++/* GET_DEVICE_ID RESPONSE (11 bytes) */ ++typedef struct device_id_response ++ { ++ unsigned char device_id; ++ ++ unsigned char device_revision :4; ++ unsigned char reserved :3; ++ unsigned char provides_sdr :1; ++ ++ unsigned char major_firmware_revision :7; ++ #define NORMAL_OPERATION 0 ++ #define DEVICE_BUSY 1 ++ unsigned char device_available :1; ++ ++ unsigned char minor_firmware_revision; ++ unsigned char ipmi_version_major :4; ++ unsigned char ipmi_version_minor :4; ++ ++ unsigned char supports_sensor_device :1; ++ unsigned char supports_sdr_device :1; ++ unsigned char supports_sel_device :1; ++ unsigned char supports_fru_device :1; ++ unsigned char supports_ipmb_receiver :1; ++ unsigned char supports_ipmb_generator :1; ++ unsigned char supports_bridge :1; ++ unsigned char supports_chassis_device :1; ++ ++ unsigned char manufacturer_id1; ++ unsigned char manufacturer_id2; ++ unsigned char manufacturer_id3; ++ unsigned short product_id; ++ } DEVICE_ID_RESPONSE; ++ ++/*************************************/ ++ ++#if defined(__ia64__) ++static char kcs_new = 1; ++#else ++static char kcs_new = 0; ++#endif ++DECLARE_MUTEX(kcs_sem); ++ ++/*************************************/ ++ ++/* ++ * kcs chip mashing stuff ++ */ ++static int wait_while_ibf(void) ++{ ++ unsigned char status_byte; ++ ++ status_byte = inb_p(KCS_STATUS_REG); ++ if ((status_byte & KCS_IBF) == 0) return (0); ++ mdelay(KCS_READY_DELAY); ++ status_byte = inb_p(KCS_STATUS_REG); ++ if (status_byte & KCS_IBF) return (-1); ++ return (0); ++} ++ ++static int is_obf_set(void) ++{ ++ unsigned char cs; ++ cs = inb_p(KCS_STATUS_REG); ++ return ((cs & KCS_OBF) == KCS_OBF); ++} ++ ++static int wait_until_obf(void) ++{ ++ int retries = 0; ++ ++ while (retries < 2) { ++ if (is_obf_set()) return (0); ++ mdelay(KCS_READY_DELAY); ++ retries++; ++ } ++ return (-ETIMEDOUT); ++} ++ ++static unsigned char get_kcs_state(void) ++{ ++ unsigned char cs; ++ ++ cs = inb_p(KCS_STATUS_REG); ++ return (cs & KCS_STATE_MASK); ++} ++ ++static unsigned char read_kcs_data(void) ++{ ++ unsigned char data; ++ ++ data = inb_p(KCS_DATAOUT_REG); ++ return (data); ++} ++ ++static void write_kcs_data(unsigned char data) ++{ ++ outb_p(data, KCS_DATAIN_REG); ++} ++ ++static void write_kcs_cmd(unsigned char cmd) ++{ ++ outb_p(cmd, KCS_COMMAND_REG); ++} ++ ++static int clear_obf(void) ++{ ++ read_kcs_data(); ++ return (0); ++} ++ ++static int kcs_xfer(BMC_REQUEST * request, int request_len, ++ BMC_RESPONSE * response, int *response_len) ++{ ++ unsigned char *xmit_buffer, *recv_buffer; ++ int i = 0, rc = 0, state = SEND_INIT, bad = 0; ++ ++ xmit_buffer = (unsigned char *) request; ++ recv_buffer = (unsigned char *) response; ++ ++ while (1) { ++ if (state == END) ++ break; ++ else if (bad > 2) { ++ printk("[ipmi_panic] Maximum retries exceeded.\n"); ++ rc = -EIO; ++ break; ++ } ++ switch (state) { ++ case SEND_INIT: ++ { ++ i = 0; ++ state = SEND_START; ++ wait_while_ibf(); ++ if (kcs_new) clear_obf(); ++ } ++ case SEND_START: ++ { ++ state = SEND_NEXT; ++ write_kcs_cmd(WRITE_START); ++ wait_while_ibf(); ++ } ++ case SEND_NEXT: ++ { ++ if (i == (request_len - 1)) { ++ state = SEND_END; ++ break; ++ } ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ if (kcs_new) clear_obf(); ++ break; ++ } ++ case SEND_END: ++ { ++ if (!kcs_new) wait_while_ibf(); ++ write_kcs_cmd(WRITE_END); ++ wait_while_ibf(); ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ if (kcs_new) clear_obf(); ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ state = RECV_START; ++ } ++ case RECV_START: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_WRITE_STATE: ++ case KCS_IDLE_STATE: ++ { ++ mdelay(BMC_RESPONSE_DELAY); ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ i = 0; ++ memset(recv_buffer, 0, ++ *response_len); ++ state = RECV_INIT; ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_INIT: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ state = RECV_END; ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ else mdelay(1); ++ break; ++ } ++ default: ++ { ++ mdelay(1); ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_NEXT: ++ { ++ if (i >= *response_len) { ++ rc = -EOVERFLOW; ++ state = ERROR; ++ break; ++ } ++ recv_buffer[i++] = read_kcs_data(); ++ if (!kcs_new) wait_while_ibf(); ++ write_kcs_data(KCS_READ); ++ if (kcs_new) wait_while_ibf(); ++ state = RECV_INIT2; ++ break; ++ } ++ case RECV_INIT2: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ if (kcs_new) { ++ if (wait_until_obf() == 0) { ++ clear_obf(); ++ state = RECV_END; ++ } else { ++ state = ERROR; ++ } ++ } else { ++ state = RECV_END; ++ } ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (kcs_new) { ++ if (wait_until_obf() == 0) ++ state = RECV_NEXT; ++ else state = ERROR; ++ } else { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ } ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_END: ++ { ++ if ((i < MIN_BMC_RESPONSE_SIZE) || ++ (response->netfn != (request->netfn | 0x01)) ++ || (response->cmd != request->cmd)) { ++ if (request->cmd == 0x01 && ++ request->netfn == 0x06 && ++ response->netfn == 0x2b) /*ok*/; ++ else { /* flag the error */ ++ printk("[ipmi_panic] Request/Response CMD/NETFN mismatch error\n"); ++ ++ printk(" i=%d, RQcmd/RQnetfn=0x%x/0x%x,RScmd/RSnetfn=0x%x/0x%x\n", ++ i, request->cmd, request->netfn, ++ response->cmd, response->netfn); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ ++ *response_len = i; ++ rc = 0; ++ state = END; ++ break; ++ } ++ case ERROR: ++ default: ++ { ++ printk("[ipmi_panic] BMC in bad state. Retrying transfer\n"); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ } ++ return (rc); ++} ++ ++int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, uchar *sbuf, int slen, ++ uchar *rbuf, int rlen, int *nret, uchar *cc) ++{ ++ uchar bmc_outbuf[MAX_BUFFER_SIZE]; ++ uchar bmc_inbuf[MAX_BUFFER_SIZE]; ++ BMC_REQUEST *bmc_req; ++ BMC_RESPONSE *bmc_resp; ++ int bmc_outlen; ++ int bmc_inlen; ++ int rc = 0; ++ ++ if (kcs_new == 2) return (-ENXIO); ++ ++ memset(bmc_outbuf,0, sizeof(bmc_outbuf)); ++ memset(bmc_inbuf,0, sizeof(bmc_inbuf)); ++ bmc_req = (BMC_REQUEST *)bmc_outbuf; ++ bmc_resp = (BMC_RESPONSE *)bmc_inbuf; ++ bmc_req->cmd = cmd; ++ bmc_req->netfn = netfn; ++ bmc_req->lun = lun; ++ bmc_outlen = slen + 2; ++ bmc_inlen = sizeof(bmc_inbuf); ++ if (slen > 0) memcpy(bmc_req->data,sbuf,slen); ++ ++ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); ++ if (bmc_resp->cc == 0xcc) /* flaky NMI fixup */ ++ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); /*retry*/ ++ ++ /* copy the response */ ++ *cc = bmc_resp->cc; ++ if (bmc_inlen > rlen) bmc_inlen = rlen; ++ *nret = bmc_inlen; ++ if (bmc_inlen > 0) memcpy(rbuf,bmc_resp->data,bmc_inlen); ++ ++ return(rc); ++} ++ ++int ipmi_panic_init(void) ++{ ++ int i, rc; ++ uchar cc; ++ uchar bdev[16]; ++ DEVICE_ID_RESPONSE *dev_id; ++ ++ printk("ipmi_panic driver at io 0x%x\n", KCS_BASE); ++ if ((inb_p(KCS_STATUS_REG) == 0xFF) && ++ (inb_p(KCS_DATAIN_REG) == 0xFF)) { ++ printk("--KCS ISA window not present, exiting.\n"); ++ return (-ENXIO); ++ } ++ ++ /* Get Device ID */ ++ rc = ipmi_send_recv(0x01,0x06,0,NULL,0,bdev,sizeof(bdev),&i,&cc); ++ if (rc != 0) kcs_new = 2; /* bad */ ++ else if (cc != 0) kcs_new = 2; /* bad */ ++ else ++ { ++ dev_id = (DEVICE_ID_RESPONSE *)&bdev[0]; ++ printk("--BMC version %x.%x, IPMI version %d.%d\n", ++ dev_id->major_firmware_revision, ++ dev_id->minor_firmware_revision, ++ dev_id->ipmi_version_major, dev_id->ipmi_version_minor); ++ if ((dev_id->ipmi_version_major == 0) && ++ (dev_id->ipmi_version_minor == 9)) { ++ printk("--Using legacy KCS state machine\n"); ++ kcs_new = 0; ++ } else { ++ printk("--Using new KCS state machine\n"); ++ kcs_new = 1; ++ } ++ } ++ /* dont care about chipset vendor, but test Lancewood & IPF to be sure*/ ++ ++ return(rc); ++} ++ ++/* end ipmi_panic.c */ +--- linux-2.5.44-orig/arch/i386/kernel/reboot.c Sat Oct 19 00:01:20 2002 ++++ linux-2.5.44/arch/i386/kernel/reboot.c Thu Jan 30 15:45:32 2003 +@@ -221,6 +221,10 @@ + : "i" ((void *) (0x1000 - sizeof (real_mode_switch) - 100))); + } + ++#ifdef CONFIG_IPMI_PANIC_ACTION ++extern void ipmi_reset(int mode); ++#endif ++ + void machine_restart(char * __unused) + { + #if CONFIG_SMP +@@ -277,6 +281,9 @@ + } + } + ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ ipmi_reset(1); ++#endif + machine_real_restart(jump_to_bios, sizeof(jump_to_bios)); + } + +@@ -288,5 +295,8 @@ + { + if (pm_power_off) + pm_power_off(); ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ ipmi_reset(0); ++#endif + } + diff --git a/kern/bmcpanic-2.5.62.patch b/kern/bmcpanic-2.5.62.patch new file mode 100644 index 0000000..44e9141 --- /dev/null +++ b/kern/bmcpanic-2.5.62.patch @@ -0,0 +1,830 @@ +diff -Naru linux-2.5.62/arch/i386/kernel/reboot.c linux-2.5.62p/arch/i386/kernel/reboot.c +--- linux-2.5.62/arch/i386/kernel/reboot.c 2003-03-07 16:33:50.000000000 +0800 ++++ linux-2.5.62p/arch/i386/kernel/reboot.c 2003-03-06 22:27:16.000000000 +0800 +@@ -221,6 +221,10 @@ + : "i" ((void *) (0x1000 - sizeof (real_mode_switch) - 100))); + } + ++#ifdef CONFIG_IPMI_PANIC_ACTION ++extern void ipmi_reset(int mode); ++#endif ++ + void machine_restart(char * __unused) + { + #if CONFIG_SMP +@@ -277,6 +281,9 @@ + } + } + ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ ipmi_reset(1); ++#endif + machine_real_restart(jump_to_bios, sizeof(jump_to_bios)); + } + +@@ -288,5 +295,8 @@ + { + if (pm_power_off) + pm_power_off(); ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ ipmi_reset(0); ++#endif + } + +diff -Naru linux-2.5.62/drivers/char/ipmi/ipmi_msghandler.c linux-2.5.62p/drivers/char/ipmi/ipmi_msghandler.c +--- linux-2.5.62/drivers/char/ipmi/ipmi_msghandler.c 2003-03-07 16:34:18.000000000 +0800 ++++ linux-2.5.62p/drivers/char/ipmi/ipmi_msghandler.c 2003-03-06 22:27:16.000000000 +0800 +@@ -45,6 +45,14 @@ + #include + #include + ++#ifdef CONFIG_IPMI_PANIC_ACTION ++#define uchar unsigned char ++extern int ipmi_panic_init(void); ++extern int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, ++ uchar *sbuf, int slen, uchar *rbuf, int rlen, ++ int *nret, uchar *cc); ++#endif ++ + struct ipmi_recv_msg *ipmi_alloc_recv_msg(void); + static int ipmi_init_msghandler(void); + +@@ -345,7 +353,7 @@ + unsigned int i; + + for (i=intf->curr_seq; +- i!=(intf->curr_seq-1); ++ (i+1)%IPMI_IPMB_NUM_SEQ != intf->curr_seq; + i=(i+1)%IPMI_IPMB_NUM_SEQ) + { + if (! intf->seq_table[i].inuse) +@@ -437,6 +445,7 @@ + return rv; + } + ++static int fIPMIok = 0; /* true if an IPMI interface is valid */ + + int ipmi_create_user(unsigned int if_num, + struct ipmi_user_hndl *handler, +@@ -480,6 +489,7 @@ + goto out_unlock; + } + ++ fIPMIok = 1; /* at least one IPMI interface is valid */ + new_user->handler = handler; + new_user->handler_data = handler_data; + new_user->intf = ipmi_interfaces[if_num]; +@@ -906,8 +916,6 @@ + probably, so abort. */ + spin_unlock_irqrestore(&(intf->seq_lock), + flags); +- ipmi_free_recv_msg(recv_msg); +- ipmi_free_smi_msg(smi_msg); + goto out_err; + } + +@@ -1794,8 +1802,13 @@ + return rv; + } + ++extern void machine_restart(char * __unused); ++extern void machine_power_off(void); ++extern char *panic_string; ++ + #ifdef CONFIG_IPMI_PANIC_EVENT + ++#ifndef CONFIG_IPMI_PANIC_ACTION + static void dummy_smi_done_handler(struct ipmi_smi_msg *msg) + { + } +@@ -1828,12 +1841,9 @@ + data[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */ + data[5] = 0xa1; /* Runtime stop OEM bytes 2 & 3. */ + +- /* These used to have the first three bytes of the panic string, +- but not only is that not terribly useful, it's not available +- any more. */ +- data[3] = 0; +- data[6] = 0; +- data[7] = 0; ++ data[3] = panic_string[0]; ++ data[6] = panic_string[1]; ++ data[7] = panic_string[2]; + + smi_msg.done = dummy_smi_done_handler; + recv_msg.done = dummy_recv_done_handler; +@@ -1857,6 +1867,30 @@ + intf->my_lun); + } + } ++#endif ++ ++void ipmi_reset(int mode) ++{ ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ unsigned char imode; ++ unsigned char cc; ++ int rc, i; ++ ++ /* Input mode param: 0 = soft reset, 1 = power down, 2 = power cycle */ ++ if (!fIPMIok || mode == 0 || mode > 3) { ++ machine_restart(NULL); /* normal Linux reset (arch/i386/) */ ++ return; ++ } ++ /* ++ * IPMI Chassis Reset modes: ++ * 0 = power down, 1 = power up, 2 = power cycle, 3 = hard reset ++ */ ++ if (mode == 1) imode = 0; ++ else imode = mode; ++ rc = ipmi_send_recv(0x02,0x00,0,&imode,1,NULL,0,&i,&cc); ++#endif ++ return; ++} + #endif /* CONFIG_IPMI_PANIC_EVENT */ + + static int has_paniced = 0; +@@ -1875,14 +1909,55 @@ + /* For every registered interface, set it to run to completion. */ + for (i=0; ihandlers->set_run_to_completion(intf->send_info, 1); + } + + #ifdef CONFIG_IPMI_PANIC_EVENT +- send_panic_events(); ++ if (fIPMIok) { ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ unsigned char alarms, cc; ++ unsigned char obuf[16]; ++ unsigned char ibuf[16]; ++ int olen, rc; ++ ++ /* Get Alarm LED values */ ++ obuf[0] = 0x03; // PRIVATE_BUS_ID; ++ obuf[1] = 0x41; // ALARMS_PANEL_READ; ++ obuf[2] = 1; // one byte of alarms data ++ obuf[3] = 0; // initial alarms value ++ olen = 3; ++ rc = ipmi_send_recv(0x52,0x06,0,obuf,olen,ibuf,4,&i,&cc); ++ alarms = ibuf[0]; ++ printk("ipmi_panic: get alarms rc=%d cc=%x, alarms=%02x\n", ++ rc,cc,alarms); ++ if (alarms == 0) alarms = 0x0F; /* 0=err, fallback to default */ ++ if (rc == 0) { // valid, so ok to set alarm LED ++ /* Set Crit Alarm LED */ ++ obuf[0] = 0x03; // PRIVATE_BUS_ID; ++ obuf[1] = 0x40; // ALARMS_PANEL_WRITE; ++ obuf[2] = 1; // one byte of alarms data ++ obuf[3] = (alarms & 0x0D) | 0xF0; // turn on critical alarm ++ olen = 4; ++ rc = ipmi_send_recv(0x52,0x06,0,obuf,olen,NULL,0,&i,&cc); ++ printk("ipmi_panic: set crit alarm rc=%d cc=%x\n",rc,cc); ++ } ++ /* Log the OS Critical Stop to the SEL (BMC firmware log). */ ++ obuf[0] = 0x21; /* Kernel generator ID, IPMI table 5-4 */ ++ obuf[1] = 0x03; /* This is for IPMI 1.0. */ ++ obuf[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */ ++ obuf[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */ ++ obuf[5] = 0xa1; /* Runtime stop OEM bytes 2 & 3. */ ++ obuf[3] = panic_string[0]; ++ obuf[6] = panic_string[1]; ++ obuf[7] = panic_string[2]; ++ olen = 8; ++ rc = ipmi_send_recv(0x02,0x04,0,obuf,olen,NULL,0,&i,&cc); ++ printk("ipmi_panic: log OS Critical Stop rc=%d cc=%x\n",rc,cc); ++#else ++ send_panic_events(); ++#endif ++ } + #endif + + return NOTIFY_DONE; +@@ -1914,6 +1989,9 @@ + + notifier_chain_register(&panic_notifier_list, &panic_block); + ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ ipmi_panic_init(); ++#endif + initialized = 1; + + printk(KERN_INFO "ipmi: message handler initialized\n"); +@@ -1971,3 +2049,6 @@ + EXPORT_SYMBOL(ipmi_get_my_address); + EXPORT_SYMBOL(ipmi_set_my_LUN); + EXPORT_SYMBOL(ipmi_get_my_LUN); ++#ifdef CONFIG_IPMI_PANIC_ACTION ++EXPORT_SYMBOL(ipmi_reset); ++#endif +diff -Naru linux-2.5.62/drivers/char/ipmi/ipmi_panic.c linux-2.5.62p/drivers/char/ipmi/ipmi_panic.c +--- linux-2.5.62/drivers/char/ipmi/ipmi_panic.c 1970-01-01 08:00:00.000000000 +0800 ++++ linux-2.5.62p/drivers/char/ipmi/ipmi_panic.c 2003-03-06 22:27:16.000000000 +0800 +@@ -0,0 +1,515 @@ ++/* ++ * ipmi_panic.c ++ * ++ * This code is needed to run a streamlined IPMI KCS command when ++ * the rest of the system may be dead (panic time). It must wait ++ * for completion of the receive function also. ++ * There will be zero or one BMC, with KCS as a minimum and perhaps ++ * other interfaces, so doing KCS to a default BMC LUN is valid here. ++ * ++ * Note that CONFIG_IPMI_HANDLER should be =y (rather than =m) to ++ * ensure that this handler is loaded early enough to cover boot ++ * time panic conditions. CONFIG_IPMI_PANIC_ACTION can only be ++ * defined if CONFIG_IPMI_HANDLER=y. ++ * ++ * Author: Andy Cress ++ * ++ * Change History: ++ * 01/31/03 Andy Cress - created for kernel 2.5.44 with OpenIPMI ++ * ++ * Copyright 2003 Intel Corp. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * ++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ++ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ++ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS ++ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ++ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ++ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define uchar unsigned char ++ ++#define KCS_READY_DELAY 5 ++#define BMC_RESPONSE_DELAY 5 ++#define BMC_RETRY_DELAY 60 ++ ++#if defined(__ia64__) ++#define KCS_BASE 0x8a2 ++#else ++#define KCS_BASE 0xca2 ++#endif ++#define KCS_STATUS_REG (KCS_BASE + 1) ++#define KCS_COMMAND_REG (KCS_BASE + 1) ++#define KCS_DATAIN_REG (KCS_BASE + 0) ++#define KCS_DATAOUT_REG (KCS_BASE + 0) ++ ++/* State bits based on S1 & S0 below */ ++#define KCS_STATE_MASK 0xC0 ++#define KCS_IDLE_STATE 0x00 ++#define KCS_READ_STATE 0x40 ++#define KCS_WRITE_STATE 0x80 ++#define KCS_ERROR_STATE 0xC0 ++ ++#define KCS_IBF 0x02 ++#define KCS_OBF 0x01 ++#define KCS_SMS_ATN 0x04 ++ ++#define SEND_INIT 1 ++#define SEND_START 2 ++#define SEND_NEXT 3 ++#define SEND_END 4 ++#define RECV_START 5 ++#define RECV_INIT 6 ++#define RECV_NEXT 7 ++#define RECV_INIT2 8 ++#define RECV_END 9 ++#define END 10 ++#define ERROR 0 ++ ++/* SMS Transfer Stream Control Codes */ ++#define GET_STATUS_ABORT 0x60 ++#define WRITE_START 0x61 ++#define WRITE_END 0x62 ++#define KCS_READ 0x68 ++ ++#define MAX_INVALID_RESPONSE_COUNT 2 ++#define MIN_BMC_RESPONSE_SIZE 3 ++#define MAX_IMB_PACKET_SIZE 33 ++#define MAX_BMC_RESPONSE_SIZE (MIN_BMC_RESPONSE_SIZE + MAX_IMB_PACKET_SIZE) ++#define MAX_XFER_LENGTH (MAX_IMB_PACKET_SIZE * 2) ++ ++#define MAX_BUFFER_SIZE 64 ++ ++typedef struct bmc_response ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ unsigned char cmd; ++ unsigned char cc; ++ unsigned char data[1]; ++ }BMC_RESPONSE; ++ ++typedef struct bmc_request ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ unsigned char cmd; ++ unsigned char data[1]; ++ }BMC_REQUEST; ++ ++/* GET_DEVICE_ID RESPONSE (11 bytes) */ ++typedef struct device_id_response ++ { ++ unsigned char device_id; ++ ++ unsigned char device_revision :4; ++ unsigned char reserved :3; ++ unsigned char provides_sdr :1; ++ ++ unsigned char major_firmware_revision :7; ++ #define NORMAL_OPERATION 0 ++ #define DEVICE_BUSY 1 ++ unsigned char device_available :1; ++ ++ unsigned char minor_firmware_revision; ++ unsigned char ipmi_version_major :4; ++ unsigned char ipmi_version_minor :4; ++ ++ unsigned char supports_sensor_device :1; ++ unsigned char supports_sdr_device :1; ++ unsigned char supports_sel_device :1; ++ unsigned char supports_fru_device :1; ++ unsigned char supports_ipmb_receiver :1; ++ unsigned char supports_ipmb_generator :1; ++ unsigned char supports_bridge :1; ++ unsigned char supports_chassis_device :1; ++ ++ unsigned char manufacturer_id1; ++ unsigned char manufacturer_id2; ++ unsigned char manufacturer_id3; ++ unsigned short product_id; ++ } DEVICE_ID_RESPONSE; ++ ++/*************************************/ ++ ++#if defined(__ia64__) ++static char kcs_new = 1; ++#else ++static char kcs_new = 0; ++#endif ++DECLARE_MUTEX(kcs_sem); ++ ++/*************************************/ ++ ++/* ++ * kcs chip mashing stuff ++ */ ++static int wait_while_ibf(void) ++{ ++ unsigned char status_byte; ++ ++ status_byte = inb_p(KCS_STATUS_REG); ++ if ((status_byte & KCS_IBF) == 0) return (0); ++ mdelay(KCS_READY_DELAY); ++ status_byte = inb_p(KCS_STATUS_REG); ++ if (status_byte & KCS_IBF) return (-1); ++ return (0); ++} ++ ++static int is_obf_set(void) ++{ ++ unsigned char cs; ++ cs = inb_p(KCS_STATUS_REG); ++ return ((cs & KCS_OBF) == KCS_OBF); ++} ++ ++static int wait_until_obf(void) ++{ ++ int retries = 0; ++ ++ while (retries < 2) { ++ if (is_obf_set()) return (0); ++ mdelay(KCS_READY_DELAY); ++ retries++; ++ } ++ return (-ETIMEDOUT); ++} ++ ++static unsigned char get_kcs_state(void) ++{ ++ unsigned char cs; ++ ++ cs = inb_p(KCS_STATUS_REG); ++ return (cs & KCS_STATE_MASK); ++} ++ ++static unsigned char read_kcs_data(void) ++{ ++ unsigned char data; ++ ++ data = inb_p(KCS_DATAOUT_REG); ++ return (data); ++} ++ ++static void write_kcs_data(unsigned char data) ++{ ++ outb_p(data, KCS_DATAIN_REG); ++} ++ ++static void write_kcs_cmd(unsigned char cmd) ++{ ++ outb_p(cmd, KCS_COMMAND_REG); ++} ++ ++static int clear_obf(void) ++{ ++ read_kcs_data(); ++ return (0); ++} ++ ++static int kcs_xfer(BMC_REQUEST * request, int request_len, ++ BMC_RESPONSE * response, int *response_len) ++{ ++ unsigned char *xmit_buffer, *recv_buffer; ++ int i = 0, rc = 0, state = SEND_INIT, bad = 0; ++ ++ xmit_buffer = (unsigned char *) request; ++ recv_buffer = (unsigned char *) response; ++ ++ while (1) { ++ if (state == END) ++ break; ++ else if (bad > 2) { ++ printk("[ipmi_panic] Maximum retries exceeded.\n"); ++ rc = -EIO; ++ break; ++ } ++ switch (state) { ++ case SEND_INIT: ++ { ++ i = 0; ++ state = SEND_START; ++ wait_while_ibf(); ++ if (kcs_new) clear_obf(); ++ } ++ case SEND_START: ++ { ++ state = SEND_NEXT; ++ write_kcs_cmd(WRITE_START); ++ wait_while_ibf(); ++ } ++ case SEND_NEXT: ++ { ++ if (i == (request_len - 1)) { ++ state = SEND_END; ++ break; ++ } ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ if (kcs_new) clear_obf(); ++ break; ++ } ++ case SEND_END: ++ { ++ if (!kcs_new) wait_while_ibf(); ++ write_kcs_cmd(WRITE_END); ++ wait_while_ibf(); ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ if (kcs_new) clear_obf(); ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ state = RECV_START; ++ } ++ case RECV_START: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_WRITE_STATE: ++ case KCS_IDLE_STATE: ++ { ++ mdelay(BMC_RESPONSE_DELAY); ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ i = 0; ++ memset(recv_buffer, 0, ++ *response_len); ++ state = RECV_INIT; ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_INIT: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ state = RECV_END; ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ else mdelay(1); ++ break; ++ } ++ default: ++ { ++ mdelay(1); ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_NEXT: ++ { ++ if (i >= *response_len) { ++ rc = -EOVERFLOW; ++ state = ERROR; ++ break; ++ } ++ recv_buffer[i++] = read_kcs_data(); ++ if (!kcs_new) wait_while_ibf(); ++ write_kcs_data(KCS_READ); ++ if (kcs_new) wait_while_ibf(); ++ state = RECV_INIT2; ++ break; ++ } ++ case RECV_INIT2: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ if (kcs_new) { ++ if (wait_until_obf() == 0) { ++ clear_obf(); ++ state = RECV_END; ++ } else { ++ state = ERROR; ++ } ++ } else { ++ state = RECV_END; ++ } ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (kcs_new) { ++ if (wait_until_obf() == 0) ++ state = RECV_NEXT; ++ else state = ERROR; ++ } else { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ } ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_END: ++ { ++ if ((i < MIN_BMC_RESPONSE_SIZE) || ++ (response->netfn != (request->netfn | 0x01)) ++ || (response->cmd != request->cmd)) { ++ if (request->cmd == 0x01 && ++ request->netfn == 0x06 && ++ response->netfn == 0x2b) /*ok*/; ++ else { /* flag the error */ ++ printk("[ipmi_panic] Request/Response CMD/NETFN mismatch error\n"); ++ ++ printk(" i=%d, RQcmd/RQnetfn=0x%x/0x%x,RScmd/RSnetfn=0x%x/0x%x\n", ++ i, request->cmd, request->netfn, ++ response->cmd, response->netfn); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ ++ *response_len = i; ++ rc = 0; ++ state = END; ++ break; ++ } ++ case ERROR: ++ default: ++ { ++ printk("[ipmi_panic] BMC in bad state. Retrying transfer\n"); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ } ++ return (rc); ++} ++ ++int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, uchar *sbuf, int slen, ++ uchar *rbuf, int rlen, int *nret, uchar *cc) ++{ ++ uchar bmc_outbuf[MAX_BUFFER_SIZE]; ++ uchar bmc_inbuf[MAX_BUFFER_SIZE]; ++ BMC_REQUEST *bmc_req; ++ BMC_RESPONSE *bmc_resp; ++ int bmc_outlen; ++ int bmc_inlen; ++ int rc = 0; ++ ++ if (kcs_new == 2) return (-ENXIO); ++ ++ memset(bmc_outbuf,0, sizeof(bmc_outbuf)); ++ memset(bmc_inbuf,0, sizeof(bmc_inbuf)); ++ bmc_req = (BMC_REQUEST *)bmc_outbuf; ++ bmc_resp = (BMC_RESPONSE *)bmc_inbuf; ++ bmc_req->cmd = cmd; ++ bmc_req->netfn = netfn; ++ bmc_req->lun = lun; ++ bmc_outlen = slen + 2; ++ bmc_inlen = sizeof(bmc_inbuf); ++ if (slen > 0) memcpy(bmc_req->data,sbuf,slen); ++ ++ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); ++ if (bmc_resp->cc == 0xcc) /* flaky NMI fixup */ ++ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); /*retry*/ ++ ++ /* copy the response */ ++ *cc = bmc_resp->cc; ++ if (bmc_inlen > rlen) bmc_inlen = rlen; ++ *nret = bmc_inlen; ++ if (bmc_inlen > 0) memcpy(rbuf,bmc_resp->data,bmc_inlen); ++ ++ return(rc); ++} ++ ++int ipmi_panic_init(void) ++{ ++ int i, rc; ++ uchar cc; ++ uchar bdev[16]; ++ DEVICE_ID_RESPONSE *dev_id; ++ ++ printk("ipmi_panic driver at io 0x%x\n", KCS_BASE); ++ if ((inb_p(KCS_STATUS_REG) == 0xFF) && ++ (inb_p(KCS_DATAIN_REG) == 0xFF)) { ++ printk("--KCS ISA window not present, exiting.\n"); ++ return (-ENXIO); ++ } ++ ++ /* Get Device ID */ ++ rc = ipmi_send_recv(0x01,0x06,0,NULL,0,bdev,sizeof(bdev),&i,&cc); ++ if (rc != 0) kcs_new = 2; /* bad */ ++ else if (cc != 0) kcs_new = 2; /* bad */ ++ else ++ { ++ dev_id = (DEVICE_ID_RESPONSE *)&bdev[0]; ++ printk("--BMC version %x.%x, IPMI version %d.%d\n", ++ dev_id->major_firmware_revision, ++ dev_id->minor_firmware_revision, ++ dev_id->ipmi_version_major, dev_id->ipmi_version_minor); ++ if ((dev_id->ipmi_version_major == 0) && ++ (dev_id->ipmi_version_minor == 9)) { ++ printk("--Using legacy KCS state machine\n"); ++ kcs_new = 0; ++ } else { ++ printk("--Using new KCS state machine\n"); ++ kcs_new = 1; ++ } ++ } ++ /* dont care about chipset vendor, but test Lancewood & IPF to be sure*/ ++ ++ return(rc); ++} ++ ++/* end ipmi_panic.c */ +diff -Naru linux-2.5.62/drivers/char/ipmi/Kconfig linux-2.5.62p/drivers/char/ipmi/Kconfig +--- linux-2.5.62/drivers/char/ipmi/Kconfig 2003-03-07 16:34:23.000000000 +0800 ++++ linux-2.5.62p/drivers/char/ipmi/Kconfig 2003-03-06 22:46:58.000000000 +0800 +@@ -7,8 +7,14 @@ + tristate 'IPMI top-level message handler' + help + This enables the central IPMI message handler, required for IPMI +- to work. Note that you must have this enabled to do any other IPMI +- things. See IPMI.txt for more details. ++ to work. ++ ++ IPMI is a standard for managing sensors (temperature, ++ voltage, etc.) in a system. ++ ++ See Documentation/IPMI.txt for more details on the driver. ++ ++ If unsure, say N. + + config IPMI_PANIC_EVENT + bool 'Generate a panic event to all BMCs on a panic' +@@ -36,5 +42,11 @@ + depends on IPMI_HANDLER + help + This enables the IPMI watchdog timer. ++config IPMI_PANIC_ACTION ++ int 'Action after Panic (0=reset,1=power down,2=power cycle)' ++ requires IPMI_HANDLER=y ++ default "0" ++ help ++ Set the Action after Panic + + endmenu +diff -Naru linux-2.5.62/drivers/char/ipmi/Makefile linux-2.5.62p/drivers/char/ipmi/Makefile +--- linux-2.5.62/drivers/char/ipmi/Makefile 2003-03-07 16:34:54.000000000 +0800 ++++ linux-2.5.62p/drivers/char/ipmi/Makefile 2003-03-06 22:27:16.000000000 +0800 +@@ -4,7 +4,7 @@ + + ipmi_kcs_drv-objs := ipmi_kcs_sm.o ipmi_kcs_intf.o + +-obj-$(CONFIG_IPMI_HANDLER) += ipmi_msghandler.o ++obj-$(CONFIG_IPMI_HANDLER) += ipmi_msghandler.o ipmi_panic.o + obj-$(CONFIG_IPMI_DEVICE_INTERFACE) += ipmi_devintf.o + obj-$(CONFIG_IPMI_KCS) += ipmi_kcs_drv.o + obj-$(CONFIG_IPMI_WATCHDOG) += ipmi_watchdog.o +diff -Naru linux-2.5.62/drivers/char/Kconfig linux-2.5.62p/drivers/char/Kconfig +--- linux-2.5.62/drivers/char/Kconfig 2003-03-07 16:33:38.000000000 +0800 ++++ linux-2.5.62p/drivers/char/Kconfig 2003-03-07 16:22:02.000000000 +0800 +@@ -999,5 +999,6 @@ + out to lunch past a certain margin. It can reboot the system + or merely print a warning. + ++ + endmenu + +diff -Naru linux-2.5.62/kernel/panic.c linux-2.5.62p/kernel/panic.c +--- linux-2.5.62/kernel/panic.c 2003-03-07 16:34:58.000000000 +0800 ++++ linux-2.5.62p/kernel/panic.c 2003-03-06 22:27:07.000000000 +0800 +@@ -20,6 +20,10 @@ + asmlinkage void sys_sync(void); /* it's really int */ + + int panic_timeout; ++char *panic_string; ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ extern void ipmi_reset(int mode); ++#endif + + struct notifier_block *panic_notifier_list; + +@@ -53,6 +57,7 @@ + va_start(args, fmt); + vsprintf(buf, fmt, args); + va_end(args); ++ panic_string = buf; + printk(KERN_EMERG "Kernel panic: %s\n",buf); + if (in_interrupt()) + printk(KERN_EMERG "In interrupt handler - not syncing\n"); +@@ -81,7 +86,11 @@ + * choosing not too. It might crash, be corrupt or do + * more harm than good for other reasons. + */ ++#ifdef CONFIG_IPMI_PANIC_ACTION ++ ipmi_reset(CONFIG_IPMI_PANIC_ACTION); ++#else + machine_restart(NULL); ++#endif + } + #ifdef __sparc__ + { diff --git a/kern/bmcpanic-2.6.0.patch b/kern/bmcpanic-2.6.0.patch new file mode 100644 index 0000000..da24915 --- /dev/null +++ b/kern/bmcpanic-2.6.0.patch @@ -0,0 +1,162 @@ +--- linux-2.6.0-test3orig/drivers/char/ipmi/ipmi_msghandler.c 2003-08-09 00:37:25.000000000 -0400 ++++ linux-2.6.0-test3/drivers/char/ipmi/ipmi_msghandler.c 2003-08-14 09:40:49.000000000 -0400 +@@ -1813,7 +1813,9 @@ + { + } + +-static void send_panic_events(void) ++#define EVENT_VALID 0x80 ++ ++static void send_panic_events(int evt, char *str) + { + struct ipmi_msg msg; + ipmi_smi_t intf; +@@ -1837,12 +1839,17 @@ + data[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */ + data[5] = 0xa1; /* Runtime stop OEM bytes 2 & 3. */ + +- /* These used to have the first three bytes of the panic string, +- but not only is that not terribly useful, it's not available +- any more. */ +- data[3] = 0; +- data[6] = 0; +- data[7] = 0; ++ /* ++ * Add whatever breadcrumbs we can to indicate the type of panic. ++ * In kernel 2.6.0 an event code and panic string are passed in. ++ */ ++ if (evt != 0) ++ data[7] = EVENT_VALID | (evt & 0x7f); ++ if (str != NULL) { ++ data[3] = str[0]; ++ data[6] = str[1]; ++ if (evt == 0) data[7] = str[2]; ++ } + + smi_msg.done = dummy_smi_done_handler; + recv_msg.done = dummy_recv_done_handler; +@@ -1891,7 +1898,7 @@ + } + + #ifdef CONFIG_IPMI_PANIC_EVENT +- send_panic_events(); ++ send_panic_events(event,(char *)ptr); + #endif + + return NOTIFY_DONE; +--- linux-2.6.0-test3orig/arch/i386/kernel/traps.c 2003-08-09 00:33:15.000000000 -0400 ++++ linux-2.6.0-test3/arch/i386/kernel/traps.c 2003-08-13 17:37:50.789828552 -0400 +@@ -288,6 +288,8 @@ + return address; + } + ++extern int last_trapnr; ++ + static inline void do_trap(int trapnr, int signr, char *str, int vm86, + struct pt_regs * regs, long error_code, siginfo_t *info) + { +@@ -312,8 +314,10 @@ + } + + kernel_trap: { +- if (!fixup_exception(regs)) ++ if (!fixup_exception(regs)) { ++ last_trapnr = trapnr; + die(str, regs, error_code); ++ } + return; + } + +@@ -387,8 +391,10 @@ + return; + + gp_in_kernel: +- if (!fixup_exception(regs)) ++ if (!fixup_exception(regs)) { ++ last_trapnr = 13; + die("general protection fault", regs, error_code); ++ } + } + + static void mem_parity_error(unsigned char reason, struct pt_regs * regs) +@@ -721,6 +727,7 @@ + error_code); + return; + } ++ last_trapnr = 19; + die_if_kernel("cache flush denied", regs, error_code); + current->thread.trap_no = 19; + current->thread.error_code = error_code; +--- linux-2.6.0-test3orig/kernel/ksyms.c 2003-08-09 00:31:15.000000000 -0400 ++++ linux-2.6.0-test3/kernel/ksyms.c 2003-08-13 17:39:00.000000000 -0400 +@@ -71,6 +71,7 @@ + extern struct timezone sys_tz; + + extern int panic_timeout; ++extern int last_trapnr; + + /* process memory management */ + EXPORT_SYMBOL(do_mmap_pgoff); +@@ -504,6 +505,7 @@ + EXPORT_SYMBOL(panic); + EXPORT_SYMBOL(panic_notifier_list); + EXPORT_SYMBOL(panic_timeout); ++EXPORT_SYMBOL(last_trapnr); + EXPORT_SYMBOL(sprintf); + EXPORT_SYMBOL(snprintf); + EXPORT_SYMBOL(sscanf); +--- linux-2.6.0-test3orig/kernel/panic.c 2003-08-09 00:41:41.000000000 -0400 ++++ linux-2.6.0-test3/kernel/panic.c 2003-08-13 17:38:49.000000000 -0400 +@@ -20,9 +20,15 @@ + + asmlinkage void sys_sync(void); /* it's really int */ + ++/* values for panic event */ ++#define EVENT_VALID 0x80 ++#define PANIC_IN_INTERRUPT 0x40 ++#define TRAP_INIT 0x80 ++ + int panic_timeout; + int panic_on_oops; + int tainted; ++int last_trapnr = TRAP_INIT; + + struct notifier_block *panic_notifier_list; + +@@ -47,6 +53,7 @@ + { + static char buf[1024]; + va_list args; ++ int event = 0; + #if defined(CONFIG_ARCH_S390) + unsigned long caller = (unsigned long) __builtin_return_address(0); + #endif +@@ -56,11 +63,16 @@ + vsnprintf(buf, sizeof(buf), fmt, args); + va_end(args); + printk(KERN_EMERG "Kernel panic: %s\n",buf); +- if (in_interrupt()) ++ if (last_trapnr != TRAP_INIT) { ++ /* should be <= 30 trapnr values, so packing in 0x3f is ok */ ++ event = EVENT_VALID + (last_trapnr & 0x3f); ++ } ++ if (in_interrupt()) { ++ event |= PANIC_IN_INTERRUPT; /*0x40*/ + printk(KERN_EMERG "In interrupt handler - not syncing\n"); +- else if (!current->pid) ++ } else if (!current->pid) + printk(KERN_EMERG "In idle task - not syncing\n"); +- else ++ else + sys_sync(); + bust_spinlocks(0); + +@@ -68,7 +80,7 @@ + smp_send_stop(); + #endif + +- notifier_call_chain(&panic_notifier_list, 0, buf); ++ notifier_call_chain(&panic_notifier_list, event, buf); + + if (panic_timeout > 0) + { diff --git a/kern/ipmi_kcs.patch b/kern/ipmi_kcs.patch new file mode 100644 index 0000000..15f9a10 --- /dev/null +++ b/kern/ipmi_kcs.patch @@ -0,0 +1,1592 @@ +--- linux-2.4.2-virgin/drivers/char/misc.c Sun Apr 8 18:22:17 2001 ++++ linux-bmc/drivers/char/misc.c Tue Oct 30 17:18:07 2001 +@@ -273,6 +273,9 @@ + #ifdef CONFIG_TOSHIBA + tosh_init(); + #endif ++#ifdef CONFIG_IPMI_KCS ++ ipmi_kcs_init(); ++#endif + if (devfs_register_chrdev(MISC_MAJOR,"misc",&misc_fops)) { + printk("unable to get major %d for misc devices\n", + MISC_MAJOR); +--- linux-2.4.2-virgin/drivers/char/Config.in Sun Apr 8 18:22:22 2001 ++++ linux-bmc/drivers/char/Config.in Tue Oct 30 17:18:07 2001 +@@ -81,6 +81,11 @@ + dep_tristate 'Support for user-space parallel port device drivers' CONFIG_PPDEV $CONFIG_PARPORT + fi + ++tristate 'IPMI KCS Interface' CONFIG_IPMI_KCS ++if [ "$CONFIG_IPMI_KCS" != "n" ]; then ++ bool ' BMC watchdog timer support' CONFIG_BMC_WDT ++fi ++ + source drivers/i2c/Config.in + + source drivers/sensors/Config.in +--- linux-2.4.2-virgin/drivers/char/Makefile Sun Apr 8 18:22:17 2001 ++++ linux-bmc/drivers/char/Makefile Tue Oct 30 17:18:08 2001 +@@ -191,6 +191,8 @@ + obj-$(CONFIG_NWBUTTON) += nwbutton.o + obj-$(CONFIG_NWFLASH) += nwflash.o + ++obj-$(CONFIG_IPMI_KCS) += ipmi_kcs.o ++ + # Only one watchdog can succeed. We probe the hardware watchdog + # drivers first, then the softdog driver. This means if your hardware + # watchdog dies or is 'borrowed' for some reason the software watchdog +--- linux-2.4.2-virgin/include/linux/miscdevice.h Sun Apr 8 18:47:26 2001 ++++ linux-bmc/include/linux/miscdevice.h Tue Oct 30 17:32:42 2001 +@@ -31,6 +31,9 @@ + #define SGI_STREAMS_KEYBOARD 150 + /* drivers/sgi/char/usema.c */ + #define SGI_USEMACLONE 151 ++#define IPMI_KCS_MINOR 173 ++#define IPMI_BT_MINOR 210 ++#define IPMI_SMIC_MINOR 211 + + #define TUN_MINOR 200 + +--- /dev/null Fri Mar 23 23:37:44 2001 ++++ linux-bmc/drivers/char/ipmi_kcs.c Tue Oct 30 17:18:07 2001 +@@ -0,0 +1,1211 @@ ++/* ++ * Intelligent Platform Management Interface driver for Linux 2.2.x ++ * ++ * (c) Copyright 2000 San Mehat , All Rights Reserved. ++ * http://www.valinux.com ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version ++ * 2 of the License, or (at your option) any later version. ++ * ++ * Neither San Mehat nor VA Linux Systems admit liability nor provide ++ * warranty for any of this software. This material is provided ++ * "AS-IS" and at no charge. ++ * ++ * (c) Copyright 1999 San Mehat ++ * ++ * Release 0.04. - Initial Release ++ * ++ * Release 0.05. - Fixed ring buffer bugs... better buffer handling ++ * ++ * Release 0.06. - Changed polling freq to 1/10 sec ++ * ++ * Release 0.07. - Integrated watchdog commands into IOCTL's and added ++ * support for blinking front panel LED ++ * ++ * Release 0.08. - Sensor read commands added as ioctl ++ * ++ * Release 0.09. - Changed polling freq back to 1 second ++ * - Fixed possible bug where a chip status variable was ++ * not declared volatile. ++ * - Fixed buffer memory leak ++ * - Fixed ioctl return value problem ++ * - Changed architecture so that applications calling ++ * driver ioctl()'s are put to sleep after request ++ * is sent. The reply is handled by the normal ++ * driver polling timer queue and ring buffer ++ * ++ * Release 0.10. - Modified kcs_write routine so once a write is complete ++ * if the interface isn't in a 'READ STATE' it's okay. ++ * ++ * Release 0.12. - Added Intel Nightshade MB fixups since NS boards don't ++ * support pre-timeout NMI support ++ * - FRU download support added ++ * - /proc/ipmi created with fru data and driver status ++ * Release 0.13. - Added ioctl for setting asset tag ++ * - Fixed bug in /proc ++ * - Added asset tag max length field ++ * Release 1.00 - Added intelligent proc reading so that asset tag is ++ * refreshed whenever /proc/ipmi is read ++ * - Code cleanup ++ * - When asset tag is set with data whoes size is < maximum, ++ * pad the rest out with NULLs ++ * Release 1.10 - Fixed SMP bug which was causing command failures when ++ * /proc/ipmi was being read while a command was being ++ * executed (added semaphore) ++ * - Fixed /proc/ipmi so commands only get issued once ++ * Release 1.20 - Removed a bunch of useless warning msgs ++ * Release 1.30 - Added more stringent error checking when ISA state ++ * enters ERROR_STATE ++ * - Added better unexpected OBF handling on transactions ++ * - Explicitly set power sensor state to NO BLINKY on ++ * startup ++ * Release 2.0 - Re-wrote kcs state machine ++ * - Removed high level functions from driver ++ * - removed driver read() and write() capabilities ++ * - /proc/ipmi renamed to /proc/ipmi_kcs ++ * - /proc/ipmi_kcs now contains only BMC info ++ * ++ * Release 2.1 - Added support of watchdog timer through /dev/watchdog ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "ipmi_kcs.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef CONFIG_PROC_FS ++#include ++#endif ++ ++#ifdef CONFIG_BMC_WDT ++#include ++#endif ++ ++/* function prototypes */ ++ ++int ipmi_kcs_init(void); ++ ++static int kcs_open(struct inode *inode, struct file *file); ++static int kcs_release(struct inode *inode, struct file *file); ++static ssize_t kcs_read(struct file *file, char *buf, size_t count, ++ loff_t * ptr); ++static ssize_t kcs_write(struct file *file, const char *buf, size_t count, ++ loff_t * ppos); ++static long long kcs_llseek(struct file *file, long long offset, ++ int origin); ++static int kcs_ioctl(struct inode *inode, struct file *file, ++ unsigned int cmd, unsigned long arg); ++ ++#ifdef CONFIG_BMC_WDT ++static int wdt_is_open; ++static int watchdog_set(int cmd); ++static int watchdog_reset(void); ++static int wdt_open(struct inode *inode, struct file *file); ++static int wdt_release(struct inode *inode, struct file *file); ++static ssize_t wdt_write(struct file *file, const char *buf, size_t count, ++ loff_t * ppos); ++static int wdt_ioctl(struct inode *inode, struct file *file, ++ unsigned int cmd, unsigned long arg); ++ ++static struct file_operations wdt_fops = { ++ owner:THIS_MODULE, ++ write:wdt_write, ++ ioctl:wdt_ioctl, ++ open:wdt_open, ++ release:wdt_release, ++}; ++ ++static struct miscdevice wdt_miscdev = { ++ WATCHDOG_MINOR, ++ "bmc_wdt", ++ &wdt_fops ++}; ++ ++/* module parameters */ ++static int wdt_margin = 60; /* watchdog timer interval in seconds */ ++static int wdt_pre = 1; /* watchdog pre-timeout interval in seconds */ ++static int wdt_action = 0x03; /* Default is no pre-timeout interrupt and power cycle upon timeout */ ++ ++MODULE_PARM(wdt_margin, "i"); ++MODULE_PARM(wdt_pre, "i"); ++MODULE_PARM(wdt_action, "i"); ++ ++#define WATCHDOG_ENABLE 0x01 ++#define WATCHDOG_DISABLE 0x02 ++#endif ++ ++static unsigned char get_kcs_state(void); ++static unsigned char read_kcs_data(void); ++static void write_kcs_data(unsigned char data); ++static void write_kcs_cmd(unsigned char cmd); ++static int is_obf_set(void); ++static int clear_obf(void); ++static int wait_while_ibf(void); ++static int get_deviceid(void); ++static int kcs_do_xfer(BMC_REQUEST * request, int request_len, ++ BMC_RESPONSE * response, int *response_len); ++static int old_kcs_do_xfer(BMC_REQUEST * request, int request_len, ++ BMC_RESPONSE * response, int *response_len); ++static int new_kcs_do_xfer(BMC_REQUEST * request, int request_len, ++ BMC_RESPONSE * response, int *response_len); ++ ++#ifdef CONFIG_PROC_FS ++int ipmi_get_info(char *buf, char **start, off_t fpos, int length, ++ int *eof, void *unused); ++#endif ++ ++/* static globals */ ++static int kcs_refcnt = 0; ++static int driver_major = 2; ++static int driver_minor = 1; ++static int kcs_machine = 0; ++ ++static struct { ++ unsigned int tx_good; ++ unsigned int tx_bad; ++} kcs_stat; ++ ++static DEVICE_ID_RESPONSE dev_id; ++DECLARE_MUTEX(kcs_sem); ++ ++#ifdef CONFIG_PROC_FS ++static struct proc_dir_entry *ipmi_proc_entry; ++#endif ++ ++static struct file_operations kcs_fops = { ++ owner:THIS_MODULE, ++ write:kcs_write, ++ ioctl:kcs_ioctl, ++ open:kcs_open, ++ release:kcs_release, ++ read:kcs_read, ++}; ++ ++static struct miscdevice kcs_miscdev = { ++ IPMI_KCS_MINOR, ++ "ipmi_kcs", ++ &kcs_fops ++}; ++ ++static struct ipmi_driver_info drv_inf; ++ ++/***************/ ++ ++static long long kcs_llseek(struct file *file, long long offset, ++ int origin) ++{ ++ return -ESPIPE; ++} ++ ++static ssize_t kcs_write(struct file *file, const char *buf, size_t count, ++ loff_t * ppos) ++{ ++ return (-ENOSYS); ++} ++ ++static ssize_t kcs_read(struct file *file, char *buf, size_t count, ++ loff_t * ptr) ++{ ++ return (-ENOSYS); ++} ++ ++static int kcs_ioctl(struct inode *inode, ++ struct file *file, ++ unsigned int cmd, unsigned long arg) ++{ ++ switch (cmd) { ++ case IOCTL_IPMI_XFER: ++ { ++ IPMI_XFER user_buffer; ++ int rc; ++ int response_len = sizeof(user_buffer.response); ++ ++ if (!arg) ++ return (-EFAULT); ++ if (copy_from_user ++ ((void *) &user_buffer, (void *) arg, ++ sizeof(IPMI_XFER))) ++ return (-EFAULT); ++ if ((user_buffer.request_len < 2) ++ || (user_buffer.response_len < 3)) ++ return (-EINVAL); ++ ++ rc = kcs_do_xfer((BMC_REQUEST *) & user_buffer. ++ request, user_buffer.request_len, ++ (BMC_RESPONSE *) & user_buffer. ++ response, &response_len); ++ user_buffer.response_len = response_len; ++ copy_to_user((void *) arg, (void *) &user_buffer, ++ sizeof(IPMI_XFER)); ++ return (rc); ++ } ++ case IOCTL_DRIVER_INFO: ++ { ++ struct ipmi_driver_info user_buffer; ++ ++ if (!arg) ++ return (-EFAULT); ++ if (copy_from_user ++ ((void *) &user_buffer, (void *) arg, ++ sizeof(user_buffer))) ++ return (-EFAULT); ++ copy_to_user((void *) arg, (void *) &drv_inf, ++ sizeof(drv_inf)); ++ return (0); ++ } ++ default: ++ return -EINVAL; ++ } ++ return (0); ++} ++ ++static int get_deviceid() ++{ ++ unsigned char request_buffer[MAX_BUFFER_SIZE]; ++ unsigned char response_buffer[MAX_BUFFER_SIZE]; ++ BMC_REQUEST *bmc_req; ++ BMC_RESPONSE *bmc_resp; ++ int rc, response_len; ++ ++ memset(&dev_id, 0, sizeof(DEVICE_ID_RESPONSE)); ++ memset(request_buffer, 0, sizeof(request_buffer)); ++ memset(response_buffer, 0, sizeof(response_buffer)); ++ bmc_req = (BMC_REQUEST *) request_buffer; ++ bmc_resp = (BMC_RESPONSE *) response_buffer; ++ response_len = sizeof(response_buffer); ++ ++ bmc_req->lun = 0; ++ bmc_req->netfn = APP_REQUEST; ++ bmc_req->cmd = 0x01; /* GET_DEVICE_ID */ ++ ++#if defined(__ia64__) ++ rc = new_kcs_do_xfer(bmc_req, 2, bmc_resp, &response_len); ++#else ++ rc = old_kcs_do_xfer(bmc_req, 2, bmc_resp, &response_len); ++#endif ++ if (bmc_resp->cc != 0x00) { ++ printk("[IPMI_KCS] get_deviceid() failed (0x%.2x)\n", ++ bmc_resp->cc); ++ return (-EIO); ++ } ++ memcpy(&dev_id, bmc_resp->data, sizeof(DEVICE_ID_RESPONSE)); ++ return (0); ++} ++ ++static int kcs_open(struct inode *inode, struct file *file) ++{ ++ switch (MINOR(inode->i_rdev)) { ++ case IPMI_KCS_MINOR: ++ { ++ MOD_INC_USE_COUNT; ++ kcs_refcnt++; ++ return 0; ++ } ++ default: ++ return -ENODEV; ++ } ++} ++ ++static int kcs_release(struct inode *inode, struct file *file) ++{ ++ if (MINOR(inode->i_rdev) == IPMI_KCS_MINOR) { ++ kcs_refcnt--; ++ } ++ MOD_DEC_USE_COUNT; ++ return 0; ++} ++ ++#ifdef CONFIG_BMC_WDT ++static ssize_t wdt_write(struct file *file, const char *buf, size_t count, ++ loff_t * ppos) ++{ ++ /* Can't seek (pwrite) on this device */ ++ if (ppos != &file->f_pos) ++ return -ESPIPE; ++ ++ /* ++ * Stop and then restart the watchdog timer. ++ */ ++ if (count) { ++ if (watchdog_set(WATCHDOG_DISABLE)) ++ return -EIO; ++ if (watchdog_set(WATCHDOG_ENABLE)) ++ return -EIO; ++ if (watchdog_reset()) ++ return -EIO; ++ return 1; ++ } ++ return 0; ++} ++ ++static int wdt_ioctl(struct inode *inode, ++ struct file *file, ++ unsigned int cmd, unsigned long arg) ++{ ++ static struct watchdog_info ident = { ++ WDIOF_KEEPALIVEPING, 1, "BMC WDT" ++ }; ++ ++ switch (cmd) { ++ case WDIOC_GETSUPPORT: ++ if (copy_to_user ++ ((struct watchdog_info *) arg, &ident, sizeof(ident))) ++ return -EFAULT; ++ break; ++ ++ case WDIOC_GETSTATUS: ++ if (copy_to_user((int *) arg, &wdt_is_open, sizeof(int))) ++ return -EFAULT; ++ break; ++ ++ case WDIOC_KEEPALIVE: ++ if (watchdog_set(WATCHDOG_DISABLE)) ++ return -EIO; ++ if (watchdog_set(WATCHDOG_ENABLE)) ++ return -EIO; ++ if (watchdog_reset()) ++ return -EIO; ++ break; ++ ++ default: ++ return -ENOIOCTLCMD; ++ } ++ return 0; ++} ++ ++static int watchdog_set(int cmd) ++{ ++ unsigned char request_buffer[MAX_BUFFER_SIZE]; ++ unsigned char response_buffer[MAX_BUFFER_SIZE]; ++ BMC_REQUEST *bmc_req; ++ BMC_RESPONSE *bmc_resp; ++ int rc, response_len; ++ SET_WATCHDOG *set; ++ int fixup = 0; ++ ++ memset(request_buffer, 0, sizeof(request_buffer)); ++ memset(response_buffer, 0, sizeof(response_buffer)); ++ bmc_req = (BMC_REQUEST *) request_buffer; ++ bmc_resp = (BMC_RESPONSE *) response_buffer; ++ response_len = sizeof(response_buffer); ++ ++ bmc_req->lun = 0; ++ bmc_req->netfn = APP_REQUEST; ++ bmc_req->cmd = 0x24; /* Set Watchdog Timer */ ++ ++ set = (SET_WATCHDOG *) bmc_req->data; ++ ++ while (1) { ++ set->timer_use = 0x04; ++ ++ set->timeout_action = wdt_action & 0x0F; ++ set->pre_irq = (wdt_action >> 4) & 0x0F; ++ ++ if (cmd == WATCHDOG_DISABLE) { ++ set->timeout_action = 0x00; ++ set->pre_irq = 0x00; ++ } ++ set->pretimeout_interval = wdt_pre; ++ ++ if (fixup) { ++ set->pre_irq = 0x00; ++ set->pretimeout_interval = 0; ++ } ++ ++ set->tuefc_biosfrb2 = 0x00; ++ set->tuefc_biospost = 0x0; ++ set->tuefc_osload = 0x00; ++ set->tuefc_smsos = 0x01; ++ set->initial_count = wdt_margin * 10; ++ ++ rc = kcs_do_xfer(bmc_req, 2 + sizeof(SET_WATCHDOG), ++ bmc_resp, &response_len); ++ ++ if (bmc_resp->cc == 0xcc) { ++ fixup++; ++ if (fixup == 2) { ++ printk ++ ("[IPMI_KCS] Flakey NMI fixup failed\n"); ++ return (-EIO); ++ } ++ printk("[IPMI_KCS] Flakey NMI fixup enabled\n"); ++ continue; ++ } else if (bmc_resp->cc != 0x00) { ++ printk ++ ("[IPMI_KCS] Set watchdog timer failed (rc = 0x%.2x)\n", ++ bmc_resp->cc); ++ return (-EIO); ++ } ++ break; ++ } ++ return (0); ++} ++ ++static int watchdog_reset() ++{ ++ unsigned char request_buffer[MAX_BUFFER_SIZE]; ++ unsigned char response_buffer[MAX_BUFFER_SIZE]; ++ BMC_REQUEST *bmc_req; ++ BMC_RESPONSE *bmc_resp; ++ int rc, response_len; ++ ++ memset(request_buffer, 0, sizeof(request_buffer)); ++ memset(response_buffer, 0, sizeof(response_buffer)); ++ bmc_req = (BMC_REQUEST *) request_buffer; ++ bmc_resp = (BMC_RESPONSE *) response_buffer; ++ response_len = sizeof(response_buffer); ++ ++ bmc_req->lun = 0; ++ bmc_req->netfn = APP_REQUEST; ++ bmc_req->cmd = 0x22; /* Reset Watchdog Timer */ ++ ++ rc = kcs_do_xfer(bmc_req, 2, bmc_resp, &response_len); ++ if (bmc_resp->cc != 0x00) { ++ printk("[IPMI_KCS] Reset Watchdog Timer failed (0x%.2x)\n", ++ bmc_resp->cc); ++ return (-EIO); ++ } ++ return (0); ++} ++ ++static int wdt_open(struct inode *inode, struct file *file) ++{ ++ switch (MINOR(inode->i_rdev)) { ++ case WATCHDOG_MINOR: ++ if (wdt_is_open) ++ return -EBUSY; ++ ++ MOD_INC_USE_COUNT; ++ /* ++ * Activate ++ */ ++ wdt_is_open = 1; ++ if (watchdog_reset()) ++ return -EIO; ++ return 0; ++ default: ++ return -ENODEV; ++ } ++} ++ ++static int wdt_release(struct inode *inode, struct file *file) ++{ ++ lock_kernel(); ++ if (MINOR(inode->i_rdev) == WATCHDOG_MINOR) { ++#ifndef CONFIG_WATCHDOG_NOWAYOUT ++ if (watchdog_set(WATCHDOG_DISABLE)) ++ return -EIO; ++#endif ++ wdt_is_open = 0; ++ MOD_DEC_USE_COUNT; ++ } ++ unlock_kernel(); ++ return 0; ++} ++ ++/* ++ * Notifier for system down ++ */ ++ ++static int wdt_notify_sys(struct notifier_block *this, unsigned long code, ++ void *unused) ++{ ++ if (code == SYS_DOWN || code == SYS_HALT) { ++ /* Turn the timer off */ ++ watchdog_set(WATCHDOG_DISABLE); ++ } ++ return NOTIFY_DONE; ++} ++ ++/* ++ * The BMC needs to learn about soft shutdowns in order to ++ * turn the watchdog timer off. ++ */ ++ ++static struct notifier_block wdt_notifier = { ++ wdt_notify_sys, ++ NULL, ++ 0 ++}; ++#endif ++ ++#ifdef MODULE ++int init_module(void) ++{ ++ return (ipmi_kcs_init()); ++} ++ ++void cleanup_module(void) ++{ ++ printk("[IPMI_KCS] Driver shutting down.\n"); ++#ifdef CONFIG_PROC_FS ++ remove_proc_entry("ipmi_kcs", 0); ++#endif ++ misc_deregister(&kcs_miscdev); ++#ifdef CONFIG_BMC_WDT ++ misc_deregister(&wdt_miscdev); ++ unregister_reboot_notifier(&wdt_notifier); ++#endif ++ release_region(KCS_BASE, 16); ++} ++#endif ++ ++int ipmi_kcs_init() ++{ ++ printk ++ ("IPMI KCS driver (San Mehat nettwerk@valinux.com) v%d.%d at io 0x%x\n", ++ driver_major, driver_minor, KCS_BASE); ++ request_region(KCS_BASE, 16, "ipmi_kcs"); ++ if ((inb_p(KCS_STATUS_REG) == 0xFF) && ++ (inb_p(KCS_DATAIN_REG) == 0xFF)) { ++ printk("--KCS ISA window not present. Driver exiting\n"); ++ release_region(KCS_BASE, 16); ++ return (-ENXIO); ++ } ++ ++ kcs_stat.tx_good = 0; ++ kcs_stat.tx_bad = 0; ++ memset(&drv_inf, 0, sizeof(drv_inf)); ++ strcpy(drv_inf.driver_name, "ipmi_kcs"); ++ drv_inf.major_ver = driver_major; ++ drv_inf.minor_ver = driver_minor; ++ ++ misc_register(&kcs_miscdev); ++#ifdef CONFIG_BMC_WDT ++ misc_register(&wdt_miscdev); ++ register_reboot_notifier(&wdt_notifier); ++#endif ++ get_deviceid(); ++ printk("--BMC version %x.%x, IPMI version %d.%d\n", ++ dev_id.major_firmware_revision, ++ dev_id.minor_firmware_revision, ++ dev_id.ipmi_version_major, dev_id.ipmi_version_minor); ++ if ((dev_id.ipmi_version_major == 0) && ++ (dev_id.ipmi_version_minor == 9)) { ++ printk("--Using legacy KCS state machine\n"); ++ kcs_machine = KCS_LEGACY; ++ drv_inf.flags |= KCS_FLAG_LEGACY; ++ } else { ++ printk("--Using new KCS state machine\n"); ++ kcs_machine = KCS_NEW; ++ } ++ if (!pci_present()) { ++ printk ++ ("--PCIBIOS not present. Unable to determine chipset vendor\n"); ++ drv_inf.flags |= KCS_FLAG_BLINKY; ++ } else { ++ int pci_index = 0; ++ unsigned char pci_bus, pci_device_fn; ++ unsigned short vendor, device; ++ ++ for (; pci_index < 0xff; pci_index++) { ++ if (pcibios_find_class(PCI_CLASS_BRIDGE_HOST << 8, ++ pci_index, ++ &pci_bus, ++ &pci_device_fn) != ++ PCIBIOS_SUCCESSFUL) { ++ break; ++ } ++ pcibios_read_config_word(pci_bus, pci_device_fn, ++ PCI_VENDOR_ID, &vendor); ++ pcibios_read_config_word(pci_bus, pci_device_fn, ++ PCI_DEVICE_ID, &device); ++ drv_inf.mb_chipset_vendor = vendor; ++ drv_inf.mb_chipset_device = device; ++ printk ++ ("--Motherboard Chipset vendor 0x%.4x, device 0x%.4x\n", ++ vendor, device); ++ if ((vendor == 0x8086) && (device == 0x71a0)) { ++ drv_inf.flags |= KCS_FLAG_BLINKY; ++ } ++ } ++ } ++ if (drv_inf.flags & KCS_FLAG_BLINKY) { ++ printk("--Intel Lancewood features enabled\n"); ++ } else ++ printk("--No vendor specific features enabled\n"); ++#ifdef CONFIG_PROC_FS ++ if (!(ipmi_proc_entry = create_proc_entry("ipmi_kcs", 0, 0))) ++ printk(KERN_ERR, ++ "--ERROR: Unable to register /proc/ipmi_kcs\n"); ++ else ++ ipmi_proc_entry->read_proc = ipmi_get_info; ++ ++#endif ++ return (0); ++} ++ ++static int kcs_do_xfer(BMC_REQUEST * request, ++ int request_len, ++ BMC_RESPONSE * response, int *response_len) ++{ ++ int rc = 0; ++ ++ down(&kcs_sem); ++ switch (kcs_machine) { ++ case KCS_LEGACY: ++ { ++ rc = old_kcs_do_xfer(request, request_len, ++ response, response_len); ++ break; ++ } ++ case KCS_NEW: ++ { ++ rc = new_kcs_do_xfer(request, request_len, ++ response, response_len); ++ break; ++ } ++ default: ++ { ++ printk ++ ("[IPMI_KCS] Undefined or bad KCS state machine selected (%d)\n", ++ kcs_machine); ++ get_deviceid(); ++ if ((dev_id.ipmi_version_major == 0) && ++ (dev_id.ipmi_version_minor == 9)) { ++ printk ++ ("Recalibrated to use legacy KCS state machine\n"); ++ kcs_machine = KCS_LEGACY; ++ } else { ++ printk ++ ("Recalibrated to use new KCS state machine\n"); ++ kcs_machine = KCS_NEW; ++ } ++ rc = -EAGAIN; ++ break; ++ } ++ } ++ if (rc == 0) ++ kcs_stat.tx_good++; ++ else ++ kcs_stat.tx_bad++; ++ up(&kcs_sem); ++ return (rc); ++} ++ ++static int new_kcs_do_xfer(BMC_REQUEST * request, ++ int request_len, ++ BMC_RESPONSE * response, int *response_len) ++{ ++ unsigned char *xmit_buffer, *recv_buffer; ++ int i = 0, rc = 0, state = SEND_INIT, bad = 0; ++ ++ xmit_buffer = (unsigned char *) request; ++ recv_buffer = (unsigned char *) response; ++ ++ while (1) { ++ if (state == END) ++ break; ++ else if (bad > 2) { ++ printk ++ ("[IPMI_KCS] Maximum retries exceeded. Aborting transfer\n"); ++ rc = -EIO; ++ break; ++ } ++ switch (state) { ++ case SEND_INIT: ++ { ++ i = 0; ++ state = SEND_START; ++ wait_while_ibf(); ++ if (clear_obf() != 0) { ++ state = ERROR; ++ break; ++ } ++ } ++ case SEND_START: ++ { ++ state = SEND_NEXT; ++ write_kcs_cmd(WRITE_START); ++ wait_while_ibf(); ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ } ++ case SEND_NEXT: ++ { ++ if (i == (request_len - 1)) { ++ state = SEND_END; ++ break; ++ } ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ if (clear_obf() != 0) { ++ state = ERROR; ++ break; ++ } ++ break; ++ } ++ case SEND_END: ++ { ++ write_kcs_cmd(WRITE_END); ++ wait_while_ibf(); ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ if (clear_obf() != 0) { ++ state = ERROR; ++ break; ++ } ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ state = RECV_START; ++ } ++ case RECV_START: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_WRITE_STATE: ++ case KCS_IDLE_STATE: ++ { ++ mdelay(BMC_RESPONSE_DELAY); ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ i = 0; ++ memset(recv_buffer, 0, ++ *response_len); ++ state = RECV_INIT; ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_INIT: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ state = RECV_END; ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ else ++ mdelay(1); ++ break; ++ } ++ default: ++ { ++ mdelay(1); ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_NEXT: ++ { ++ if (i >= *response_len) { ++ rc = -EOVERFLOW; ++ state = ERROR; ++ break; ++ } ++ recv_buffer[i++] = read_kcs_data(); ++ write_kcs_data(KCS_READ); ++ wait_while_ibf(); ++ state = RECV_INIT2; ++ break; ++ } ++ case RECV_INIT2: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ if (wait_until_obf() == 0) { ++ clear_obf(); ++ state = RECV_END; ++ break; ++ } else { ++ state = ERROR; ++ break; ++ } ++ } ++ case KCS_READ_STATE: ++ { ++ if (wait_until_obf() == 0) ++ state = RECV_NEXT; ++ else ++ state = ERROR; ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_END: ++ { ++ if ((i < MIN_BMC_RESPONSE_SIZE) || ++ (response->netfn != ++ (request->netfn | 0x01)) ++ || (response->cmd != request->cmd)) { ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ printk ++ ("[IPMI_KCS] Request/Response CMD/NETFN mismatch error\n"); ++ ++ printk ++ (" RQcmd/RQnetfn=0x%x/0x%x,RScmd/RSnetfn=0x%x/0x%x\n", ++ request->cmd, request->netfn, ++ response->cmd, ++ response->netfn); ++ break; ++ } ++ ++ *response_len = i; ++ rc = 0; ++ state = END; ++ break; ++ } ++ case ERROR: ++ default: ++ { ++ printk ++ ("[IPMI_KCS] BMC in bad state. Retrying transfer\n"); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ } ++ return (rc); ++} ++ ++static int old_kcs_do_xfer(BMC_REQUEST * request, ++ int request_len, ++ BMC_RESPONSE * response, int *response_len) ++{ ++ unsigned char *xmit_buffer, *recv_buffer; ++ int i = 0, rc = 0, state = SEND_INIT, bad = 0; ++ ++ xmit_buffer = (unsigned char *) request; ++ recv_buffer = (unsigned char *) response; ++ ++ while (1) { ++ if (state == END) ++ break; ++ else if (bad > 2) { ++ printk ++ ("[IPMI_KCS] Maximum retries exceeded. Aborting transfer\n"); ++ rc = -EIO; ++ break; ++ } ++ switch (state) { ++ case SEND_INIT: ++ { ++ i = 0; ++ state = SEND_START; ++ wait_while_ibf(); ++ } ++ case SEND_START: ++ { ++ state = SEND_NEXT; ++ write_kcs_cmd(WRITE_START); ++ wait_while_ibf(); ++ } ++ case SEND_NEXT: ++ { ++ if (i == (request_len - 1)) { ++ state = SEND_END; ++ break; ++ } ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ break; ++ } ++ case SEND_END: ++ { ++ wait_while_ibf(); ++ write_kcs_cmd(WRITE_END); ++ wait_while_ibf(); ++ if (get_kcs_state() != KCS_WRITE_STATE) { ++ state = ERROR; ++ break; ++ } ++ write_kcs_data(xmit_buffer[i++]); ++ wait_while_ibf(); ++ state = RECV_START; ++ } ++ case RECV_START: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_WRITE_STATE: ++ case KCS_IDLE_STATE: ++ { ++ mdelay(BMC_RESPONSE_DELAY); ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ i = 0; ++ memset(recv_buffer, 0, ++ *response_len); ++ state = RECV_INIT; ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_INIT: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ state = RECV_END; ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ else ++ mdelay(1); ++ break; ++ } ++ default: ++ { ++ mdelay(1); ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_NEXT: ++ { ++ if (i >= *response_len) { ++ rc = -EOVERFLOW; ++ state = ERROR; ++ break; ++ } ++ recv_buffer[i++] = read_kcs_data(); ++ wait_while_ibf(); ++ write_kcs_data(KCS_READ); ++ state = RECV_INIT2; ++ break; ++ } ++ case RECV_INIT2: ++ { ++ switch (get_kcs_state()) { ++ case KCS_ERROR_STATE: ++ case KCS_WRITE_STATE: ++ { ++ state = ERROR; ++ break; ++ } ++ case KCS_IDLE_STATE: ++ { ++ state = RECV_END; ++ break; ++ } ++ case KCS_READ_STATE: ++ { ++ if (is_obf_set()) ++ state = RECV_NEXT; ++ break; ++ } ++ } ++ break; ++ } ++ case RECV_END: ++ { ++ if ((i < MIN_BMC_RESPONSE_SIZE) || ++ (response->netfn != ++ (request->netfn | 0x01)) ++ || (response->cmd != request->cmd)) { ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ printk ++ ("[IPMI_KCS] Request/Response CMD/NETFN mismatch error\n"); ++ ++ printk ++ (" RQcmd/RQnetfn=0x%x/0x%x,RScmd/RSnetfn=0x%x/0x%x\n", ++ request->cmd, request->netfn, ++ response->cmd, ++ response->netfn); ++ break; ++ } ++ ++ *response_len = i; ++ rc = 0; ++ state = END; ++ break; ++ } ++ case ERROR: ++ default: ++ { ++ printk ++ ("[IPMI_KCS] BMC in bad state. Retrying transfer\n"); ++ mdelay(BMC_RETRY_DELAY); ++ bad++; ++ state = SEND_INIT; ++ break; ++ } ++ } ++ } ++ return (rc); ++} ++ ++#ifdef CONFIG_PROC_FS ++int ipmi_get_info(char *buf, char **start, off_t fpos, int length, ++ int *eof, void *unused) ++{ ++ char *p; ++ ++ if (get_deviceid() != 0) { ++ printk("[IPMI_KCS] Unable to get device ID\n"); ++ memset(&dev_id, 0, sizeof(dev_id)); ++ } ++ ++ p = buf; ++ p += sprintf(p, "Driver Version\t: %d.%d\n", ++ driver_major, driver_minor); ++ p += sprintf(p, "BMC Version\t: %x.%x\n", ++ dev_id.major_firmware_revision, ++ dev_id.minor_firmware_revision); ++ p += sprintf(p, "IPMI Version\t: %d.%d\n", ++ dev_id.ipmi_version_major, dev_id.ipmi_version_minor); ++ p += sprintf(p, "\nTotal Good Transactions\t: %d\n", ++ kcs_stat.tx_good); ++ p += sprintf(p, "Total Bad Transactions\t: %d\n", kcs_stat.tx_bad); ++ ++ return p - buf; ++} ++#endif ++ ++/* ++ * kcs chip mashing stuff ++ */ ++static int wait_while_ibf() ++{ ++ unsigned char status_byte; ++ ++ status_byte = inb_p(KCS_STATUS_REG); ++ if ((status_byte & KCS_IBF) == 0) ++ return (0); ++ mdelay(KCS_READY_DELAY); ++ status_byte = inb_p(KCS_STATUS_REG); ++ if (status_byte & KCS_IBF) ++ return (-1); ++ return (0); ++} ++ ++static int wait_until_obf() ++{ ++ int retries = 0; ++ ++ while (retries < 2) { ++ if (is_obf_set()) ++ return (0); ++ mdelay(KCS_READY_DELAY); ++ retries++; ++ } ++ return (-ETIMEDOUT); ++} ++ ++static unsigned char get_kcs_state() ++{ ++ unsigned char cs; ++ ++ cs = inb_p(KCS_STATUS_REG); ++ return (cs & KCS_STATE_MASK); ++} ++ ++static unsigned char read_kcs_data() ++{ ++ unsigned char data; ++ ++ data = inb_p(KCS_DATAOUT_REG); ++ return (data); ++} ++ ++static void write_kcs_data(unsigned char data) ++{ ++ outb_p(data, KCS_DATAIN_REG); ++} ++ ++static void write_kcs_cmd(unsigned char cmd) ++{ ++ outb_p(cmd, KCS_COMMAND_REG); ++} ++ ++static int is_obf_set() ++{ ++ unsigned char cs; ++ ++ cs = inb_p(KCS_STATUS_REG); ++ return ((cs & KCS_OBF) == KCS_OBF); ++} ++ ++static int clear_obf() ++{ ++ read_kcs_data(); ++ return (0); ++} +--- /dev/null Fri Mar 23 23:37:44 2001 ++++ linux-bmc/drivers/char/ipmi_kcs.h Tue Oct 30 17:18:07 2001 +@@ -0,0 +1,171 @@ ++/* ++ * Intelligent Platform Management Interface driver for Linux 2.x ++ * ++ * (c) Copyright 1999 San Mehat & VA Linux Systems ++ * 1382 Bordeaux Dr. ++ * Sunnyvale, California ++ * 94089 ++ * ++ * http://www.valinux.com ++ * ++ * This driver is provided under the GNU public license, incorporated ++ * herein by reference. The driver is provided without warranty or ++ * support. ++ * ++ * ++ */ ++ ++#include ++ ++#define KCS_LEGACY 1 ++#define KCS_NEW 2 ++ ++#define KCS_READY_DELAY 5 ++#define BMC_RESPONSE_DELAY 5 ++#define BMC_RETRY_DELAY 60 ++ ++#if defined(__ia64__) ++#define KCS_BASE 0x8a2 ++#else ++#define KCS_BASE 0xca2 ++#endif ++#define KCS_STATUS_REG (KCS_BASE + 1) ++#define KCS_COMMAND_REG (KCS_BASE + 1) ++#define KCS_DATAIN_REG (KCS_BASE + 0) ++#define KCS_DATAOUT_REG (KCS_BASE + 0) ++ ++/* State bits based on S1 & S0 below */ ++#define KCS_STATE_MASK 0xC0 ++#define KCS_IDLE_STATE 0x00 ++#define KCS_READ_STATE 0x40 ++#define KCS_WRITE_STATE 0x80 ++#define KCS_ERROR_STATE 0xC0 ++ ++#define KCS_IBF 0x02 ++#define KCS_OBF 0x01 ++#define KCS_SMS_ATN 0x04 ++ ++#define SEND_INIT 1 ++#define SEND_START 2 ++#define SEND_NEXT 3 ++#define SEND_END 4 ++#define RECV_START 5 ++#define RECV_INIT 6 ++#define RECV_NEXT 7 ++#define RECV_INIT2 8 ++#define RECV_END 9 ++#define END 10 ++#define ERROR 0 ++ ++/* SMS Transfer Stream Control Codes */ ++#define GET_STATUS_ABORT 0x60 ++#define WRITE_START 0x61 ++#define WRITE_END 0x62 ++#define KCS_READ 0x68 ++ ++#define MAX_INVALID_RESPONSE_COUNT 2 ++#define MIN_BMC_RESPONSE_SIZE 3 ++#define MAX_IMB_PACKET_SIZE 33 ++#define MAX_BMC_RESPONSE_SIZE (MIN_BMC_RESPONSE_SIZE + MAX_IMB_PACKET_SIZE) ++#define MAX_XFER_LENGTH (MAX_IMB_PACKET_SIZE * 2) ++ ++#define MAX_BUFFER_SIZE 64 ++ ++typedef struct bmc_response ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ ++ unsigned char cmd; ++ unsigned char cc; ++ unsigned char data[1]; ++ }BMC_RESPONSE; ++ ++typedef struct bmc_request ++ { ++ unsigned char lun :2; ++ unsigned char netfn :6; ++ ++ unsigned char cmd; ++ unsigned char data[1]; ++ }BMC_REQUEST; ++ ++/* GET_DEVICE_ID RESPONSE */ ++typedef struct device_id_response ++ { ++ unsigned char device_id; ++ ++ unsigned char device_revision :4; ++ unsigned char reserved :3; ++ unsigned char provides_sdr :1; ++ ++ unsigned char major_firmware_revision :7; ++ #define NORMAL_OPERATION 0 ++ #define DEVICE_BUSY 1 ++ unsigned char device_available :1; ++ ++ unsigned char minor_firmware_revision; ++ ++ unsigned char ipmi_version_major :4; ++ unsigned char ipmi_version_minor :4; ++ ++ unsigned char supports_sensor_device :1; ++ unsigned char supports_sdr_device :1; ++ unsigned char supports_sel_device :1; ++ unsigned char supports_fru_device :1; ++ unsigned char supports_ipmb_receiver :1; ++ unsigned char supports_ipmb_generator :1; ++ unsigned char supports_bridge :1; ++ unsigned char supports_chassis_device :1; ++ ++ unsigned char manufacturer_id1; ++ unsigned char manufacturer_id2; ++ unsigned char manufacturer_id3; ++ ++ unsigned short product_id; ++ } DEVICE_ID_RESPONSE; ++ ++typedef struct set_watchdog ++ { ++ unsigned char timer_use :3; ++ unsigned char res1 :4; ++ unsigned char dontlog :1; ++ ++ unsigned char timeout_action :3; ++ unsigned char res2 :1; ++ unsigned char pre_irq :3; ++ unsigned char res3 :1; ++ ++ unsigned char pretimeout_interval; ++ ++ unsigned char tuefc_res1 :1; ++ unsigned char tuefc_biosfrb2 :1; ++ unsigned char tuefc_biospost :1; ++ unsigned char tuefc_osload :1; ++ unsigned char tuefc_smsos :1; ++ unsigned char tuefc_oem :1; ++ unsigned char tuefc_res2 :1; ++ unsigned char tuefc_res3 :1; ++ ++ unsigned short initial_count; ++ } SET_WATCHDOG; ++ ++typedef struct get_watchdog_response ++ { ++ unsigned char timer_use :3; ++ unsigned char res1 :3; ++ unsigned char timer_status :1; ++ unsigned char sel_log :1; ++ ++ unsigned char timeout_act :3; ++ unsigned char res2 :1; ++ unsigned char pre_irq_act :3; ++ unsigned char res3 :1; ++ ++ unsigned char pre_timeout __attribute__ ((packed)); ++ ++ unsigned char timer_use_xp __attribute__ ((packed)); ++ ++ unsigned short init_count __attribute__ ((packed)); ++ unsigned short current_count __attribute__ ((packed)); ++ } GET_WATCHDOG_RESPONSE; +--- /dev/null Fri Mar 23 23:37:44 2001 ++++ linux-bmc/include/linux/ipmi_ioctls.h Tue Oct 30 17:18:07 2001 +@@ -0,0 +1,152 @@ ++/* ++ * Intelligent Platform Management Interface driver for Linux 2.x ++ * ++ * (c) Copyright 1999 San Mehat & VA Linux Systems ++ * 1382 Bordeaux Dr. ++ * Sunnyvale, California ++ * 94089 ++ * ++ * http://www.valinux.com ++ * ++ * This driver is provided under the GNU public license, incorporated ++ * herein by reference. The driver is provided without warranty or ++ * support. ++ * ++ * IOCTL definitions for IPMI drivers ++ */ ++ ++/* ++ * Note: The following macros should be used on the IPMI_XFER structure. ++ * DO NOT try to muck with this structure directly.. use the macros ++ * to ensure future compatibility: ++ * ++ * INIT_XFER(IPMI_XFER *); ++ * -- Zero out a IPMI_XFER structure and initialize it for use ++ * ++ * SET_REQUEST_LUN(IPMI_XFER *, unsigned char lun); ++ * -- Set the request packet logical unit ++ * ++ * SET_REQUEST_NETFN(IPMI_XFER *, unsigned char netfn); ++ * -- Set the request packet network function code ++ * ++ * SET_REQUEST_CMD(IPMI_XFER *, unsigned char cmd); ++ * -- Set the request packet IPMI command code ++ * ++ * SET_REQUEST_DATA(IPMI_XFER *, unsigned char *data, int length); ++ * -- Set the request packet optional argument data field ++ * ++ * GET_RESPONSE_LUN(IPMI_XFER *, unsigned char lun); ++ * -- Get the response packet logical unit ++ * ++ * GET_RESPONSE_NETFN(IPMI_XFER *, unsigned char netfn); ++ * -- Get the response packet network function code ++ * ++ * GET_RESPONSE_CMD(IPMI_XFER *, unsigned char cmd); ++ * -- Get the response packet command ++ * ++ * GET_RESPONSE_CC(IPMI_XFER *, unsigned char cc); ++ * -- Get the response packet completion code ++ * ++ * GET_RESPONSE_DATA_LENGTH(IPMI_XFER *, int len); ++ * -- Get the response packet data length ++ * ++ * GET_RESPONSE_DATA(IPMI_XFER *, unsigned char *buffer); ++ * -- Copy the response packet data into local buffer ++ */ ++ ++#ifndef _IPMI_IOCTLS_H ++#define _IPMI_IOCTLS_H ++ ++#define IOCTL_IPMI_XFER 0x01 ++#define IOCTL_DRIVER_INFO 0x02 ++ ++typedef struct ipmi_xfer ++ { ++ unsigned char request[64]; ++ unsigned char response[64]; ++ int request_len; ++ int response_len; ++ } IPMI_XFER; ++ ++struct ipmi_driver_info ++ { ++ char driver_name[64]; /* Name of the driver */ ++ int major_ver; ++ int minor_ver; ++ unsigned short mb_chipset_vendor; /* PCI host bridge vendor tag */ ++ unsigned short mb_chipset_device; /* PCI host bridge vendor device id */ ++ unsigned int flags; /* driver specific flags */ ++ unsigned int reserved; ++ }; ++ ++/* flags definitions for the 'ipmi_kcs' driver */ ++#define KCS_FLAG_BLINKY 0x01 /* Set if blinky works (only on Intel L440GX) */ ++#define KCS_FLAG_LEGACY 0x02 /* Set if using legacy KCS interface ( < IPMI 1.0) */ ++ ++#define INIT_XFER(_xferp) \ ++ memset(_xferp, 0, sizeof(IPMI_XFER)); \ ++ _xferp->request_len = 2; \ ++ _xferp->response_len = sizeof(_xferp->response); ++ ++#define SET_REQUEST_LUN(_xferp, _lun) \ ++ { \ ++ unsigned char _netfn_copy; \ ++ \ ++ _netfn_copy = (_xferp->request[0] & 0xFC); \ ++ _xferp->request[0] = _lun; \ ++ _xferp->request[0]|= _netfn_copy; \ ++ } ++ ++#define SET_REQUEST_NETFN(_xferp, netfn) \ ++ { \ ++ unsigned char __lun_copy; \ ++ \ ++ __lun_copy = (_xferp->request[0] & 0x3); \ ++ _xferp->request[0] = (netfn << 2); \ ++ _xferp->request[0]|= __lun_copy; \ ++ } ++ ++#define SET_REQUEST_CMD(_xferp, _cmd) \ ++ _xferp->request[1] = _cmd; ++ ++#define SET_REQUEST_DATA(_xferp, datap, _len) \ ++ { \ ++ memcpy(&_xferp->request[2], datap, _len); \ ++ _xferp->request_len = (_len + 2); \ ++ } ++ ++#define GET_RESPONSE_LUN(_xferp, _lun) \ ++ _lun = (_xferp->response[0] & 0x3); ++ ++#define GET_RESPONSE_NETFN(_xferp, netfn) \ ++ netfn = ((_xferp->response[0] & 0xFC) >> 2); ++ ++#define GET_RESPONSE_CMD(_xferp, _cmd) \ ++ _cmd = _xferp->response[1]; ++ ++#define GET_RESPONSE_CC(_xferp, cc) \ ++ cc = _xferp->response[2]; ++ ++#define GET_RESPONSE_DATA_LENGTH(_xferp, _len) \ ++ _len = (_xferp->response_len - 3); ++ ++#define GET_RESPONSE_DATA(_xferp, datap) \ ++ memcpy(datap, &_xferp->response[3], (_xferp->response_len -3)); ++ ++/* ++ * The Netfn codes ++ */ ++#define CHASSIS_REQUEST 0x00 ++#define CHASSIS_RESPONSE 0x01 ++#define BRIDGE_REQUEST 0x02 ++#define BRIDGE_RESPONSE 0x03 ++#define SENSOR_REQUEST 0x04 ++#define SENSOR_RESPONSE 0x05 ++#define APP_REQUEST 0x06 ++#define APP_RESPONSE 0x07 ++#define FIRMWARE_REQUEST 0x08 ++#define FIRMWARE_RESPONSE 0x09 ++#define STORAGE_REQUEST 0x0A ++#define STORAGE_RESPONSE 0x0B ++ ++#endif diff --git a/kern/linux-ipmi-2.4.20-v17.diff b/kern/linux-ipmi-2.4.20-v17.diff new file mode 100644 index 0000000..a919310 --- /dev/null +++ b/kern/linux-ipmi-2.4.20-v17.diff @@ -0,0 +1,6647 @@ +diff -urN linux.orig/Documentation/Configure.help linux/Documentation/Configure.help +--- linux.orig/Documentation/Configure.help Fri Dec 6 09:11:24 2002 ++++ linux/Documentation/Configure.help Fri Dec 6 09:12:27 2002 +@@ -26242,6 +26242,31 @@ + + If unsure, say N. + ++IPMI top-level message handler ++CONFIG_IPMI_HANDLER ++ This enables the central IPMI message handler, required for IPMI ++ to work. Note that you must have this enabled to do any other IPMI ++ things. See IPMI.txt for more details. ++ ++Generate a panic event to all BMCs on a panic ++CONFIG_IPMI_PANIC_EVENT ++ When a panic occurs, this will cause the IPMI message handler to ++ generate an IPMI event describing the panic to each interface ++ registered with the message handler. ++ ++Device interface for IPMI ++CONFIG_IPMI_DEVICE_INTERFACE ++ This provides an IOCTL interface to the IPMI message handler so ++ userland processes may use IPMI. It supports poll() and select(). ++ ++IPMI KCS handler ++CONFIG_IPMI_KCS ++ Provides a driver for a KCS-style interface to a BMC. ++ ++IPMI Watchdog Timer ++CONFIG_IPMI_WATCHDOG ++ This enables the IPMI watchdog timer. ++ + # + # A couple of things I keep forgetting: + # capitalize: AppleTalk, Ethernet, DOS, DMA, FAT, FTP, Internet, +diff -urN linux.orig/Documentation/IPMI.txt linux/Documentation/IPMI.txt +--- linux.orig/Documentation/IPMI.txt Wed Dec 31 18:00:00 1969 ++++ linux/Documentation/IPMI.txt Tue Dec 31 13:00:01 2002 +@@ -0,0 +1,352 @@ ++ ++ The Linux IPMI Driver ++ --------------------- ++ Corey Minyard ++ ++ ++ ++This document describes how to use the IPMI driver for Linux. If you ++are not familiar with IPMI itself, see the web site at ++http://www.intel.com/design/servers/ipmi/index.htm. IPMI is a big ++subject and I can't cover it all here! ++ ++Basic Design ++------------ ++ ++The Linux IPMI driver is designed to be very modular and flexible, you ++only need to take the pieces you need and you can use it in many ++different ways. Because of that, it's broken into many chunks of ++code. These chunks are: ++ ++ipmi_msghandler - This is the central piece of software for the IPMI ++system. It handles all messages, message timing, and responses. The ++IPMI users tie into this, and the IPMI physical interfaces (called ++System Management Interfaces, or SMIs) also tie in here. This ++provides the kernelland interface for IPMI, but does not provide an ++interface for use by application processes. ++ ++ipmi_devintf - This provides a userland IOCTL interface for the IPMI ++driver, each open file for this device ties in to the message handler ++as an IPMI user. ++ ++ipmi_kcs_drv - A driver for the KCS SMI. Most system have a KCS ++interface for IPMI. ++ ++ ++Much documentation for the interface is in the include files. The ++IPMI include files are: ++ ++ipmi.h - Contains the user interface and IOCTL interface for IPMI. ++ ++ipmi_smi.h - Contains the interface for SMI drivers to use. ++ ++ipmi_msgdefs.h - General definitions for base IPMI messaging. ++ ++ ++Addressing ++---------- ++ ++The IPMI addressing works much like IP addresses, you have an overlay ++to handle the different address types. The overlay is: ++ ++ struct ipmi_addr ++ { ++ int addr_type; ++ short channel; ++ char data[IPMI_MAX_ADDR_SIZE]; ++ }; ++ ++The addr_type determines what the address really is. The driver ++currently understands two different types of addresses. ++ ++"System Interface" addresses are defined as: ++ ++ struct ipmi_system_interface_addr ++ { ++ int addr_type; ++ short channel; ++ }; ++ ++and the type is IPMI_SYSTEM_INTERFACE_ADDR_TYPE. This is used for talking ++straight to the BMC on the current card. The channel must be ++IPMI_BMC_CHANNEL. ++ ++Messages that are destined to go out on the IPMB bus use the ++IPMI_IPMB_ADDR_TYPE address type. The format is ++ ++ struct ipmi_ipmb_addr ++ { ++ int addr_type; ++ short channel; ++ unsigned char slave_addr; ++ unsigned char lun; ++ }; ++ ++The "channel" here is generally zero, but some devices support more ++than one channel, it corresponds to the channel as defined in the IPMI ++spec. ++ ++ ++Messages ++-------- ++ ++Messages are defined as: ++ ++struct ipmi_msg ++{ ++ unsigned char netfn; ++ unsigned char lun; ++ unsigned char cmd; ++ unsigned char *data; ++ int data_len; ++}; ++ ++The driver takes care of adding/stripping the header information. The ++data portion is just the data to be send (do NOT put addressing info ++here) or the response. Note that the completion code of a response is ++the first item in "data", it is not stripped out because that is how ++all the messages are defined in the spec (and thus makes counting the ++offsets a little easier :-). ++ ++When using the IOCTL interface from userland, you must provide a block ++of data for "data", fill it, and set data_len to the length of the ++block of data, even when receiving messages. Otherwise the driver ++will have no place to put the message. ++ ++Messages coming up from the message handler in kernelland will come in ++as: ++ ++ struct ipmi_recv_msg ++ { ++ struct list_head link; ++ ++ /* The type of message as defined in the "Receive Types" ++ defines above. */ ++ int recv_type; ++ ++ ipmi_user_t *user; ++ struct ipmi_addr addr; ++ long msgid; ++ struct ipmi_msg msg; ++ ++ /* Call this when done with the message. It will presumably free ++ the message and do any other necessary cleanup. */ ++ void (*done)(struct ipmi_recv_msg *msg); ++ ++ /* Place-holder for the data, don't make any assumptions about ++ the size or existence of this, since it may change. */ ++ unsigned char msg_data[IPMI_MAX_MSG_LENGTH]; ++ }; ++ ++You should look at the receive type and handle the message ++appropriately. ++ ++ ++The Upper Layer Interface (Message Handler) ++------------------------------------------- ++ ++The upper layer of the interface provides the users with a consistent ++view of the IPMI interfaces. It allows multiple SMI interfaces to be ++addressed (because some boards actually have multiple BMCs on them) ++and the user should not have to care what type of SMI is below them. ++ ++ ++Creating the User ++ ++To user the message handler, you must first create a user using ++ipmi_create_user. The interface number specifies which SMI you want ++to connect to, and you must supply callback functions to be called ++when data comes in. The callback function can run at interrupt level, ++so be careful using the callbacks. This also allows to you pass in a ++piece of data, the handler_data, that will be passed back to you on ++all calls. ++ ++Once you are done, call ipmi_destroy_user() to get rid of the user. ++ ++From userland, opening the device automatically creates a user, and ++closing the device automatically destroys the user. ++ ++ ++Messaging ++ ++To send a message from kernel-land, the ipmi_request() call does ++pretty much all message handling. Most of the parameter are ++self-explanatory. However, it takes a "msgid" parameter. This is NOT ++the sequence number of messages. It is simply a long value that is ++passed back when the response for the message is returned. You may ++use it for anything you like. ++ ++Responses come back in the function pointed to by the ipmi_recv_hndl ++field of the "handler" that you passed in to ipmi_create_user(). ++Remember again, these may be running at interrupt level. Remember to ++look at the receive type, too. ++ ++From userland, you fill out an ipmi_req_t structure and use the ++IPMICTL_SEND_COMMAND ioctl. For incoming stuff, you can use select() ++or poll() to wait for messages to come in. However, you cannot use ++read() to get them, you must call the IPMICTL_RECEIVE_MSG with the ++ipmi_recv_t structure to actually get the message. Remember that you ++must supply a pointer to a block of data in the msg.data field, and ++you must fill in the msg.data_len field with the size of the data. ++This gives the receiver a place to actually put the message. ++ ++If the message cannot fit into the data you provide, you will get an ++EMSGSIZE error and the driver will leave the data in the receive ++queue. If you want to get it and have it truncate the message, us ++the IPMICTL_RECEIVE_MSG_TRUNC ioctl. ++ ++When you send a command (which is defined by the lowest-order bit of ++the netfn per the IPMI spec) on the IPMB bus, the driver will ++automatically assign the sequence number to the command and save the ++command. If the response is not receive in the IPMI-specified 5 ++seconds, it will generate a response automatically saying the command ++timed out. If an unsolicited response comes in (if it was after 5 ++seconds, for instance), that response will be ignored. ++ ++In kernelland, after you receive a message and are done with it, you ++MUST call ipmi_free_recv_msg() on it, or you will leak messages. Note ++that you should NEVER mess with the "done" field of a message, that is ++required to properly clean up the message. ++ ++Note that when sending, there is an ipmi_request_supply_msgs() call ++that lets you supply the smi and receive message. This is useful for ++pieces of code that need to work even if the system is out of buffers ++(the watchdog timer uses this, for instance). You supply your own ++buffer and own free routines. This is not recommended for normal use, ++though, since it is tricky to manage your own buffers. ++ ++ ++Events and Incoming Commands ++ ++The driver takes care of polling for IPMI events and receiving ++commands (commands are messages that are not responses, they are ++commands that other things on the IPMB bus have sent you). To receive ++these, you must register for them, they will not automatically be sent ++to you. ++ ++To receive events, you must call ipmi_set_gets_events() and set the ++"val" to non-zero. Any events that have been received by the driver ++since startup will immediately be delivered to the first user that ++registers for events. After that, if multiple users are registered ++for events, they will all receive all events that come in. ++ ++For receiving commands, you have to individually register commands you ++want to receive. Call ipmi_register_for_cmd() and supply the netfn ++and command name for each command you want to receive. Only one user ++may be registered for each netfn/cmd, but different users may register ++for different commands. ++ ++From userland, equivalent IOCTLs are provided to do these functions. ++ ++ ++The Lower Layer (SMI) Interface ++------------------------------- ++ ++As mentioned before, multiple SMI interfaces may be registered to the ++message handler, each of these is assigned an interface number when ++they register with the message handler. They are generally assigned ++in the order they register, although if an SMI unregisters and then ++another one registers, all bets are off. ++ ++The ipmi_smi.h defines the interface for SMIs, see that for more ++details. ++ ++ ++The KCS Driver ++-------------- ++ ++The KCS driver allows up to 4 KCS interfaces to be configured in the ++system. By default, the driver will register one KCS interface at the ++spec-specified I/O port 0xca2 without interrupts. You can change this ++at module load time (for a module) with: ++ ++ insmod ipmi_kcs_drv.o kcs_ports=,... kcs_addrs=, ++ kcs_irqs=,... kcs_trydefaults=[0|1] ++ ++The KCS driver supports two types of interfaces, ports (for I/O port ++based KCS interfaces) and memory addresses (for KCS interfaces in ++memory). The driver will support both of them simultaneously, setting ++the port to zero (or just not specifying it) will allow the memory ++address to be used. The port will override the memory address if it ++is specified and non-zero. kcs_trydefaults sets whether the standard ++IPMI interface at 0xca2 and any interfaces specified by ACPE are ++tried. By default, the driver tries it, set this value to zero to ++turn this off. ++ ++When compiled into the kernel, the addresses can be specified on the ++kernel command line as: ++ ++ ipmi_kcs=:,:....,[nodefault] ++ ++The values is either "p" or "m" for port or memory ++addresses. So for instance, a KCS interface at port 0xca2 using ++interrupt 9 and a memory interface at address 0xf9827341 with no ++interrupt would be specified "ipmi_kcs=p0xca2:9,m0xf9827341". ++If you specify zero for in irq or don't specify it, the driver will ++run polled unless the software can detect the interrupt to use in the ++ACPI tables. ++ ++By default, the driver will attempt to detect a KCS device at the ++spec-specified 0xca2 address and any address specified by ACPI. If ++you want to turn this off, use the "nodefault" option. ++ ++If you have high-res timers compiled into the kernel, the driver will ++use them to provide much better performance. Note that if you do not ++have high-res timers enabled in the kernel and you don't have ++interrupts enabled, the driver will run VERY slowly. Don't blame me, ++the KCS interface sucks. ++ ++ ++Other Pieces ++------------ ++ ++Watchdog ++ ++A watchdog timer is provided that implements the Linux-standard ++watchdog timer interface. It has three module parameters that can be ++used to control it: ++ ++ insmod ipmi_watchdog timeout= pretimeout= action= ++ preaction= preop= ++ ++The timeout is the number of seconds to the action, and the pretimeout ++is the amount of seconds before the reset that the pre-timeout panic will ++occur (if pretimeout is zero, then pretimeout will not be enabled). ++ ++The action may be "reset", "power_cycle", or "power_off", and ++specifies what to do when the timer times out, and defaults to ++"reset". ++ ++The preaction may be "pre_smi" for an indication through the SMI ++interface, "pre_int" for an indication through the SMI with an ++interrupts, and "pre_nmi" for a NMI on a preaction. This is how ++the driver is informed of the pretimeout. ++ ++The preop may be set to "preop_none" for no operation on a pretimeout, ++"preop_panic" to set the preoperation to panic, or "preop_give_data" ++to provide data to read from the watchdog device when the pretimeout ++occurs. A "pre_nmi" setting CANNOT be used with "preop_give_data" ++because you can't do data operations from an NMI. ++ ++When preop is set to "preop_give_data", one byte comes ready to read ++on the device when the pretimeout occurs. Select and fasync work on ++the device, as well. ++ ++When compiled into the kernel, the kernel command line is available ++for configuring the watchdog: ++ ++ ipmi_wdog=[,[,