summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-09-23 10:10:27 +0200
committerMichael Biebl <biebl@debian.org>2018-09-23 10:10:27 +0200
commite126f3e804c35480c4f075777430419d6ece23da (patch)
tree5d5821ebcda8cd6ac34d2483bb3354910e508930 /configure.ac
parentc240974325c552cad177c457d6ff04e381fd77a3 (diff)
New upstream version 1.12.4 upstream/1.12.4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac139
1 files changed, 84 insertions, 55 deletions
diff --git a/configure.ac b/configure.ac
index ff5d5f71..c2885d88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,8 +7,8 @@ dnl  - add corresponding NM_VERSION_x_y_z macros in
 dnl    "shared/nm-version-macros.h.in"
 dnl  - update number in meson.build
 m4_define([nm_major_version], [1])
-m4_define([nm_minor_version], [14])
-m4_define([nm_micro_version], [0])
+m4_define([nm_minor_version], [12])
+m4_define([nm_micro_version], [4])
 m4_define([nm_version],
           [nm_major_version.nm_minor_version.nm_micro_version])
 
@@ -109,6 +109,11 @@ GETTEXT_PACKAGE=NetworkManager
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
 
+dnl
+dnl Make sha1.c happy on big endian systems
+dnl
+AC_C_BIGENDIAN
+
 # Add runstatedir if not specified manually in autoconf < 2.70
 AS_IF([test -z "$runstatedir"], runstatedir="$localstatedir/run")
 AC_SUBST(runstatedir)
@@ -129,8 +134,8 @@ AC_ARG_ENABLE(config-plugin-ibft, AS_HELP_STRING([--enable-config-plugin-ibft],
 AC_ARG_ENABLE(ifcfg-rh, AS_HELP_STRING([--enable-ifcfg-rh], [enable ifcfg-rh configuration plugin (Fedora/RHEL)]))
 AC_ARG_ENABLE(ifupdown, AS_HELP_STRING([--enable-ifupdown], [enable ifupdown configuration plugin (Debian/Ubuntu)]))
 # Default alternative plugins by distribution
-AS_IF([test -z "$enable_ifcfg_rh" -a -d /etc/sysconfig/network-scripts], enable_ifcfg_rh=yes)
-AS_IF([test -z "$enable_ifupdown" -a -f /etc/debian_version],            enable_ifupdown=yes)
+AS_IF([test -z "$enable_ifcfg_rh"], AC_CHECK_FILE(/etc/sysconfig/network-scripts, enable_ifcfg_rh=yes))
+AS_IF([test -z "$enable_ifupdown"], AC_CHECK_FILE(/etc/debian_version, enable_ifupdown=yes))
 # Otherwise plugins default to "no"
 AS_IF([test -z "$enable_ifcfg_rh"], enable_ifcfg_rh=no)
 AS_IF([test -z "$enable_ifupdown"], enable_ifupdown=no)
@@ -439,8 +444,6 @@ fi
 if test "$have_systemd_logind" = "yes"; then
 	AC_DEFINE([SESSION_TRACKING_SYSTEMD], 1, [Define to 1 if libsystemd-login is available])
 	session_tracking="$session_tracking, systemd-logind"
-else
-	AC_DEFINE([SESSION_TRACKING_SYSTEMD], 0, [Define to 1 if libsystemd-login is available])
 fi
 
 if test "$use_elogind" = "yes" -a "$have_systemd_logind" = "yes"; then
@@ -457,15 +460,12 @@ fi
 if test "$have_elogind" = "yes"; then
 	AC_DEFINE([SESSION_TRACKING_ELOGIND], 1, [Define to 1 if libelogin is available])
 	session_tracking="$session_tracking, elogind"
-else
-	AC_DEFINE([SESSION_TRACKING_ELOGIND], 0, [Define to 1 if libelogin is available])
 fi
 
 if test "$use_consolekit" = "yes"; then
 	AC_DEFINE([SESSION_TRACKING_CONSOLEKIT], 1, [Define to 1 if ConsoleKit is available])
+	AC_DEFINE([CKDB_PATH], "/var/run/ConsoleKit/database", [Path to ConsoleKit database])
 	session_tracking="$session_tracking, consolekit"
-else
-	AC_DEFINE([SESSION_TRACKING_CONSOLEKIT], 0, [Define to 1 if ConsoleKit is available])
 fi
 session_tracking="$(printf '%s' "${session_tracking}" | sed 's/^, //')"
 
@@ -603,6 +603,9 @@ if (test "${enable_teamdctl}" = "yes"); then
 	fi
 	# temporary bug workaround
 	LIBTEAMDCTL_CFLAGS=`echo $LIBTEAMDCTL_CFLAGS | sed -e 's:/teamdctl.h::'`
+	AC_DEFINE(WITH_TEAMDCTL, 1, [Define if you have Teamd control support])
+else
+	AC_DEFINE(WITH_TEAMDCTL, 0, [Define if you have Teamd control support])
 fi
 AM_CONDITIONAL(WITH_TEAMDCTL, test "${enable_teamdctl}" = "yes")
 
@@ -660,31 +663,21 @@ else
 fi
 AC_SUBST(NM_MODIFY_SYSTEM_POLICY)
 
-PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.12], [have_crypto_gnutls=yes], [have_crypto_gnutls=no])
-PKG_CHECK_MODULES(NSS, [nss], [have_crypto_nss=yes], [have_crypto_nss=yes])
-if test "${have_crypto_nss}" = "yes"; then
-	# Work around a pkg-config bug (fdo #29801) where exists != usable
-	FOO=`$PKG_CONFIG --cflags --libs nss`
-	if test x"$?" != "x0"; then
-		have_crypto_nss=no
-	fi
-fi
-AM_CONDITIONAL(HAVE_CRYPTO_GNUTLS, test "${have_crypto_gnutls}" = 'yes')
-AM_CONDITIONAL(HAVE_CRYPTO_NSS, test "${have_crypto_nss}" = 'yes')
-
 AC_ARG_WITH(crypto,
             AS_HELP_STRING([--with-crypto=nss|gnutls],
                            [Cryptography library to use for certificate and key operations]),
             with_crypto=$withval,
             with_crypto=nss)
 if test "$with_crypto" = 'nss'; then
-	if test "${have_crypto_nss}" != "yes"; then
-		AC_MSG_ERROR([No usable NSS found for --with-crypto=nss])
+	PKG_CHECK_MODULES(NSS, [nss])
+
+	# Work around a pkg-config bug (fdo #29801) where exists != usable
+	FOO=`$PKG_CONFIG --cflags --libs nss`
+	if test x"$?" != "x0"; then
+		AC_MSG_ERROR([No usable NSS found])
 	fi
 elif test "$with_crypto" = 'gnutls'; then
-	if test "${have_crypto_gnutls}" != "yes"; then
-		AC_MSG_ERROR([No usable gnutls found for --with-crypto=gnutls])
-	fi
+	PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.12])
 else
 	AC_MSG_ERROR([Please choose either 'nss' or 'gnutls' for certificate and crypto operations])
 fi
@@ -760,6 +753,12 @@ if (test "${with_modem_manager_1}" != "no"); then
 		with_modem_manager_1="yes"
 	fi
 fi
+
+if (test "${with_modem_manager_1}" = "yes"); then
+	AC_DEFINE(WITH_MODEM_MANAGER_1, 1, [Define if you have ModemManager1 support])
+else
+	AC_DEFINE(WITH_MODEM_MANAGER_1, 0, [Define if you have ModemManager1 support])
+fi
 AM_CONDITIONAL(WITH_MODEM_MANAGER_1, test "${with_modem_manager_1}" = "yes")
 
 # Bluez5 DUN support
@@ -803,7 +802,7 @@ if test "$with_dhcpcanon" != "no"; then
 fi
 if test "$with_dhcpcanon" != "no"; then
     AC_DEFINE(WITH_DHCPCANON, 1, [Define if you have dhcpcanon])
-    AC_DEFINE_UNQUOTED(DHCPCANON_PATH, "$with_dhcpcanon", [Define path to dhcpcanon])
+    AC_SUBST(DHCPCANON_PATH, $with_dhcpcanon)
 else
     AC_DEFINE(WITH_DHCPCANON, 0, [Define if you have dhcpcanon])
 fi
@@ -815,12 +814,15 @@ if test "${enable_ovs}" != "no"; then
 	if test "$have_jansson" = "no"; then
 		AC_MSG_ERROR(Jansson is required for ovs support)
 	fi
+	AC_DEFINE(WITH_OPENVSWITCH, 1, [Define if you have OpenVSwitch support])
+else
+	AC_DEFINE(WITH_OPENVSWITCH, 0, [Define if you have OpenVSwitch support])
 fi
 AM_CONDITIONAL(WITH_OPENVSWITCH, test "${enable_ovs}" = "yes")
 
 # DHCP client support
 AC_ARG_WITH([dhclient],
-            AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable dhclient support]))
+            AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable dhclient 4.x support]))
 if test "$with_dhclient" != "no"; then
 	with_dhclient_="$with_dhclient"
 	AC_PATH_PROGS(with_dhclient, dhclient, no, /sbin:/usr/sbin:/usr/local/sbin)
@@ -829,17 +831,25 @@ if test "$with_dhclient" != "no"; then
 			AC_MSG_WARN([dhclient not found, assume path /usr/sbin/dhclient])
 			with_dhclient=/usr/sbin/dhclient
 		fi
+	else
+		if ! $with_dhclient --version 2>&1 | grep -q "^isc-dhclient-4\."; then
+			AC_MSG_WARN([Seems version of dhclient $with_dhclient is too old, version 4.x or newer is required.])
+		fi
 	fi
 fi
 if test "$with_dhclient" != "no"; then
 	AC_DEFINE(WITH_DHCLIENT, 1, [Define if you have dhclient])
-	AC_DEFINE_UNQUOTED(DHCLIENT_PATH, "$with_dhclient", [Define path to dhclient])
+	AC_SUBST(DHCLIENT_PATH, $with_dhclient)
 else
 	AC_DEFINE(WITH_DHCLIENT, 0, [Define if you have dhclient])
 fi
 
 AC_ARG_WITH([dhcpcd],
             AS_HELP_STRING([--with-dhcpcd=yes|no|path], [Enable dhcpcd 4.x support]))
+AC_ARG_WITH([dhcpcd-supports-ipv6],
+            AS_HELP_STRING([--with-dhcpcd-supports-ipv6=yes|no|auto],
+                           [Whether using dhcpcd >= 6.x which has IPv6 support]),
+            [with_dhcpcd_supports_ipv6=$withval], [with_dhcpcd_supports_ipv6=auto])
 if test "$with_dhcpcd" != "no"; then
 	with_dhcpcd_="$with_dhcpcd"
 	AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin)
@@ -847,12 +857,39 @@ if test "$with_dhcpcd" != "no"; then
 		if test "$with_dhcpcd_" == yes; then
 			AC_MSG_WARN([dhcpcd not found, assume path /usr/sbin/dhcpcd])
 			with_dhcpcd=/usr/sbin/dhcpcd
+			if test "$with_dhcpcd_supports_ipv6" == auto; then
+				with_dhcpcd_supports_ipv6=yes
+			fi
+		fi
+	else
+		if ! $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [[456789]]\."; then
+			AC_MSG_WARN([Seems version of dhcpcd $with_dhcpcd is too old, version 4.x or newer is required])
+		fi
+	fi
+fi
+if test "$with_dhcpcd" != "no"; then
+	if $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [[6789]]\."; then
+		if test "$with_dhcpcd_supports_ipv6" == no; then
+			AC_MSG_WARN([Seems version of dhcpcd $with_dhcpcd supports IPv6, but compiling --with-dhcpcd-supports-ipv6=no])
+		else
+			with_dhcpcd_supports_ipv6=yes
+		fi
+	else
+		if test "$with_dhcpcd_supports_ipv6" == yes; then
+			AC_MSG_WARN([Seems version of dhcpcd $with_dhcpcd does not support IPv6, but compiling --with-dhcpcd-supports-ipv6=yes])
+		else
+			with_dhcpcd_supports_ipv6=no
 		fi
 	fi
+	if test "$with_dhcpcd_supports_ipv6" != no; then
+		AC_DEFINE(DHCPCD_SUPPORTS_IPV6, 1, [Define if dhcpcd supports IPv6 (6.x+)])
+	fi
+else
+	with_dhcpcd_supports_ipv6=no
 fi
 if test "$with_dhcpcd" != "no"; then
 	AC_DEFINE(WITH_DHCPCD, 1, [Define if you have dhcpcd])
-	AC_DEFINE_UNQUOTED(DHCPCD_PATH, "$with_dhcpcd", [Define path to dhcpcd])
+	AC_SUBST(DHCPCD_PATH, $with_dhcpcd)
 else
 	AC_DEFINE(WITH_DHCPCD, 0, [Define if you have dhcpcd])
 fi
@@ -871,45 +908,38 @@ test -z "$config_dhcp_default"                             && config_dhcp_defaul
 AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_MAIN_DHCP, "$config_dhcp_default", [Default configuration option for main.dhcp setting])
 AC_SUBST(NM_CONFIG_DEFAULT_MAIN_DHCP, $config_dhcp_default)
 
+# resolvconf and netconfig support
 AC_ARG_WITH(resolvconf, AS_HELP_STRING([--with-resolvconf=yes|no|path], [Enable resolvconf support]))
 AC_ARG_WITH(netconfig, AS_HELP_STRING([--with-netconfig=yes|no], [Enable SUSE netconfig support]))
 AC_ARG_WITH(config-dns-rc-manager-default, AS_HELP_STRING([--with-config-dns-rc-manager-default=symlink|file|netconfig|resolvconf], [Configure default value for main.rc-manager setting]), [config_dns_rc_manager_default=$withval])
-if test "$config_dns_rc_manager_default" != "" -a \
+if test "$config_dns_rc_manager_default" != symlink -a \
         "$config_dns_rc_manager_default" != file -a \
-        "$config_dns_rc_manager_default" != symlink -a \
+        "$config_dns_rc_manager_default" != "" -a \
         "$config_dns_rc_manager_default" != netconfig -a \
         "$config_dns_rc_manager_default" != resolvconf; then
 	AC_MSG_WARN([Unknown --with-config-dns-rc-manager-default=$config_dns_rc_manager_default setting.])
 	config_dns_rc_manager_default=
 fi
 # Use netconfig by default on SUSE
-AS_IF([test -z "$with_netconfig" -a -f /etc/SuSE-release], with_netconfig=yes)
+AS_IF([test -z "$with_netconfig"], AC_CHECK_FILE(/etc/SuSE-release, with_netconfig=yes))
 # Otherwise default to "no"
 AS_IF([test -z "$with_resolvconf"], with_resolvconf=no)
 AS_IF([test -z "$with_netconfig"], with_netconfig=no)
-
+# Find resolvconf and netconfig
 if test "$with_resolvconf" = "yes"; then
-	AC_PATH_PROGS(with_resolvconf, resolvconf, 'yes', /sbin:/usr/sbin:/usr/local/sbin)
-	if test "$with_resolvconf" = "yes"; then
-		AC_MSG_ERROR(cannot find resolvconf in path. Set the path explicitly via --with-resolvconf=PATH.)
-	fi
+	AC_PATH_PROGS(with_resolvconf, resolvconf, no, /sbin:/usr/sbin:/usr/local/sbin)
 fi
 if test "$with_resolvconf" != "no"; then
 	AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=resolvconf)
 fi
-
 if test "$with_netconfig" = "yes"; then
-	AC_PATH_PROGS(with_netconfig, netconfig, yes, /sbin:/usr/sbin:/usr/local/sbin)
-	if test "$with_netconfig" = "yes"; then
-		AC_MSG_ERROR(cannot find netconfig in path. Set the path explicitly via --with-netconfig=PATH.)
-	fi
+	AC_PATH_PROGS(with_netconfig, netconfig, no, /sbin:/usr/sbin:/usr/local/sbin)
 fi
 if test "$with_netconfig" != "no"; then
 	AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=netconfig)
 fi
-
 AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=symlink)
-
+# Define resolvconf and netconfig paths
 if test "$with_resolvconf" != "no"; then
 	AC_DEFINE_UNQUOTED(RESOLVCONF_PATH, "$with_resolvconf", [Path to resolvconf])
 fi
@@ -948,13 +978,13 @@ AC_SUBST(DNSMASQ_PATH)
 AC_ARG_WITH(dnssec_trigger,
             AS_HELP_STRING([--with-dnssec-trigger=/path/to/dnssec-trigger-script], [path to unbound dnssec-trigger-script]))
 if test "x${with_dnssec_trigger}" = x; then
-	AC_PATH_PROG(DNSSEC_TRIGGER_PATH, dnssec-trigger-script, /usr/libexec/dnssec-trigger-script,
+	AC_PATH_PROG(DNSSEC_TRIGGER_SCRIPT, dnssec-trigger-script, /usr/libexec/dnssec-trigger-script,
 	             /usr/local/libexec:/usr/local/lib:/usr/local/lib/dnssec-trigger:/usr/libexec:/usr/lib:/usr/lib/dnssec-trigger)
 else
-	DNSSEC_TRIGGER_PATH="$with_dnssec_trigger"
+	DNSSEC_TRIGGER_SCRIPT="$with_dnssec_trigger"
 fi
-AC_DEFINE_UNQUOTED(DNSSEC_TRIGGER_PATH, "$DNSSEC_TRIGGER_PATH", [Define to path of unbound dnssec-trigger-script])
-AC_SUBST(DNSSEC_TRIGGER_PATH)
+AC_DEFINE_UNQUOTED(DNSSEC_TRIGGER_SCRIPT, "$DNSSEC_TRIGGER_SCRIPT", [Define to path of unbound dnssec-trigger-script])
+AC_SUBST(DNSSEC_TRIGGER_SCRIPT)
 
 # system CA certificates path
 AC_ARG_WITH(system-ca-path,
@@ -1081,8 +1111,6 @@ if test "${enable_more_logging}" = ""; then
 fi
 if test "${enable_more_logging}" = "yes"; then
 	AC_DEFINE(NM_MORE_LOGGING, [1], [Define if more debug logging is enabled])
-else
-	AC_DEFINE(NM_MORE_LOGGING, [0], [Define if more debug logging is enabled])
 fi
 
 NM_LTO
@@ -1217,7 +1245,7 @@ else
 	if test "$enable_gtk_doc" = "yes"; then
 		# large parts of the documentation require introspection/pygobject to extract
 		# the documentation out of the source files. You cannot enable gtk-doc without alone.
-		AC_MSG_ERROR(["--enable-gtk-doc requires --enable-introspection"])
+		AC_MSG_ERROR(["--with-gtk-doc requires --enable-introspection"])
 	fi
 	have_introspection=no
 fi
@@ -1306,7 +1334,7 @@ echo
 echo "Features:"
 echo "  wext: $ac_with_wext"
 echo "  wifi: $enable_wifi"
-echo "  ppp: $enable_ppp ${PPPD_PATH} plugins:${PPPD_PLUGIN_DIR}"
+echo "  ppp: $enable_ppp ${PPPD_PLUGIN_DIR}"
 echo "  modemmanager-1: $with_modem_manager_1"
 echo "  ofono: $with_ofono"
 echo "  concheck: $enable_concheck"
@@ -1334,6 +1362,7 @@ echo "DHCP clients (default $config_dhcp_default):"
 echo "  dhcpcanon: $with_dhcpcanon"
 echo "  dhclient: $with_dhclient"
 echo "  dhcpcd: $with_dhcpcd"
+echo "  dhcpcd-supports-ipv6: $with_dhcpcd_supports_ipv6"
 echo
 
 echo "Miscellaneous:"
@@ -1349,7 +1378,7 @@ echo "  code coverage: $enable_code_coverage"
 echo "  LTO: $enable_lto"
 echo "  linker garbage collection: $enable_ld_gc"
 echo "  JSON validation for libnm: $enable_json_validation"
-echo "  crypto: $with_crypto (have-gnutls: $have_crypto_gnutls, have-nss: $have_crypto_nss)"
+echo "  crypto: $with_crypto"
 echo "  sanitizers: $sanitizers"
 echo "  Mozilla Public Suffix List: $with_libpsl"
 echo