mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
134 lines
3.0 KiB
Plaintext
134 lines
3.0 KiB
Plaintext
dnl
|
|
dnl autoconf for ipmitool
|
|
dnl
|
|
AC_INIT([src/ipmitool.c])
|
|
AM_INIT_AUTOMAKE([ipmitool], [1.5.6])
|
|
AM_CONFIG_HEADER([config.h])
|
|
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
|
AC_PREREQ(2.50)
|
|
|
|
IPMITOOL_PKG=ipmitool
|
|
AC_SUBST(IPMITOOL_PKG)
|
|
AC_SUBST(ac_configure_args)
|
|
|
|
dnl check for programs
|
|
AC_PROG_CC
|
|
AC_PROG_CPP
|
|
AC_PROG_INSTALL
|
|
AC_PROG_LN_S
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_CHECK_PROG(SED, sed, sed)
|
|
|
|
dnl setup libtool and ltdl
|
|
AC_LIB_LTDL
|
|
AC_LIBTOOL_DLOPEN
|
|
AC_LIBLTDL_CONVENIENCE
|
|
AM_PROG_LIBTOOL
|
|
LIBTOOL="$LIBTOOL --silent"
|
|
AC_SUBST(LTDLINCL)
|
|
AC_SUBST(LIBLTDL)
|
|
AC_CONFIG_SUBDIRS(libltdl)
|
|
|
|
AC_CHECK_LIB([m], [pow], [], [
|
|
echo "** libm library pow() not found!"
|
|
exit 1
|
|
])
|
|
|
|
AC_SEARCH_LIBS(gethostbyname, nsl)
|
|
AC_SEARCH_LIBS(socket, socket, ,
|
|
[AC_CHECK_LIB(nsl, socket, LIBS="$LIBS -lsocket -lnsl", , -lsocket)])
|
|
|
|
AC_CHECK_LIB([ltdl], [lt_dlopen], [], [
|
|
echo "** libltdl library lt_dlopen() not found!"
|
|
exit 1
|
|
])
|
|
|
|
dnl check for headers
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h])
|
|
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h])
|
|
|
|
have_openipmi=no
|
|
AC_CHECK_HEADER([linux/ipmi.h],
|
|
[have_openipmi=yes],
|
|
[AC_MSG_WARN([Unable to find OpenIPMI header files])])
|
|
|
|
dnl check for typedefs, structs, and compiler options
|
|
AC_C_CONST
|
|
AC_C_INLINE
|
|
|
|
dnl check for lib functions
|
|
AC_PROG_GCC_TRADITIONAL
|
|
AC_FUNC_MALLOC
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
AC_FUNC_STAT
|
|
AC_FUNC_STRTOD
|
|
AC_CHECK_FUNCS([alarm gethostbyname socket select])
|
|
AC_CHECK_FUNCS([memmove memset strchr strdup strerror])
|
|
|
|
dnl check for byteswap functionality
|
|
AC_CHECK_HEADERS([asm/byteorder.h byteswap.h])
|
|
AC_CHECK_FUNCS([bswap_16 bswap_32])
|
|
AC_C_BIGENDIAN
|
|
|
|
if test "x$prefix" = "xNONE"; then
|
|
prefix="$ac_default_prefix"
|
|
fi
|
|
|
|
if test "x$exec_prefix" = "xNONE"; then
|
|
exec_prefix="$prefix"
|
|
fi
|
|
|
|
dnl enable plugins for interfaces
|
|
AC_ARG_WITH([plugin-path],
|
|
[[ --with-plugin-path=DIR Set plugin path to DIR]],
|
|
[pluginpath="$withval"],
|
|
[pluginpath="${exec_prefix}/lib/ipmitool"])
|
|
|
|
AC_DEFINE_UNQUOTED(PLUGIN_PATH, "$pluginpath", "IPMI interface plugin path")
|
|
AC_SUBST(pluginpath)
|
|
|
|
AC_ARG_ENABLE([intf-lan],
|
|
[[ --enable-intf-lan enable IPMI-over-LAN interface [default=yes]]],
|
|
[if test "x$enableval" = "xyes"; then
|
|
PLUGINS="$PLUGINS lan"
|
|
fi],
|
|
[PLUGINS="$PLUGINS lan"])
|
|
|
|
AC_ARG_ENABLE([intf-open],
|
|
[[ --enable-intf-open enable OpenIPMI device interface [default=no]]],
|
|
[if test "x$enableval" = "xyes"; then
|
|
if test "x$have_openipmi" = "xyes"; then
|
|
PLUGINS="$PLUGINS open"
|
|
else
|
|
echo "** Unable to build OpenIPMI interface support!"
|
|
exit 1
|
|
fi
|
|
fi])
|
|
|
|
AC_SUBST(PLUGINS)
|
|
|
|
AC_ARG_ENABLE([ipmievd],
|
|
[[ --enable-ipmievd enable IPMI event daemon [default=no]]],,)
|
|
|
|
AM_CONDITIONAL(IPMIEVD, test "x$enable_ipmievd" = "xyes")
|
|
|
|
AC_CONFIG_FILES([ipmitool.spec
|
|
Makefile
|
|
doc/Makefile
|
|
lib/Makefile
|
|
include/Makefile
|
|
include/ipmitool/Makefile
|
|
src/Makefile
|
|
src/plugins/Makefile
|
|
src/plugins/lan/Makefile
|
|
src/plugins/open/Makefile])
|
|
|
|
AC_OUTPUT
|
|
|
|
echo
|
|
echo Building $PACKAGE version $VERSION with interface plugins: $PLUGINS
|
|
echo Plugin Path: $pluginpath
|
|
echo
|