From 71a6dde3f8cb2e3179bc9b74dfff2676021d8901 Mon Sep 17 00:00:00 2001 From: Dmitry Frolov Date: Wed, 29 Aug 2007 14:50:13 +0000 Subject: [PATCH] - Removed --disable-intf-open-dual-bridge configure option added recently; - Added configure auto-detection if dual bridge support is present in OpenIPMI header. --- ipmitool/ChangeLog | 4 ++-- ipmitool/configure.in | 36 +++++++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/ipmitool/ChangeLog b/ipmitool/ChangeLog index 60b1b60..92bb87a 100644 --- a/ipmitool/ChangeLog +++ b/ipmitool/ChangeLog @@ -4,10 +4,10 @@ version 1.8.10 "isol setup" command. * Fix bug in ipmi_lan_recv_packet() in lan and lanplus interfaces. * Fix bug in "chassis poh" command. - * Added configure option to disable dual bridge support in open - interface to help compiling on FreeBSD * Fix HPM.1 upgrade to apply to only given component when instructed to do so + * Added configure auto-detection if dual bridge extension + is supported by OpenIPMI version 1.8.9 released 2007-03-06 * Added initial AMC ekey query operation support diff --git a/ipmitool/configure.in b/ipmitool/configure.in index d8e1981..8e6e10a 100644 --- a/ipmitool/configure.in +++ b/ipmitool/configure.in @@ -324,6 +324,33 @@ if test "x$enable_intf_open" = "xyes"; then AC_SUBST(INTF_OPEN, [open]) AC_SUBST(INTF_OPEN_LIB, [libintf_open.la]) IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB open/libintf_open.la" + + dnl Check for dual bridge support in OpenIPMI + AC_MSG_CHECKING([for OpenIPMI dual bridge support]) + have_openipmi_dual_bridge=no + ORIG_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -Isrc/plugins/open -DENABLE_INTF_OPEN_DUAL_BRIDGE" + AC_TRY_COMPILE([ + #if defined(HAVE_OPENIPMI_H) + # if defined(HAVE_LINUX_COMPILER_H) + # include + # endif + # include + #elif defined(HAVE_FREEBSD_IPMI_H) + # include + #else + # include "open.h" + #endif + ], [ + struct ipmi_ipmb_addr a; + a.transit_slave_addr = 0; + ], [have_openipmi_dual_bridge=yes]) + if test x"$have_openipmi_dual_bridge" = x"yes"; then + AC_DEFINE(ENABLE_INTF_OPEN_DUAL_BRIDGE, [1], + [Define to 1 to enable OpenIPMI interface dual bridge support]) + fi + CPPFLAGS="$ORIG_CPPFLAGS" + AC_MSG_RESULT([$have_openipmi_dual_bridge]) fi dnl enable Intel IMB interface @@ -410,15 +437,6 @@ AC_ARG_ENABLE([file-security], AC_DEFINE(ENABLE_FILE_SECURITY, [1], [Define to 1 for extra file security.]) fi], []) -dnl Enable OpenIPMI dual bridge extension -AC_ARG_ENABLE([intf-open-dual-bridge], - [AC_HELP_STRING([--enable-intf-open-dual-bridge], - [enable OpenIPMI interface dual bridge support [default=yes]])]) -if test "x$enable_intf_open_dual_bridge" != "xno"; then - AC_DEFINE(ENABLE_INTF_OPEN_DUAL_BRIDGE, [1], - [Define to 1 to enable OpenIPMI interface dual bridge support]) -fi - dnl Generate files for build AC_CONFIG_FILES([Makefile doc/Makefile