configure: change HAVE_FIREWALLD to WITH_FIREWALLD

Support for firewalld is a feature that can be selectively enabled or
disabled (using --with-firewalld/--without-firewalld), not merely
something that must be accounted for in the code if it is present with
no exceptions. It is more consistent with other usage in libvirt to
use WITH_FIREWALLD rather than HAVE_FIREWALLD.

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Laine Stump 2019-01-25 23:46:18 -05:00
parent 170f83506e
commit 4bf0f390ed
3 changed files with 8 additions and 8 deletions

View File

@ -32,10 +32,10 @@ AC_DEFUN([LIBVIRT_CHECK_FIREWALLD], [
if test "x$with_dbus" != "xyes" ; then
AC_MSG_ERROR([You must have dbus enabled for firewalld support])
fi
AC_DEFINE_UNQUOTED([HAVE_FIREWALLD], [1], [whether firewalld support is enabled])
AC_DEFINE_UNQUOTED([WITH_FIREWALLD], [1], [whether firewalld support is enabled])
fi
AM_CONDITIONAL([HAVE_FIREWALLD], [test "x$with_firewalld" != "xno"])
AM_CONDITIONAL([WITH_FIREWALLD], [test "x$with_firewalld" != "xno"])
])
AC_DEFUN([LIBVIRT_RESULT_FIREWALLD], [

View File

@ -536,7 +536,7 @@ networkAutostartConfig(virNetworkObjPtr obj,
}
#if HAVE_FIREWALLD
#ifdef WITH_FIREWALLD
static DBusHandlerResult
firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED,
DBusMessage *message,
@ -571,7 +571,7 @@ networkStateInitialize(bool privileged,
int ret = -1;
char *configdir = NULL;
char *rundir = NULL;
#ifdef HAVE_FIREWALLD
#ifdef WITH_FIREWALLD
DBusConnection *sysbus = NULL;
#endif
@ -662,7 +662,7 @@ networkStateInitialize(bool privileged,
network_driver->networkEventState = virObjectEventStateNew();
#ifdef HAVE_FIREWALLD
#ifdef WITH_FIREWALLD
if (!(sysbus = virDBusGetSystemBus())) {
VIR_WARN("DBus not available, disabling firewalld support "
"in bridge_network_driver: %s", virGetLastErrorMessage());

View File

@ -76,7 +76,7 @@ static void nwfilterDriverUnlock(void)
virMutexUnlock(&driver->lock);
}
#if HAVE_FIREWALLD
#ifdef WITH_FIREWALLD
static DBusHandlerResult
nwfilterFirewalldDBusFilter(DBusConnection *connection ATTRIBUTE_UNUSED,
@ -145,7 +145,7 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus)
return ret;
}
#else /* HAVE_FIREWALLD */
#else /* WITH_FIREWALLD */
static void
nwfilterDriverRemoveDBusMatches(void)
@ -158,7 +158,7 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus ATTRIBUTE_UNUSED)
return 0;
}
#endif /* HAVE_FIREWALLD */
#endif /* WITH_FIREWALLD */
static int
virNWFilterTriggerRebuildImpl(void *opaque)