From 522b94de8815dac051c421754dabdc441270c257 Mon Sep 17 00:00:00 2001 From: Yuichi SEINO Date: Mon, 25 Mar 2013 17:06:28 +0900 Subject: [PATCH] build: pass enable options to "make rpm" from configure Signed-off-by: Yuichi SEINO Reviewed-by: Fabio M. Di Nitto --- Makefile.am | 4 ++-- configure.ac | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index acb57742..4bebe897 100644 --- a/Makefile.am +++ b/Makefile.am @@ -156,11 +156,11 @@ RPMBUILDOPTS = --define "_sourcedir $(abs_builddir)" \ srpm: clean $(MAKE) $(SPEC) $(TARFILE) - rpmbuild $(RPMBUILDOPTS) --nodeps -bs $(SPEC) + rpmbuild $(WITH_LIST) $(RPMBUILDOPTS) --nodeps -bs $(SPEC) rpm: clean _version $(MAKE) $(SPEC) $(TARFILE) - rpmbuild $(RPMBUILDOPTS) -ba $(SPEC) + rpmbuild $(WITH_LIST) $(RPMBUILDOPTS) -ba $(SPEC) # release/versioning BUILT_SOURCES = .version diff --git a/configure.ac b/configure.ac index 1967a734..52ad39b7 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,7 @@ AC_CANONICAL_HOST AC_LANG([C]) +AC_SUBST(WITH_LIST, [""]) #Enable inter-library dependencies AC_ARG_ENABLE(interlib-deps, @@ -398,11 +399,13 @@ if test "x${enable_dbus}" = xyes; then PKG_CHECK_MODULES([DBUS],[dbus-1]) AC_DEFINE_UNQUOTED([HAVE_DBUS], 1, [have dbus]) PACKAGE_FEATURES="$PACKAGE_FEATURES dbus" + WITH_LIST="$WITH_LIST --with dbus" fi if test "x${enable_testagents}" = xyes; then AC_DEFINE_UNQUOTED([HAVE_TESTAGENTS], 1, [have testagents]) PACKAGE_FEATURES="$PACKAGE_FEATURES testagents" + WITH_LIST="$WITH_LIST --with testagents" fi if test "x${enable_rdma}" = xyes; then @@ -410,12 +413,14 @@ if test "x${enable_rdma}" = xyes; then PKG_CHECK_MODULES([ibverbs],[ibverbs]) AC_DEFINE_UNQUOTED([HAVE_RDMA], 1, [have rdmacm]) PACKAGE_FEATURES="$PACKAGE_FEATURES rdma" + WITH_LIST="$WITH_LIST --with rdma" fi if test "x${enable_monitoring}" = xyes; then PKG_CHECK_MODULES([statgrab], [libstatgrab]) AC_DEFINE_UNQUOTED([HAVE_MONITORING], 1, [have resource monitoring]) PACKAGE_FEATURES="$PACKAGE_FEATURES monitoring" + WITH_LIST="$WITH_LIST --with monitoring" fi if test "x${enable_watchdog}" = xyes; then @@ -423,6 +428,7 @@ if test "x${enable_watchdog}" = xyes; then AC_CHECK_HEADER([linux/reboot.h], [], [AC_MSG_ERROR([watchdog requires linux/reboot.h])]) AC_DEFINE_UNQUOTED([HAVE_WATCHDOG], 1, [have watchdog]) PACKAGE_FEATURES="$PACKAGE_FEATURES watchdog" + WITH_LIST="$WITH_LIST --with watchdog" fi if test "x${enable_augeas}" = xyes; then @@ -430,9 +436,11 @@ if test "x${enable_augeas}" = xyes; then fi if test "x${enable_systemd}" = xyes; then PACKAGE_FEATURES="$PACKAGE_FEATURES systemd" + WITH_LIST="$WITH_LIST --with systemd" fi if test "x${enable_xmlconf}" = xyes; then PACKAGE_FEATURES="$PACKAGE_FEATURES xmlconf" + WITH_LIST="$WITH_LIST --with xmlconf" fi if test "x${enable_qdevices}" = xyes; then PACKAGE_FEATURES="$PACKAGE_FEATURES qdevices" @@ -477,6 +485,7 @@ if test "x${enable_snmp}" = xyes; then do_snmp=1 PACKAGE_FEATURES="$PACKAGE_FEATURES snmp" + WITH_LIST="$WITH_LIST --with snmp" AC_DEFINE_UNQUOTED([ENABLE_SNMP], $do_snmp, [Build in support for sending SNMP traps]) else AC_MSG_ERROR([You need the net_snmp development package to continue.])