On Sat, 2008-01-05 at 00:16 +0000, Daniel P. Berrange wrote: > Could we make the configure script a little more clever so that it is > a tri-state and can auto-detect whether lokkit is available. > > - enable_iptables_lokkit=no - force disable > - enable_iptables_lokkit=yes - check if it is supported, and error if not > - enable_iptables_lokkit=check - check if it is supported and enable or disable as needed > > With 'check' being the default. This makes it 'do the right' thing by > default, and lets the user have a strict override if neccessary. Okay, but that makes system-config-firewall a BuildRequires. (I'll fold the attached patch into this 7/9 patch) Cheers, Mark.
Index: libvirt/configure.in =================================================================== --- libvirt.orig/configure.in 2008-01-07 09:56:14.000000000 +0000 +++ libvirt.orig/configure.in 2008-01-07 09:56:14.000000000 +0000 @@ -209,12 +209,19 @@ dnl ensure that Fedora's system-config-f dnl about libvirt's iptables rules dnl AC_ARG_ENABLE(iptables-lokkit, - AC_HELP_STRING([--enable-iptables-lokkit=no/yes], + AC_HELP_STRING([--enable-iptables-lokkit=no/yes/check], [enable registering libvirt's iptables rules with Fedora's lokkit]), - [],[enable_iptables_lokkit=no]) -if test x"$enable_iptables_lokkit" = x"yes"; then + [],[enable_iptables_lokkit=check]) +if test x"$enable_iptables_lokkit" != x"no"; then + AC_PATH_PROG(LOKKIT_PATH, lokkit, [], [/usr/sbin:$PATH]) +fi + +if test x"$enable_iptables_lokkit" = x"yes" -a x"$LOKKIT_PATH" = x; then + AC_MSG_ERROR([Cannot find lokkit and --enable-iptables-lokkit specified]) +fi + +if test x"$LOKKIT_PATH" != x; then AC_DEFINE(ENABLE_IPTABLES_LOKKIT, [], [whether support for Fedora's lokkit is enabled]) - AC_PATH_PROG(LOKKIT_PATH, lokkit, /usr/sbin/lokkit) AC_DEFINE_UNQUOTED(LOKKIT_PATH, "$LOKKIT_PATH", [path to lokkit binary]) fi
-- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list