From c634d2a08093b3995009a47fa5e1760bbb2009b6 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Fri, 26 Mar 2004 21:52:10 +0000 Subject: [PATCH] add --enable-ipmiadm configure option to build binary as "ipmiadm" instead of "ipmitool" to allow Solaris convention of command-line tools having -adm suffix and GUI tools having -tool suffix. --- ipmitool/configure.in | 20 ++++++++++++++++++++ ipmitool/src/Makefile.am | 30 ++++++++++++++++++------------ 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/ipmitool/configure.in b/ipmitool/configure.in index 6cbc806..4e85f62 100644 --- a/ipmitool/configure.in +++ b/ipmitool/configure.in @@ -148,9 +148,28 @@ AC_SUBST(STATIC_INTF) AC_SUBST(STATIC_INTF_EXT) AC_SUBST(STATIC_INTF_LIB) +dnl Enable ipmi event daemon binary that requires OpenIPMI AC_ARG_ENABLE([ipmievd], [[ --enable-ipmievd enable IPMI event daemon [default=no]]],,enable_ipmievd=no) AM_CONDITIONAL(IPMIEVD, test "x$enable_ipmievd" = "xyes") +if test "x$enable_ipmievd" = "xyes"; then + IPMIEVD_SRC="ipmievd.c" + IPMIEVD_BIN="ipmievd" +fi +AC_SUBST(IPMIEVD_SRC) +AC_SUBST(IPMIEVD_BIN) + +dnl Solaris convention is command-line tools have *adm and GUIs have *tool suffix +IPMITOOL_BIN="ipmitool" +AC_ARG_ENABLE([ipmiadm], + [[ --enable-ipmiadm enable rename of ipmitool to ipmiadm [default=no]]],,enable_ipmiadm=no) +AM_CONDITIONAL(IPMIADM, test "x$enable_ipmiadm" = "xyes") +if test "x$enable_ipmiadm" = "xyes"; then + IPMITOOL_BIN="ipmiadm" +fi +AC_DEFINE_UNQUOTED(IPMITOOL_BIN, "$IPMITOOL_BIN", "IPMItool binary name") +AC_SUBST(IPMITOOL_BIN) + AC_CONFIG_FILES([ipmitool.spec Makefile @@ -170,6 +189,7 @@ AC_OUTPUT AC_MSG_RESULT([]) AC_MSG_RESULT([$PACKAGE $VERSION]) AC_MSG_RESULT([]) +AC_MSG_RESULT([ IPMItool Binary....... : $IPMITOOL_BIN]) AC_MSG_RESULT([ Interface Path........ : $pluginpath]) AC_MSG_RESULT([ Static Interfaces..... : $STATIC_INTF_LIST]) AC_MSG_RESULT([ Dynamic Interfaces.... : $DYNAMIC_INTF_LIST]) diff --git a/ipmitool/src/Makefile.am b/ipmitool/src/Makefile.am index aeee5df..f90913b 100644 --- a/ipmitool/src/Makefile.am +++ b/ipmitool/src/Makefile.am @@ -37,18 +37,24 @@ SUBDIRS = plugins MAINTAINERCLEANFILES = Makefile.in -if IPMIEVD -EXTRA_DIST = bmcautoconf.sh -bin_PROGRAMS = ipmievd ipmitool -ipmievd_SOURCES = ipmievd.c -ipmievd_LDADD = $(top_srcdir)/lib/libipmitool.la $(top_srcdir)/src/plugins/libintf.la -else -EXTRA_DIST = bmcautoconf.sh ipmievd.c -bin_PROGRAMS = ipmitool -endif - -ipmitool_SOURCES = ipmitool.c -ipmitool_LDADD = $(top_srcdir)/lib/libipmitool.la $(top_srcdir)/src/plugins/libintf.la +LIBIPMITOOL = $(top_srcdir)/lib/libipmitool.la +LIBIPMIINTF = $(top_srcdir)/src/plugins/libintf.la bin_SCRIPTS = bmcautoconf.sh +EXTRA_DIST = bmcautoconf.sh @IPMIEVD_SRC@ +if IPMIADM +ipmiadm_SOURCES = ipmitool.c +ipmiadm_LDADD = $(LIBIPMITOOL) $(LIBIPMIINTF) +else +ipmitool_SOURCES = ipmitool.c +ipmitool_LDADD = $(LIBIPMITOOL) $(LIBIPMIINTF) +endif + +if IPMIEVD +ipmievd_SOURCES = ipmievd.c +ipmievd_LDADD = $(LIBIPMITOOL) $(LIBIPMIINTF) +endif + +bin_PROGRAMS = @IPMITOOL_BIN@ @IPMIEVD_BIN@ +EXTRA_PROGRAMS = ipmitool ipmiadm ipmievd