summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac42
1 files changed, 39 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 4c07d47..a1bcf38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ dnl autoconf for ipmitool
dnl
AC_INIT([src/ipmitool.c])
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE([ipmitool], [1.8.15])
+AM_INIT_AUTOMAKE([ipmitool], [1.8.16])
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR([src/ipmitool.c])
AC_PREREQ(2.50)
@@ -26,14 +26,13 @@ AC_C_CONST
AC_C_INLINE
AC_C_BIGENDIAN
-AC_FUNC_MALLOC
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STRTOD
AC_CHECK_FUNCS([alarm gethostbyname getaddrinfo getifaddrs socket select])
AC_CHECK_FUNCS([memmove memset strchr strdup strerror])
AC_CHECK_FUNCS([getpassphrase])
-CFLAGS="$CFLAGS -fno-strict-aliasing -Wreturn-type"
+CFLAGS="$CFLAGS -Wall -Wextra -std=c99 -pedantic -Wformat -Wformat-nonliteral"
AM_PROG_LIBTOOL
LIBTOOL="$LIBTOOL --silent"
@@ -60,6 +59,7 @@ dnl
xenable_intf_bmc=no
xenable_intf_imb=yes
xenable_intf_open=yes
+xenable_intf_usb=yes
xenable_intf_lipmi=yes
#xenable_intf_serial=yes
xenable_intf_dummy=no
@@ -131,6 +131,24 @@ if test "x$xenable_all_options" = "xyes" || test "x$xenable_solaris_opt" = "xyes
AC_DEFINE(ENABLE_ALL_OPTIONS, [1], [Define to 1 to enable all command line options.])
fi
+dnl Determine anonymous union/structure support in GCC
+AC_TRY_COMPILE([
+#include <stdio.h>
+ ], [
+ struct test {
+ union {
+ int a;
+ unsigned int b;
+ };
+ } test;
+
+ printf("a is %d", test.a);
+ ], ac_need_fms_extension=no, ac_need_fms_extension=yes)
+if test "x$ac_need_fms_extension" = "xyes"; then
+ CFLAGS="$CFLAGS -fms-extensions"
+ AC_SUBST(CFLAGS)
+fi
+
dnl check for OpenSSL functionality
AC_ARG_ENABLE([internal-md5],
[AC_HELP_STRING([--enable-internal-md5],
@@ -180,6 +198,22 @@ if test "x$xenable_intf_lan" = "xyes"; then
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lan/libintf_lan.la"
fi
+dnl enable IPMI USB interface
+AC_ARG_ENABLE([intf-usb],
+ [AC_HELP_STRING([--enable-intf-usb],
+ [enable IPMI USB interface [default=yes]])],
+ [xenable_intf_usb=$enableval],
+ [xenable_intf_usb=yes])
+if test "x$xenable_intf_usb" = "xstatic" || test "x$xenable_intf_usb" = "xplugin"; then
+ xenable_intf_usb=yes
+fi
+if test "x$xenable_intf_usb" = "xyes"; then
+ AC_DEFINE(IPMI_INTF_USB, [1], [Define to 1 to enable USB interface.])
+ AC_SUBST(INTF_USB, [usb])
+ AC_SUBST(INTF_USB_LIB, [libintf_usb.la])
+ IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB usb/libintf_usb.la"
+fi
+
dnl enable IPMIv2.0 RMCP+ LAN interface
AC_ARG_ENABLE([intf-lanplus],
[AC_HELP_STRING([--enable-intf-lanplus],
@@ -621,6 +655,7 @@ AC_CONFIG_FILES([Makefile
src/plugins/free/Makefile
src/plugins/imb/Makefile
src/plugins/bmc/Makefile
+ src/plugins/usb/Makefile
src/plugins/lipmi/Makefile
src/plugins/serial/Makefile
src/plugins/dummy/Makefile])
@@ -637,6 +672,7 @@ AC_MSG_RESULT([ open : $xenable_intf_open])
AC_MSG_RESULT([ free : $xenable_intf_free])
AC_MSG_RESULT([ imb : $xenable_intf_imb])
AC_MSG_RESULT([ bmc : $xenable_intf_bmc])
+AC_MSG_RESULT([ usb : $xenable_intf_usb])
AC_MSG_RESULT([ lipmi : $xenable_intf_lipmi])
AC_MSG_RESULT([ serial : $xenable_intf_serial])
AC_MSG_RESULT([ dummy : $xenable_intf_dummy])