Sfoglia il codice sorgente

configure: Do not autodetect nozzle

Nozzle is part of kronosnet but it is independent library. Enabling it
when detected without ability to turn it off is not in line with
other libraries.

Solution is to use same method as for other libraries - add
--enable-nozzle to configure script and add support for this option into
spec file.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 7 anni fa
parent
commit
83dc407f55
2 ha cambiato i file con 21 aggiunte e 7 eliminazioni
  1. 14 7
      configure.ac
  2. 7 0
      corosync.spec.in

+ 14 - 7
configure.ac

@@ -174,7 +174,6 @@ LIBS="$SAVE_LIBS"
 AC_CHECK_LIB([pthread], [pthread_create])
 AC_CHECK_LIB([socket], [socket])
 PKG_CHECK_MODULES([knet],[libknet])
-PKG_CHECK_MODULES([nozzle],[libnozzle], [AC_DEFINE_UNQUOTED([HAVE_LIBNOZZLE], 1, [Have libnozzle])], [have_nozzle="no"])
 AC_CHECK_LIB([nsl], [t_open])
 AC_CHECK_LIB([rt], [sched_getscheduler])
 AC_CHECK_LIB([z], [crc32],
@@ -395,21 +394,20 @@ AC_ARG_ENABLE([xmlconf],
 AM_CONDITIONAL(INSTALL_XMLCONF, test x$enable_xmlconf = xyes)
 
 AC_ARG_ENABLE([vqsim],
-	[  --enable-vqsim               : Quorum simulator support ],,
+	[  --enable-vqsim                  : Quorum simulator support ],,
 	[ enable_vqsim="no" ])
 AM_CONDITIONAL(BUILD_VQSIM, test x$enable_vqsim = xyes)
 
+AC_ARG_ENABLE([nozzle],
+	[  --enable-nozzle                 : Support for nozzle ],,
+	[ enable_nozzle="no" ])
+
 # *FLAGS handling goes here
 
 ENV_CFLAGS="$CFLAGS"
 ENV_CPPFLAGS="$CPPFLAGS"
 ENV_LDFLAGS="$LDFLAGS"
 
-# Add nozzle to Package features if enabled
-if test "x$have_nozzle" != xno; then
-	PACKAGE_FEATURES="$PACKAGE_FEATURES nozzle"
-fi
-
 # debug build stuff
 if test "x${enable_debug}" = xyes; then
 	AC_DEFINE_UNQUOTED([DEBUG], [1], [Compiling Debugging code])
@@ -426,6 +424,7 @@ else
 	GDB_FLAGS="-g"
 fi
 
+
 # Look for dbus-1
 if test "x${enable_dbus}" = xyes; then
 	PKG_CHECK_MODULES([DBUS],[dbus-1])
@@ -474,6 +473,14 @@ if test "x${enable_vqsim}" = xyes; then
 fi
 AM_CONDITIONAL(VQSIM_READLINE, [test "x${ac_cv_header_readline_readline_h}" = xyes])
 
+# Look for nozzle
+if test "x${enable_nozzle}" = xyes; then
+	PKG_CHECK_MODULES([nozzle],[libnozzle])
+	AC_DEFINE_UNQUOTED([HAVE_LIBNOZZLE], 1, [have nozzle])
+	PACKAGE_FEATURES="$PACKAGE_FEATURES nozzle"
+	WITH_LIST="$WITH_LIST --with nozzle"
+fi
+
 do_snmp=0
 if test "x${enable_snmp}" = xyes; then
 	AC_PATH_PROGS([SNMPCONFIG], [net-snmp-config])

+ 7 - 0
corosync.spec.in

@@ -11,6 +11,7 @@
 %bcond_with dbus
 %bcond_with systemd
 %bcond_with xmlconf
+%bcond_with nozzle
 %bcond_with runautogen
 
 %global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
@@ -55,6 +56,9 @@ BuildRequires: dbus-1-devel
 BuildRequires: dbus-devel
 %endif
 %endif
+%if %{with nozzle}
+BuildRequires: libnozzle1-devel
+%endif
 %if %{with systemd}
 %{?systemd_requires}
 BuildRequires: systemd
@@ -93,6 +97,9 @@ Requires: libxslt
 %endif
 %if %{with xmlconf}
 	--enable-xmlconf \
+%endif
+%if %{with nozzle}
+	--enable-nozzle \
 %endif
 	--with-initddir=%{_initrddir} \
 	--with-systemddir=%{_unitdir} \