2011-03-14 06:24:08 +00:00
AC_PREREQ([2.63])
2004-06-24 14:18:37 +00:00
2011-03-02 23:16:27 +00:00
dnl The NM version number
2018-01-16 15:08:13 +00:00
dnl
2018-01-23 11:24:29 +00:00
dnl NOTE: When incrementing version also:
2018-01-16 15:08:13 +00:00
dnl - add corresponding NM_VERSION_x_y_z macros in
dnl "shared/nm-version-macros.h.in"
dnl - update number in meson.build
2014-12-12 20:33:10 +00:00
m4_define([nm_major_version], [1])
2019-02-23 09:15:56 +00:00
m4_define([nm_minor_version], [17])
2019-04-08 16:54:18 +00:00
m4_define([nm_micro_version], [3])
2011-03-02 23:16:27 +00:00
m4_define([nm_version],
2014-12-12 21:06:07 +00:00
[nm_major_version.nm_minor_version.nm_micro_version])
2011-03-02 23:16:27 +00:00
AC_INIT([NetworkManager], [nm_version],
2011-03-03 05:34:25 +00:00
[http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager],
2011-03-02 23:16:27 +00:00
[NetworkManager])
2004-06-24 14:18:37 +00:00
2011-03-14 06:24:08 +00:00
AC_CONFIG_HEADERS([config.h])
2009-04-21 23:45:30 +00:00
AC_CONFIG_MACRO_DIR([m4])
2011-03-14 06:24:08 +00:00
AC_CONFIG_AUX_DIR([build-aux])
2015-05-14 12:45:57 +00:00
AC_REQUIRE_AUX_FILE([tap-driver.sh])
2009-04-21 23:45:30 +00:00
2015-08-13 15:15:30 +00:00
AM_INIT_AUTOMAKE(1.12 tar-ustar no-dist-gzip dist-xz -Wno-portability) dnl NB: Do not [quote] this parameter.
2011-03-14 06:24:08 +00:00
AM_MAINTAINER_MODE([enable])
2013-05-12 13:11:07 +00:00
AM_SILENT_RULES([yes])
2011-03-14 06:24:08 +00:00
dnl Define _SYSTEM_EXTENSIONS for various things like strcasestr()
AC_USE_SYSTEM_EXTENSIONS
2009-04-21 23:55:31 +00:00
2004-11-16 02:41:53 +00:00
dnl
dnl Require programs
dnl
2004-06-24 14:18:37 +00:00
AC_PROG_CC
2004-08-24 00:31:47 +00:00
AM_PROG_CC_C_O
2011-03-14 06:24:08 +00:00
2011-04-25 15:09:44 +00:00
# C++ only required if --enable-qt=yes
AC_PROG_CXX
2014-07-10 01:33:18 +00:00
AC_PROG_LN_S
2017-02-16 14:55:23 +00:00
AC_PROG_MKDIR_P
2014-07-10 01:33:18 +00:00
2016-05-18 15:19:03 +00:00
# Prefer gcc-* variants; the ones libtool would choose don't work with LTO
AC_CHECK_TOOLS(AR, [gcc-ar ar], false)
AC_CHECK_TOOLS(RANLIB, [gcc-ranlib ranlib], :)
2017-06-01 08:26:59 +00:00
AC_CHECK_TOOLS(NM, [$BINUTILS_NM gcc-nm nm])
2016-05-18 15:19:03 +00:00
2011-03-14 06:24:08 +00:00
dnl Initialize libtool
LT_PREREQ([2.2])
2011-03-24 17:02:29 +00:00
LT_INIT([disable-static])
2004-09-29 22:22:05 +00:00
2011-03-02 23:16:27 +00:00
dnl Version stuff
NM_MAJOR_VERSION=nm_major_version
NM_MINOR_VERSION=nm_minor_version
NM_MICRO_VERSION=nm_micro_version
NM_VERSION=nm_version
AC_SUBST(NM_MAJOR_VERSION)
AC_SUBST(NM_MINOR_VERSION)
AC_SUBST(NM_MICRO_VERSION)
AC_SUBST(NM_VERSION)
2016-09-13 08:32:57 +00:00
GIT_SHA_RECORD(NM_GIT_SHA)
2011-03-02 23:16:27 +00:00
2004-11-16 02:41:53 +00:00
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
AC_TYPE_PID_T
2015-10-07 08:07:17 +00:00
AC_CHECK_SIZEOF(dev_t)
2017-02-06 12:16:10 +00:00
AC_CHECK_SIZEOF(time_t)
2018-02-15 09:25:44 +00:00
AC_CHECK_SIZEOF(pid_t)
2004-11-16 02:41:53 +00:00
2017-03-08 23:27:38 +00:00
AC_CHECK_DECLS([
explicit_bzero],
[], [], [[
#include <string.h>
]])
2004-11-16 02:41:53 +00:00
2018-04-04 13:44:05 +00:00
AC_CHECK_DECLS([
reallocarray],
[], [], [[
#include <malloc.h>
]])
2018-09-11 14:06:25 +00:00
AC_CHECK_DECLS([
memfd_create],
[], [], [[
#include <sys/mman.h>
]])
2017-10-11 09:39:50 +00:00
AC_CHECK_HEADERS(sys/auxv.h)
AC_CHECK_DECLS([getrandom],
[AC_DEFINE([USE_SYS_RANDOM_H], [1], [sys/random.h is usable])
AC_DEFINE([HAVE_GETRANDOM], [1], [has getrandom])
],
[AC_CHECK_DECLS([getrandom],
[AC_DEFINE([USE_SYS_RANDOM_H], [0], [sys/random.h is usable])
AC_DEFINE([HAVE_GETRANDOM], [1], [has getrandom])],
[AC_DEFINE([USE_SYS_RANDOM_H], [0], [sys/random.h is usable])
AC_DEFINE([HAVE_GETRANDOM], [0], [has getrandom])],
[[#include <linux/random.h>
]])],
[[#include <sys/random.h>
]])
2004-11-16 02:41:53 +00:00
2005-06-20 17:16:51 +00:00
dnl
dnl translation support
dnl
2011-03-14 15:58:58 +00:00
IT_PROG_INTLTOOL([0.40.0])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.17])
2004-08-26 19:14:26 +00:00
GETTEXT_PACKAGE=NetworkManager
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
2014-12-29 22:56:46 +00:00
# Add runstatedir if not specified manually in autoconf < 2.70
AS_IF([test -z "$runstatedir"], runstatedir="$localstatedir/run")
AC_SUBST(runstatedir)
2012-08-23 09:53:41 +00:00
# NetworkManager paths
2015-08-21 08:52:24 +00:00
AC_SUBST(nmbinary, '${sbindir}'/$PACKAGE, [NetworkManager binary executable])
AC_SUBST(nmconfdir, '${sysconfdir}'/$PACKAGE, [NetworkManager configuration directory])
AC_SUBST(nmlibdir, '${prefix}'/lib/$PACKAGE, [NetworkManager library directory])
AC_SUBST(nmdatadir, '${datadir}'/$PACKAGE, [NetworkManager shared data directory])
AC_SUBST(nmstatedir, '${localstatedir}'/lib/$PACKAGE, [NetworkManager persistent state directory])
AC_SUBST(nmrundir, '${runstatedir}'/$PACKAGE, [NetworkManager runtime state directory])
2012-08-23 09:53:41 +00:00
2016-03-09 11:27:56 +00:00
AC_GNU_SOURCE
AC_CHECK_FUNCS([__secure_getenv secure_getenv])
2012-08-01 18:01:33 +00:00
# Alternative configuration plugins
2014-10-21 07:13:33 +00:00
AC_ARG_ENABLE(config-plugin-ibft, AS_HELP_STRING([--enable-config-plugin-ibft], [enable ibft configuration plugin]))
2012-08-01 18:01:33 +00:00
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
build: avoid AC_CHECK_FILE() due to problems with cross-compilation
AC_CHECK_FILE() does not work for cross compilation. Autoconf
documentation says:
Be aware that, like most Autoconf macros, they test a feature of the
host machine, and therefore, they die when cross-compiling. [1]
Test for the existance of the file directly. Of course, when cross
compiling, it's not at all clear that the host machine will run the same
distribution. And thus detecting --enable-ifcfg-rh based on the build
machine is likely wrong. Note, that we already did
AS_IF([test -z "$hostname_persist" -a -f /etc/SuSE-release], hostname_persist=suse)
which has the same problem.
At least, build no longer fails, and the user can inspect the ./configure
summary and see which features were misdetected.
[1] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Files.html
2018-07-26 06:02:33 +00:00
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)
2012-08-01 18:01:33 +00:00
# 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)
2018-08-09 16:22:55 +00:00
# Disable obsolete ibft plugin by default
AS_IF([test -z "$enable_config_plugin_ibft"], enable_config_plugin_ibft="no")
2012-08-01 18:01:33 +00:00
# Create automake conditionals
2014-10-21 07:13:33 +00:00
AM_CONDITIONAL(CONFIG_PLUGIN_IBFT, test "$enable_config_plugin_ibft" = "yes")
2012-08-01 18:01:33 +00:00
AM_CONDITIONAL(CONFIG_PLUGIN_IFCFG_RH, test "$enable_ifcfg_rh" = "yes")
AM_CONDITIONAL(CONFIG_PLUGIN_IFUPDOWN, test "$enable_ifupdown" = "yes")
2013-12-16 19:42:40 +00:00
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(config-plugins-default,
AS_HELP_STRING([--with-config-plugins-default=PLUGINS],
[Default configuration option for main.plugins setting, used as fallback if the configuration option is unset]),
[config_plugins_default="$withval"], [config_plugins_default=""])
2014-10-16 10:01:35 +00:00
if test -z "$config_plugins_default" -o "$config_plugins_default" = no; then
2017-05-05 10:00:01 +00:00
config_plugins_default=''
test "$enable_ifcfg_rh" = "yes" && config_plugins_default="$config_plugins_default,ifcfg-rh"
test "$enable_ifupdown" = "yes" && config_plugins_default="$config_plugins_default,ifupdown"
test "$enable_config_plugin_ibft" = "yes" && config_plugins_default="$config_plugins_default,ibft"
config_plugins_default="${config_plugins_default#,}"
2014-10-16 10:01:35 +00:00
fi
2015-03-23 08:15:47 +00:00
test "$enable_ifcfg_rh" = "yes" && distro_plugins="$distro_plugins,ifcfg-rh"
test "$enable_ifupdown" = "yes" && distro_plugins="$distro_plugins,ifupdown"
distro_plugins="${distro_plugins#,}"
2016-11-25 13:17:30 +00:00
AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_MAIN_PLUGINS, "$config_plugins_default", [Default configuration option for main.plugins setting])
2015-06-09 17:27:55 +00:00
if test "${enable_config_plugin_ibft}" = yes; then
AC_DEFINE(WITH_SETTINGS_PLUGIN_IBFT, 1, [Whether compilation of ibft setting plugin is enabled])
else
AC_DEFINE(WITH_SETTINGS_PLUGIN_IBFT, 0, [Whether compilation of ibft setting plugin is enabled])
fi
2014-10-16 10:01:35 +00:00
2013-12-16 19:42:40 +00:00
if test "$enable_ifcfg_rh" = "yes"; then
2017-05-05 10:00:01 +00:00
DISTRO_NETWORK_SERVICE=network.service
2013-12-16 19:42:40 +00:00
fi
AC_SUBST(DISTRO_NETWORK_SERVICE)
2012-12-19 16:48:52 +00:00
# Code coverage
GNOME_CODE_COVERAGE
2012-07-02 10:31:32 +00:00
2010-04-23 13:25:32 +00:00
dnl
dnl Distribution version string
dnl
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(dist-version,
AS_HELP_STRING([--with-dist-version=<NM-distribution-version>],
[Define the NM''s distribution version string]),
2018-03-18 19:38:49 +00:00
ac_distver=$withval, ac_distver=$NM_VERSION)
AC_DEFINE_UNQUOTED(NM_DIST_VERSION, "$ac_distver", [Define the distribution version string])
AC_SUBST(NM_DIST_VERSION, "$ac_distver")
2010-04-23 13:25:32 +00:00
2015-01-23 13:12:02 +00:00
AC_ARG_ENABLE(wifi, AS_HELP_STRING([--enable-wifi], [enable Wi-Fi support]))
if test "${enable_wifi}" != "no"; then
enable_wifi='yes'
AC_DEFINE(WITH_WIFI, 1, [Define if you have Wi-Fi support])
else
AC_DEFINE(WITH_WIFI, 0, [Define if you have Wi-Fi support])
fi
AM_CONDITIONAL(WITH_WIFI, test "${enable_wifi}" = "yes")
2012-03-01 05:11:04 +00:00
dnl
dnl Default to using WEXT but allow it to be disabled
dnl
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(wext,
AS_HELP_STRING([--with-wext=yes],
[Enable or disable Linux Wireless Extensions]),
ac_with_wext=$withval, ac_with_wext="$enable_wifi")
2015-01-23 13:12:02 +00:00
if test "$ac_with_wext" != 'no'; then
ac_with_wext='yes'
fi
2012-03-01 05:11:04 +00:00
if test x"$ac_with_wext" = x"yes"; then
2015-01-23 13:12:02 +00:00
if test "$enable_wifi" != "yes"; then
AC_MSG_ERROR(Enabling WEXT support and disabling Wi-Fi makes no sense)
fi
2012-03-01 05:11:04 +00:00
AC_DEFINE(HAVE_WEXT, 1, [Define if you have Linux Wireless Extensions support])
else
AC_DEFINE(HAVE_WEXT, 0, [Define if you have Linux Wireless Extensions support])
2011-10-05 19:29:01 +00:00
fi
2012-03-01 05:11:04 +00:00
AM_CONDITIONAL(WITH_WEXT, test x"${ac_with_wext}" = x"yes")
2011-10-05 19:29:01 +00:00
2017-12-09 15:28:10 +00:00
dnl
dnl Default to using wpa_supplicant but allow IWD as wifi backend
dnl
AC_ARG_WITH(iwd,
AS_HELP_STRING([--with-iwd=yes],
[Support IWD as wifi-backend in addition to wpa_supplicant (experimental)]),
ac_with_iwd=$withval, ac_with_iwd="no")
if test "$ac_with_iwd" != 'no'; then
ac_with_iwd='yes'
fi
if test x"$ac_with_iwd" = x"yes"; then
if test "$enable_wifi" != "yes"; then
AC_MSG_ERROR(Enabling IWD support and disabling Wi-Fi makes no sense)
fi
AC_DEFINE(WITH_IWD, 1, [Define to compile with the IWD wifi-backend])
else
AC_DEFINE(WITH_IWD, 0, [Define to compile without the IWD wifi-backend])
fi
AM_CONDITIONAL(WITH_IWD, test x"${ac_with_iwd}" = x"yes")
2009-11-06 21:40:44 +00:00
dnl
dnl Checks for libdl - on certain platforms its part of libc
dnl
2019-03-29 08:13:59 +00:00
AC_SEARCH_LIBS([dlopen], [dl dld],
[test "$ac_cv_search_dlopen" = "none required" || AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen"]),
[])
2009-11-06 21:40:44 +00:00
2015-05-26 13:21:12 +00:00
PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0],
2017-05-05 10:00:01 +00:00
[AC_SUBST(LOG_DRIVER, '$(top_srcdir)/build-aux/tap-driver.sh')
AC_SUBST(AM_TESTS_FD_REDIRECT, '--tap')],
2018-01-02 14:47:37 +00:00
[PKG_CHECK_MODULES(GLIB, gio-unix-2.0 >= 2.40 gmodule-2.0)
2017-05-05 10:00:01 +00:00
AC_SUBST(LOG_DRIVER, '$(top_srcdir)/build-aux/test-driver')])
2012-10-31 21:01:36 +00:00
2018-01-02 14:47:37 +00:00
GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40"
2012-05-17 13:46:24 +00:00
2005-12-09 23:25:22 +00:00
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
2017-11-04 19:41:45 +00:00
GOBJECT_INTROSPECTION_CHECK([0.9.6])
2019-04-03 06:52:38 +00:00
AC_ARG_WITH(libnm-glib,
AS_HELP_STRING([--with-libnm-glib],
[build legacy libraries]))
fake_typelibs=no
if test "$with_libnm_glib" == "yes"; then
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1 dbus-glib-1 >= 0.94, :,
[AC_MSG_FAILURE([$DBUS_PKG_ERRORS
Configure with --without-libnm-glib if you do not need the legacy libraries])
])
if test "${found_introspection}" = "yes"; then
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
if ! test x"$GLIB_COMPILE_RESOURCES" = x""; then
fake_typelibs=yes
fi
fi
else
with_libnm_glib=no
fi
AM_CONDITIONAL(WITH_LEGACY_LIBRARIES, test "$with_libnm_glib" == "yes")
if test "$fake_typelibs" = "yes"; then
AC_DEFINE(WITH_FAKE_TYPELIBS, 1, [Define for libnm to prevent GIR from loading libnm-glib])
else
AC_DEFINE(WITH_FAKE_TYPELIBS, 0, [Define for libnm to prevent GIR from loading libnm-glib])
fi
AM_CONDITIONAL(WITH_FAKE_TYPELIBS, test "${fake_typelibs}" = "yes")
2017-03-12 14:54:02 +00:00
PKG_CHECK_MODULES([LIBUDEV], [libudev >= 175])
2009-06-05 05:55:02 +00:00
2011-04-21 00:38:31 +00:00
# Qt4
2013-05-14 19:49:22 +00:00
PKG_CHECK_MODULES(QT, [QtCore >= 4 QtDBus QtNetwork], [have_qt=yes],[have_qt=no])
2017-05-05 10:00:01 +00:00
AC_ARG_ENABLE(qt,
AS_HELP_STRING([--enable-qt], [enable Qt examples]),
[enable_qt=${enableval}], [enable_qt=${have_qt}])
2011-04-21 00:38:31 +00:00
if (test "${enable_qt}" = "yes"); then
if test x"$have_qt" = x"no"; then
AC_MSG_ERROR(Qt development headers are required)
fi
2012-02-02 12:37:10 +00:00
# Check for moc-qt4 and if not found then moc
2013-05-14 19:49:22 +00:00
QT4_BINDIR=`$PKG_CONFIG QtCore --variable moc_location`
2012-02-02 12:37:10 +00:00
AC_CHECK_PROGS(MOC, [moc-qt4 moc],, [$QT4_BINDIR:$PATH])
2011-04-21 00:38:31 +00:00
fi
AM_CONDITIONAL(WITH_QT, test "${enable_qt}" = "yes")
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(udev-dir,
AS_HELP_STRING([--with-udev-dir=DIR],
[Absolute path of the udev base directory. Set to 'no' not to install the udev rules]),
[], [with_udev_dir="yes"])
2014-08-26 17:11:22 +00:00
if (test "$with_udev_dir" != 'no'); then
2015-01-25 13:52:11 +00:00
if (test "$with_udev_dir" != 'yes' && printf '%s' "$with_udev_dir" | grep -v -q '^/'); then
2014-08-26 17:11:22 +00:00
AC_MSG_ERROR([--with-udev-dir must be an absolute path or 'yes' or 'no'. Instead it is '$with_udev_dir'])
fi
if (test "$with_udev_dir" = 'yes'); then
2016-03-14 12:49:58 +00:00
with_udev_dir="\$(prefix)/lib/udev"
2014-08-26 17:11:22 +00:00
fi
UDEV_DIR="$with_udev_dir"
AC_SUBST(UDEV_DIR)
2009-08-05 20:34:02 +00:00
fi
2014-08-26 17:11:22 +00:00
AM_CONDITIONAL(WITH_UDEV_DIR, test "$with_udev_dir" != 'no')
2009-08-05 20:34:02 +00:00
2012-02-01 22:49:46 +00:00
# systemd unit support
2017-05-05 10:00:01 +00:00
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
[Directory for systemd service files]))
2012-11-15 06:48:51 +00:00
# default location
AS_IF([test -z "$with_systemdsystemunitdir" && $PKG_CONFIG systemd],
2017-05-05 10:00:01 +00:00
with_systemdsystemunitdir="\$(prefix)/lib/systemd/system")
2012-11-15 06:48:51 +00:00
AS_IF([test -z "$with_systemdsystemunitdir"], with_systemdsystemunitdir=no)
# add conditional and subst
AM_CONDITIONAL(HAVE_SYSTEMD, [test "$with_systemdsystemunitdir" != no])
if test "$with_systemdsystemunitdir" != no; then
2010-09-01 22:25:03 +00:00
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
2013-10-31 08:14:13 +00:00
AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd support is available])
else
AC_DEFINE(HAVE_SYSTEMD, 0, [Define if systemd support is available])
2010-09-01 22:25:03 +00:00
fi
2010-08-12 16:15:26 +00:00
2017-05-05 10:00:01 +00:00
PKG_CHECK_MODULES(SYSTEMD_200, [systemd >= 200], [have_systemd_200=yes], [have_systemd_200=no])
2013-05-15 12:37:25 +00:00
AM_CONDITIONAL(HAVE_SYSTEMD_200, test "${have_systemd_200}" = "yes")
2015-03-23 08:15:47 +00:00
# Hostname persist mode
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(hostname-persist,
AS_HELP_STRING([--with-hostname-persist=default|suse|gentoo|slackware],
[Hostname persist method]))
2015-03-23 08:15:47 +00:00
AS_IF([test "$with_hostname_persist" = "suse"], hostname_persist=suse)
AS_IF([test "$with_hostname_persist" = "gentoo"], hostname_persist=gentoo)
2016-03-24 19:09:44 +00:00
AS_IF([test "$with_hostname_persist" = "slackware"], hostname_persist=slackware)
2015-03-23 08:15:47 +00:00
AS_IF([test "$with_hostname_persist" = "default"], hostname_persist=default)
# if the method was not explicitly set, try to guess it from the enabled plugins
2017-12-20 09:22:40 +00:00
AS_IF([test -z "$hostname_persist" -a -f /etc/SuSE-release], hostname_persist=suse)
2017-12-20 09:42:41 +00:00
AS_IF([test -z "$hostname_persist" -a -f /etc/gentoo-release], hostname_persist=gentoo)
2016-03-24 19:09:44 +00:00
AS_IF([test -z "$hostname_persist" -a -f /etc/slackware-version], hostname_persist=slackware)
2015-03-23 08:15:47 +00:00
AS_IF([test -z "$hostname_persist"], hostname_persist=default)
if test "$hostname_persist" = suse; then
AC_DEFINE(HOSTNAME_PERSIST_SUSE, 1, [Enable SuSE hostname persist method])
elif test "$hostname_persist" = gentoo; then
AC_DEFINE(HOSTNAME_PERSIST_GENTOO, 1, [Enable Gentoo hostname persist method])
2016-03-24 19:09:44 +00:00
elif test "$hostname_persist" = slackware; then
AC_DEFINE(HOSTNAME_PERSIST_SLACKWARE, 1, [Enable Slackware hostname persist method])
2015-03-23 08:15:47 +00:00
fi
2016-06-10 21:56:23 +00:00
PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd >= 209],
2017-05-05 10:00:01 +00:00
[AC_DEFINE([HAVE_LIBSYSTEMD], 1, [Define to 1 if libsystemd is available])],
[AC_DEFINE([HAVE_LIBSYSTEMD], 0, [Define to 1 if libsystemd is available])])
2016-06-10 21:56:23 +00:00
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(systemd-journal,
AS_HELP_STRING([--with-systemd-journal=yes|no],
[Use systemd journal for logging]))
2015-07-08 14:19:18 +00:00
have_systemd_journal=no
if test "$with_systemd_journal" != "no"; then
2017-05-05 10:00:01 +00:00
PKG_CHECK_MODULES(SYSTEMD_JOURNAL, [libsystemd >= 209], [have_systemd_journal=yes],
2015-07-08 14:19:18 +00:00
[PKG_CHECK_MODULES(SYSTEMD_JOURNAL,
[libsystemd-journal],
[have_systemd_journal=yes],
[have_systemd_journal=no])])
if test "$have_systemd_journal" != "yes"; then
if test "$with_systemd_journal" = "yes"; then
AC_MSG_ERROR([Missing systemd-journald support])
fi
fi
fi
if test "$have_systemd_journal" = "yes"; then
AC_DEFINE([SYSTEMD_JOURNAL], 1, [Define to 1 if libsystemd-journald is available])
else
AC_DEFINE([SYSTEMD_JOURNAL], 0, [Define to 1 if libsystemd-journald is available])
fi
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(config-logging-backend-default,
AS_HELP_STRING([--with-config-logging-backend-default=backend],
[Default value for logging.backend]),
nm_config_logging_backend_default="$withval",
nm_config_logging_backend_default="")
2016-07-28 15:02:04 +00:00
2018-06-21 07:21:57 +00:00
if test "$nm_config_logging_backend_default" != 'syslog' \
-a "$nm_config_logging_backend_default" != 'journal'; then
2015-07-08 19:44:01 +00:00
# unknown backend. Reset to default. Silently accept the invalid value to
# be future proof.
nm_config_logging_backend_default=''
fi
if test "$nm_config_logging_backend_default" = ""; then
if test "$have_systemd_journal" = "yes"; then
logging: change logging format to drop "[file:line] func():" part
Choose a new logging format.
- the logging format must not be configurable and it must be the
same for all backends. It is neat that journal supports additional
fields, but an average user still posts the output of plain
journalctl, without "--output verbose" (which would also be hard
to read).
Also, we get used to a certain logging format, so having different
formats is confusing. If one format is better then another, it should
be used for all backends: syslog, journal and debug.
The only question is, what is the best format.
- the timestamp: I find it useful to see how much time between two
events passed. The timestamp printed by syslog doesn't have sufficient
granularity, and the internal journal fields are not readily available.
We used to print the timestamps for <error>, <debug> and <trace>,
but ommited them for <info> and <warn> levels. We now print them for
all levels, which has a uniform alignment.
- the location: the "[file:line] func():" part is mostly redundant
and results in wide lines. It also causes a misalignment of the
logging lines, or -- as I recently added alignment of the location --
it results in awkward whitespace and truncation.
But the location is really just necessary because our logging messages
are bad:
"<debug> [1456397604.038226] (9) 11-dhclient succeeded"
The solution to this is not
"<debug> [1456397604.038226] [nm-dispatcher.c:358] dispatcher_results_process(): (9) 11-dhclient succeeded"
but a properly worded message:
"<debug> [1456397604.038226] dispatcher: request #9, script 11-dhclient succeeded"
- logging-message: we need to write better logging messages.
I like some form of "tags" that are easy to grep:
"platform: signal: link changed: 4: ..."
Downside is, that this is not nice to read as a full sentence.
So, especially for <info> and <warn> logging, more human readable
messages are better.
We should find a compromise, where the log message explains what
happens, but is still concise and contains patterns that are easy
to grep and identify visually.
https://mail.gnome.org/archives/networkmanager-list/2016-February/msg00077.html
2016-02-25 16:21:29 +00:00
nm_config_logging_backend_default='journal'
2015-07-08 19:44:01 +00:00
else
nm_config_logging_backend_default='syslog'
fi
fi
2016-11-25 13:17:30 +00:00
AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_LOGGING_BACKEND, "$nm_config_logging_backend_default", [Default configuration option for logging.backend])
NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT="$nm_config_logging_backend_default"
AC_SUBST(NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT)
2015-07-08 19:44:01 +00:00
2013-07-30 21:09:52 +00:00
# Session tracking support
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(systemd-logind,
AS_HELP_STRING([--with-systemd-logind=yes|no],
[Support systemd session tracking]))
AC_ARG_WITH(consolekit,
AS_HELP_STRING([--with-consolekit=yes|no],
[Support consolekit session tracking]))
AC_ARG_WITH(session-tracking,
AS_HELP_STRING([--with-session-tracking=systemd|elogind|consolekit|no],
[Compatibility option to choose one session tracking module]))
2013-07-30 21:09:52 +00:00
# backwards compatibility
2017-02-24 11:37:34 +00:00
AS_IF([test "$with_session_tracking" = "ck"], [use_consolekit="yes" use_systemd_logind="no" use_elogind="no"])
AS_IF([test "$with_session_tracking" = "consolekit"], [use_consolekit="yes" use_systemd_logind="no" use_elogind="no"])
AS_IF([test "$with_session_tracking" = "systemd"], [use_consolekit="no" use_systemd_logind="yes" use_elogind="no"])
AS_IF([test "$with_session_tracking" = "elogind"], [use_consolekit="no" use_systemd_logind="no" use_elogind="yes"])
AS_IF([test "$with_session_tracking" = "no"], [use_consolekit="no" use_systemd_logind="no" use_elogind="no"])
AS_IF([test "$with_session_tracking" = "none"], [use_consolekit="no" use_systemd_logind="no" use_elogind="no"])
2015-01-06 14:07:02 +00:00
# current options
AS_IF([test -n "$with_systemd_logind" ], [use_systemd_logind="$with_systemd_logind"])
AS_IF([test -n "$with_consolekit" ], [use_consolekit="$with_consolekit"])
# defaults
2015-05-17 18:16:36 +00:00
AS_IF([test -z "$use_systemd_logind"], [use_systemd_logind="auto"])
2015-01-06 14:07:02 +00:00
AS_IF([test -z "$use_consolekit"], [use_consolekit="yes"])
2013-07-30 21:09:52 +00:00
# output
session_tracking=
2015-05-17 18:16:36 +00:00
if test "$use_systemd_logind" = "yes" -o "$use_systemd_logind" = "auto"; then
2017-05-05 10:00:01 +00:00
PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd], [have_systemd_logind=yes], [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login], [have_systemd_logind=yes], [have_systemd_logind=no])])
2015-05-17 18:16:36 +00:00
else
2017-05-05 10:00:01 +00:00
have_systemd_logind=no
2015-05-17 18:16:36 +00:00
fi
if test "$use_systemd_logind" = "yes" -a "$have_systemd_logind" = "no"; then
2017-05-05 10:00:01 +00:00
AC_MSG_ERROR([You must have libsystemd installed to build with systemd-logind support.])
2015-05-17 18:16:36 +00:00
fi
if test "$have_systemd_logind" = "yes"; then
2017-05-05 10:00:01 +00:00
AC_DEFINE([SESSION_TRACKING_SYSTEMD], 1, [Define to 1 if libsystemd-login is available])
session_tracking="$session_tracking, systemd-logind"
2018-08-26 18:14:35 +00:00
else
AC_DEFINE([SESSION_TRACKING_SYSTEMD], 0, [Define to 1 if libsystemd-login is available])
2012-11-23 21:01:25 +00:00
fi
2017-02-24 11:37:34 +00:00
2017-02-24 11:58:55 +00:00
if test "$use_elogind" = "yes" -a "$have_systemd_logind" = "yes"; then
2017-05-05 10:00:01 +00:00
AC_MSG_ERROR([Cannot enable systemd-logind together with elogind.])
2017-02-24 11:58:55 +00:00
fi
if test "$use_elogind" = "yes"; then
2017-05-05 10:00:01 +00:00
PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libelogind], [have_elogind=yes], [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libelogind], [have_elogind=yes], [have_elogind=no])])
2017-02-24 11:37:34 +00:00
else
2017-05-05 10:00:01 +00:00
have_elogind=no
2017-02-24 11:37:34 +00:00
fi
if test "$use_elogind" = "yes" -a "$have_elogind" = "no"; then
2017-05-05 10:00:01 +00:00
AC_MSG_ERROR([You must have libelogind installed to build with elogind support.])
2017-02-24 11:37:34 +00:00
fi
if test "$have_elogind" = "yes"; then
2017-05-05 10:00:01 +00:00
AC_DEFINE([SESSION_TRACKING_ELOGIND], 1, [Define to 1 if libelogin is available])
session_tracking="$session_tracking, elogind"
2018-08-26 18:14:35 +00:00
else
AC_DEFINE([SESSION_TRACKING_ELOGIND], 0, [Define to 1 if libelogin is available])
2017-02-24 11:37:34 +00:00
fi
2015-01-06 14:07:02 +00:00
if test "$use_consolekit" = "yes"; then
2013-07-30 21:09:52 +00:00
AC_DEFINE([SESSION_TRACKING_CONSOLEKIT], 1, [Define to 1 if ConsoleKit is available])
session_tracking="$session_tracking, consolekit"
2018-08-26 18:14:35 +00:00
else
AC_DEFINE([SESSION_TRACKING_CONSOLEKIT], 0, [Define to 1 if ConsoleKit is available])
2011-12-24 01:07:07 +00:00
fi
2015-03-02 08:01:22 +00:00
session_tracking="$(printf '%s' "${session_tracking}" | sed 's/^, //')"
2011-12-24 01:07:07 +00:00
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(suspend-resume,
AS_HELP_STRING([--with-suspend-resume=upower|systemd|elogind|consolekit],
[Build NetworkManager with specific suspend/resume support]))
2012-11-06 20:22:44 +00:00
if test "z$with_suspend_resume" = "z"; then
2017-05-05 10:00:01 +00:00
PKG_CHECK_EXISTS([libsystemd >= 209], [have_systemd_inhibit=yes],
[PKG_CHECK_EXISTS([libsystemd-login >= 183], [have_systemd_inhibit=yes], [have_systemd_inhibit=no])])
if test "z${have_systemd_inhibit}" = "zyes"; then
# Use systemd if it's new enough
with_suspend_resume="systemd"
else
PKG_CHECK_EXISTS([libelogind >= 219], [have_elogind_inhibit=yes],
[PKG_CHECK_EXISTS([libelogind >= 219], [have_elogind_inhibit=yes], [have_elogind_inhibit=no])])
if test "z${have_elogind_inhibit}" = "zyes"; then
# Use elogind if it's new enough
with_suspend_resume="elogind"
else
if test "$use_consolekit" = "yes"; then
# Use consolekit suspend if session tracking is consolekit
with_suspend_resume="consolekit"
else
# Fall back to upower
with_suspend_resume="upower"
fi
fi
fi
2017-02-24 11:37:34 +00:00
fi
2012-11-06 20:22:44 +00:00
case $with_suspend_resume in
2017-05-05 10:00:01 +00:00
upower)
AC_DEFINE([SUSPEND_RESUME_UPOWER], 1, [Define to 1 to use UPower suspend api])
;;
systemd)
PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd >= 209],,
[PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])])
AC_DEFINE([SUSPEND_RESUME_SYSTEMD], 1, [Define to 1 to use systemd suspend api])
;;
elogind)
PKG_CHECK_MODULES(ELOGIND_INHIBIT, [libelogind >= 219],,
[PKG_CHECK_MODULES(ELOGIND_INHIBIT, [libelogind >= 219])])
AC_DEFINE([SUSPEND_RESUME_ELOGIND], 1, [Define to 1 to use elogind suspend api])
;;
consolekit)
AC_DEFINE([SUSPEND_RESUME_CONSOLEKIT], 1, [Define to 1 to use ConsoleKit2 suspend api])
;;
*)
AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd, elogind, consolekit])
;;
2012-11-06 20:22:44 +00:00
esac
2018-09-04 06:25:07 +00:00
# eBPF support
AC_ARG_WITH(ebpf,
2018-09-19 14:38:38 +00:00
AS_HELP_STRING([--with-ebpf=yes|no|auto], [Build with eBPF support (default: auto)]),
[], [with_ebpf=auto])
if test "$with_ebpf" = "yes" -o "$with_ebpf" = "auto"; then
AC_CHECK_HEADER(linux/bpf.h, [have_ebpf=yes], [have_ebpf=no])
else
have_ebpf=no
fi
if test "$with_ebpf" = "yes" -a "$have_ebpf" = "no"; then
AC_MSG_ERROR([--with-ebpf=yes requires eBPF kernel header])
2018-09-04 06:25:07 +00:00
fi
2018-09-19 14:38:38 +00:00
AM_CONDITIONAL(WITH_EBPF, test "${have_ebpf}" = "yes")
2018-09-04 06:25:07 +00:00
2014-03-25 12:55:47 +00:00
# SELinux support
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(selinux,
AS_HELP_STRING([--with-selinux=yes|no|auto], [Build with SELinux (default: auto)]),
[], [with_selinux=auto])
2014-03-25 12:55:47 +00:00
if test "$with_selinux" = "yes" -o "$with_selinux" = "auto"; then
2017-05-05 10:00:01 +00:00
PKG_CHECK_MODULES(SELINUX, libselinux, [have_selinux=yes], [have_selinux=no])
2014-03-25 12:55:47 +00:00
else
2017-05-05 10:00:01 +00:00
have_selinux=no
2014-03-25 12:55:47 +00:00
fi
if test "$with_selinux" = "yes" -a "$have_selinux" = "no"; then
2017-05-05 10:00:01 +00:00
AC_MSG_ERROR([You must have libselinux installed to build --with-selinux=yes.])
2014-03-25 12:55:47 +00:00
fi
if test "$have_selinux" = "yes"; then
2017-05-05 10:00:01 +00:00
AC_DEFINE(HAVE_SELINUX, 1, [Define if you have SELinux support])
2014-03-25 12:55:47 +00:00
else
2017-05-05 10:00:01 +00:00
AC_DEFINE(HAVE_SELINUX, 0, [Define if you have SELinux support])
2014-03-25 12:55:47 +00:00
fi
2015-07-20 16:33:35 +00:00
# libaudit support
2015-08-04 11:11:36 +00:00
AC_ARG_WITH(libaudit, AS_HELP_STRING([--with-libaudit=yes|yes-disabled-by-default|no|auto], [Build with audit daemon support (default: auto). yes-disabled-by-default enables support, but disables it unless explicitly configured via NetworkManager.conf]),,[with_libaudit=auto])
2015-08-04 12:04:55 +00:00
if test "$with_libaudit" = "yes" -o "$with_libaudit" = "yes-disabled-by-default" -o "$with_libaudit" = "auto"; then
2017-05-05 10:00:01 +00:00
PKG_CHECK_MODULES(LIBAUDIT, audit, [have_libaudit=yes], [have_libaudit=no])
if test "$with_libaudit" != "auto" -a "$have_libaudit" = "no"; then
AC_MSG_ERROR([You must have libaudit installed to build --with-libaudit=$with_libaudit.])
fi
2015-07-20 16:33:35 +00:00
else
2017-05-05 10:00:01 +00:00
have_libaudit=no
2015-07-20 16:33:35 +00:00
fi
if test "$have_libaudit" = "yes"; then
2017-05-05 10:00:01 +00:00
AC_DEFINE(HAVE_LIBAUDIT, 1, [Define if you have libaudit support])
if test "$with_libaudit" = "yes-disabled-by-default"; then
AC_DEFINE(NM_CONFIG_DEFAULT_LOGGING_AUDIT, "false", [The default value of the logging.audit configuration option])
NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT='false'
else
AC_DEFINE(NM_CONFIG_DEFAULT_LOGGING_AUDIT, "true", [The default value of the logging.audit configuration option])
NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT='true'
fi
2015-07-20 16:33:35 +00:00
else
2017-05-05 10:00:01 +00:00
AC_DEFINE(HAVE_LIBAUDIT, 0, [Define if you have libaudit support])
AC_DEFINE(NM_CONFIG_DEFAULT_LOGGING_AUDIT, "false", [The default value of the logging.audit configuration option])
NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT='false'
2015-07-20 16:33:35 +00:00
fi
2015-08-04 11:11:36 +00:00
AC_SUBST(NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT)
2015-07-20 16:33:35 +00:00
2013-01-23 09:18:59 +00:00
# uuid library
2008-08-27 02:57:21 +00:00
PKG_CHECK_MODULES(UUID, uuid)
2013-08-16 13:33:46 +00:00
# Teamd control checks
2017-02-22 16:14:28 +00:00
2018-01-02 14:41:05 +00:00
PKG_CHECK_MODULES(JANSSON, [jansson >= 2.5], [have_jansson=yes], [have_jansson=no])
2017-11-13 15:16:39 +00:00
if test "$have_jansson" = "yes"; then
AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled])
2017-12-26 08:28:54 +00:00
AC_CHECK_TOOLS(READELF, [eu-readelf readelf])
JANSSON_LIBDIR=`$PKG_CONFIG --variable=libdir jansson`
JANSSON_SONAME=`$READELF -d $JANSSON_LIBDIR/libjansson.so |sed -n 's/.*SONAME.*\[[\([^]]*\)]]/\1/p'`
if test "$JANSSON_SONAME" = ""; then
AC_MSG_ERROR(Unable to locate the Jansson library)
fi
AC_DEFINE_UNQUOTED(JANSSON_SONAME, "$JANSSON_SONAME", [Define to path to the Jansson shared library])
2017-11-13 15:16:39 +00:00
else
AC_DEFINE(WITH_JANSSON, 0, [Define if JANSSON is enabled])
fi
AM_CONDITIONAL(WITH_JANSSON, test "${have_jansson}" = "yes")
2014-02-27 15:13:20 +00:00
PKG_CHECK_MODULES(LIBTEAMDCTL, [libteamdctl >= 1.9], [have_teamdctl=yes],[have_teamdctl=no])
2017-02-21 15:26:49 +00:00
if test "$have_jansson" = "yes" -a "$have_teamdctl" = "yes"; then
have_team_prereq=yes
else
have_team_prereq=no
fi
Revert "Makefile: rework team compilation flags"
I don't think we should do this.
- renamining/dropping configure options is still an annoyance,
because it requires to different ./configure options depending
on the version. The rename from --enable-teamctl to --enable-team
might be theoretically nice, but more annoying then helpful.
- There is no strict dependency between --enable-team and
--enable-json-validation. At most, one could argue that
when enabling the team plugin (--enable-teamctl), then
libnm must also be build with --enable-json-validation.
But in fact, the team plugin will happily work with a
libnm that doesn't link against libjansson.
That is --enable-teamctl --disable-json-validation will work
in practice just fine.
On the other hand, libnm is a client library to create connection
profiles, fully supporting team profiles also makes sense if the
actual plugin is not installed (or build). Thus, --disable-teamctl
--enable-json-validation certainly makes sense.
At this point, one might ask whether libnm is even still complete without
libjansson. Maybe libnm should *require* --enable-json-validation.
But that is not what the patch was doing, and it would also need
some careful consideration before doing so.
This reverts commit 9d5cd7eae8edc8c558d26f04ffd163effafe57f9.
2017-12-08 07:56:46 +00:00
AC_ARG_ENABLE(teamdctl,
AS_HELP_STRING([--enable-teamdctl], [enable Teamd control support]),
[enable_teamdctl=${enableval}], [enable_teamdctl=${have_team_prereq}])
if (test "${enable_teamdctl}" = "yes"); then
2017-02-21 15:26:49 +00:00
if test "$have_teamdctl" = "no"; then
AC_MSG_ERROR(Libteamdctl is required for team support)
fi
if test "$have_jansson" = "no"; then
AC_MSG_ERROR(Jansson is required for team support)
2013-08-16 13:33:46 +00:00
fi
# temporary bug workaround
LIBTEAMDCTL_CFLAGS=`echo $LIBTEAMDCTL_CFLAGS | sed -e 's:/teamdctl.h::'`
Revert "Makefile: rework team compilation flags"
I don't think we should do this.
- renamining/dropping configure options is still an annoyance,
because it requires to different ./configure options depending
on the version. The rename from --enable-teamctl to --enable-team
might be theoretically nice, but more annoying then helpful.
- There is no strict dependency between --enable-team and
--enable-json-validation. At most, one could argue that
when enabling the team plugin (--enable-teamctl), then
libnm must also be build with --enable-json-validation.
But in fact, the team plugin will happily work with a
libnm that doesn't link against libjansson.
That is --enable-teamctl --disable-json-validation will work
in practice just fine.
On the other hand, libnm is a client library to create connection
profiles, fully supporting team profiles also makes sense if the
actual plugin is not installed (or build). Thus, --disable-teamctl
--enable-json-validation certainly makes sense.
At this point, one might ask whether libnm is even still complete without
libjansson. Maybe libnm should *require* --enable-json-validation.
But that is not what the patch was doing, and it would also need
some careful consideration before doing so.
This reverts commit 9d5cd7eae8edc8c558d26f04ffd163effafe57f9.
2017-12-08 07:56:46 +00:00
fi
AM_CONDITIONAL(WITH_TEAMDCTL, test "${enable_teamdctl}" = "yes")
# Jansson for team configuration validation
AC_ARG_ENABLE(json-validation,
AS_HELP_STRING([--enable-json-validation], [Enable JSON validation in libnm]),
[enable_json_validation=${enableval}],
[enable_json_validation=${have_jansson}])
if (test "${enable_json_validation}" == "no"); then
AC_DEFINE(WITH_JSON_VALIDATION, 0, [Define if JSON validation in libnm is enabled])
else
if test "$have_jansson" = "no"; then
AC_MSG_ERROR([jansson is needed for team configuration validation. Use --disable-json-validation to build without it.])
fi
AC_DEFINE(WITH_JSON_VALIDATION, 1, [Define if JSON validation in libnm is enabled])
2016-03-11 12:17:24 +00:00
fi
2017-12-08 10:08:29 +00:00
AM_CONDITIONAL(WITH_JSON_VALIDATION, test "${enable_json_validation}" != "no")
2016-03-11 12:17:24 +00:00
2014-08-19 16:56:23 +00:00
# we usually compile with polkit support. --enable-polkit=yes|no only sets the
# default configuration for main.auth-polkit. User can always enable/disable polkit
2018-09-15 11:20:54 +00:00
# authorization via config.
2017-05-05 10:00:01 +00:00
AC_ARG_ENABLE(polkit,
auth-manager: always compile D-Bus calls to polkit
Supporting PolicyKit required no additional library, just extra code
to handle the D-Bus calls. For that, there was a compile time option
to even stip out that code. Note, that you could (and still can)
configure the system not to use policy-kit. The point was to reduce
the binary size in case you don't need it.
Remove this. I guess, we we aim for such aggressive optimization of
the binary size, we should instead make all device types disablable
at configuration time. We don't do that either and other low hanging
fruits, because it's better to always enable features, unless they
require external dependencies.
Also, the next commit will make more use of NMAuthManager. So, having
it disabled at compile time, makes even less sense.
2018-04-09 16:13:28 +00:00
AS_HELP_STRING([--enable-polkit=yes|no],
[set default value for auth-polkit configuration option. This value can be overwritten by NM configuration. 'disabled' is an alias for 'no']),
2017-05-05 10:00:01 +00:00
[enable_polkit=${enableval}], [enable_polkit=yes])
2014-08-19 16:56:23 +00:00
if (test "${enable_polkit}" != "no" -a "${enable_polkit}" != "disabled"); then
auth-manager: always compile D-Bus calls to polkit
Supporting PolicyKit required no additional library, just extra code
to handle the D-Bus calls. For that, there was a compile time option
to even stip out that code. Note, that you could (and still can)
configure the system not to use policy-kit. The point was to reduce
the binary size in case you don't need it.
Remove this. I guess, we we aim for such aggressive optimization of
the binary size, we should instead make all device types disablable
at configuration time. We don't do that either and other low hanging
fruits, because it's better to always enable features, unless they
require external dependencies.
Also, the next commit will make more use of NMAuthManager. So, having
it disabled at compile time, makes even less sense.
2018-04-09 16:13:28 +00:00
enable_polkit=true
2016-11-25 13:17:30 +00:00
AC_DEFINE(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT, "true", [The default value of the auth-polkit configuration option])
AC_SUBST(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT, true)
2011-05-19 03:38:39 +00:00
else
auth-manager: always compile D-Bus calls to polkit
Supporting PolicyKit required no additional library, just extra code
to handle the D-Bus calls. For that, there was a compile time option
to even stip out that code. Note, that you could (and still can)
configure the system not to use policy-kit. The point was to reduce
the binary size in case you don't need it.
Remove this. I guess, we we aim for such aggressive optimization of
the binary size, we should instead make all device types disablable
at configuration time. We don't do that either and other low hanging
fruits, because it's better to always enable features, unless they
require external dependencies.
Also, the next commit will make more use of NMAuthManager. So, having
it disabled at compile time, makes even less sense.
2018-04-09 16:13:28 +00:00
enable_polkit=false
2016-11-25 13:17:30 +00:00
AC_DEFINE(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT, "false", [The default value of the auth-polkit configuration option])
AC_SUBST(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT, false)
2011-05-19 03:38:39 +00:00
fi
2008-05-12 02:49:54 +00:00
2014-10-29 12:18:40 +00:00
PKG_CHECK_MODULES(POLKIT, [polkit-agent-1 >= 0.97], [have_pk_agent=yes],[have_pk_agent=no])
2017-05-05 10:00:01 +00:00
AC_ARG_ENABLE(polkit-agent,
AS_HELP_STRING([--enable-polkit-agent], [enable polkit agent for clients]),
[enable_polkit_agent=${enableval}], [enable_polkit_agent=${have_pk_agent}])
2014-10-29 12:18:40 +00:00
if (test "${enable_polkit_agent}" = "yes"); then
if test x"$have_pk_agent" = x"no"; then
AC_MSG_ERROR(Polkit agent is required)
fi
AC_DEFINE(WITH_POLKIT_AGENT, 1, [Define if you have polkit agent])
else
AC_DEFINE(WITH_POLKIT_AGENT, 0, [Define if you have polkit agent])
fi
AM_CONDITIONAL(WITH_POLKIT_AGENT, test "${enable_polkit_agent}" = "yes")
2017-05-05 10:00:01 +00:00
AC_ARG_ENABLE(modify-system, AS_HELP_STRING([--enable-modify-system], [Allow users to modify system connections]))
2012-09-28 12:45:05 +00:00
if test "${enable_modify_system}" = "yes"; then
NM_MODIFY_SYSTEM_POLICY="yes"
else
NM_MODIFY_SYSTEM_POLICY="auth_admin_keep"
fi
AC_SUBST(NM_MODIFY_SYSTEM_POLICY)
2018-08-30 06:30:19 +00:00
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')
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(crypto,
AS_HELP_STRING([--with-crypto=nss|gnutls],
[Cryptography library to use for certificate and key operations]),
2018-05-23 12:37:14 +00:00
with_crypto=$withval,
with_crypto=nss)
if test "$with_crypto" = 'nss'; then
2018-08-30 06:30:19 +00:00
if test "${have_crypto_nss}" != "yes"; then
AC_MSG_ERROR([No usable NSS found for --with-crypto=nss])
2017-05-05 10:00:01 +00:00
fi
2018-05-23 12:37:14 +00:00
elif test "$with_crypto" = 'gnutls'; then
2018-08-30 06:30:19 +00:00
if test "${have_crypto_gnutls}" != "yes"; then
AC_MSG_ERROR([No usable gnutls found for --with-crypto=gnutls])
fi
2008-05-19 07:43:13 +00:00
else
2017-05-05 10:00:01 +00:00
AC_MSG_ERROR([Please choose either 'nss' or 'gnutls' for certificate and crypto operations])
2008-05-19 07:43:13 +00:00
fi
2018-05-23 12:37:14 +00:00
AM_CONDITIONAL(WITH_NSS, test "$with_crypto" = 'nss')
AM_CONDITIONAL(WITH_GNUTLS, test "$with_crypto" = 'gnutls')
2008-05-19 07:43:13 +00:00
2012-02-08 17:56:52 +00:00
GLIB_MAKEFILE='$(top_srcdir)/Makefile.glib'
AC_SUBST(GLIB_MAKEFILE)
2015-04-28 08:26:20 +00:00
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
2012-02-08 17:56:52 +00:00
AC_SUBST(GLIB_MKENUMS)
2006-03-05 Dan Williams <dcbw@redhat.com>
Process netlink messages in device subclasses rather than in
NetworkManager.c. Also add support for recognizing Wireless Events.
* configure.in
- Find GLIB_GENMARSHAL
* src/Makefile.am
- Since we're marshalling custom types for wireless event signals,
we get to create our own marshallers using GLIB_GENMARSHAL
* src/NetworkManager.c
- (nm_monitor_wired_link_state): renamed to nm_monitor_setup
- (nm_monitor_setup): renamed from nm_monitor_wired_link_state, and
cut down somewhat. We no longer process signals here.
- (nm_data_new): create the netlink monitor here, and remove a
useless call to nm_policy_schedule_device_change_check()
- (nm_data_free): get rid of the netlink monitor here
- (nm_device_link_activated, nm_device_link_deactivated): removed
- (main): don't create the netlink monitor here, let nm_data_new
do that. Call nm_policy_schedule_device_change_check() right
before we jump to the mainloop to figure out which device
to use first
* src/NetworkManagerSystem.[ch]
- (nm_system_get_rtnl_index_from_iface, nm_system_get_iface_from_rtnl_index):
convert back and forth from interface names to interface
indexes
* src/nm-device-802-11-wireless.c
- (real_init): connect to wireless-event signals from the netlink
monitor object
- (nm_device_802_11_wireless_event): new function, schedule handler
for wireless event signals from the netlink monitor object. We
want the handler to run in the device's context
- (wireless_event_helper): handle wireless-event signals from netlink
- (nm_device_802_11_wireless_dispose): disconnect wireless-event
signal handler
* src/nm-device-802-11-wireless.h
- remove unused prototype for nm_device_802_11_wireless_new
* src/nm-device-802-3-ethernet.c
- (real_init): new function; set up signal handlers for link events
- (nm_device_802_3_ethernet_link_activated): new function, schedule
handler for netlink link activated events on device's main loop
- (link_activated_helper): when we get a link activated event, set
the device's link to be active
- (nm_device_802_3_ethernet_link_deactivated): new function; schedule
handler for netlink link deactivated events on device's main loop
- (link_deactivated_helper): when we get a link deactivated event, set
the device's link to be inactive
- (nm_device_802_3_ethernet_dispose): disconnect signal handler on
dispose
* src/nm-device-802-3-ethernet.h
- remove unused prototype for nm_device_802_3_ethernet_new
* src/nm-device.[ch]
- (nm_get_device_by_iface_locked): variant of nm_get_device_by_iface
but locks the device list
- (nm_device_set_active_link): a little bit of cleanup and de-indenting
* src/nm-netlink-monitor.[ch]
- (nm_netlink_monitor_class_install_signals): New signal
"wireless-event"
- (nm_netlink_monitor_new): keep reference to NMData so we can get
at the device list
- (nm_netlink_monitor_event_handler): expand for wireless events too
* src/nm-marshal-main.c
- Include generated nm-marshal.c and nm-marshal.h
* src/nm-marshal.list
- List of custom marshal functions
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1555 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2006-03-06 01:10:58 +00:00
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(dbus-sys-dir,
AS_HELP_STRING([--with-dbus-sys-dir=DIR], [where D-BUS system.d directory is]))
2004-07-28 18:04:23 +00:00
2007-12-18 02:43:42 +00:00
if test -n "$with_dbus_sys_dir" ; then
2017-05-05 10:00:01 +00:00
DBUS_SYS_DIR="$with_dbus_sys_dir"
2004-07-28 18:04:23 +00:00
else
2017-05-05 10:00:01 +00:00
DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
2004-07-28 18:04:23 +00:00
fi
AC_SUBST(DBUS_SYS_DIR)
2011-02-21 23:48:08 +00:00
# pppd
2017-05-05 10:00:01 +00:00
AC_ARG_ENABLE(ppp,
AS_HELP_STRING([--enable-ppp], [enable PPP/PPPoE support]),
[enable_ppp=${enableval}], [enable_ppp=yes])
2011-02-21 23:48:08 +00:00
if (test "${enable_ppp}" = "yes"); then
AC_CHECK_HEADERS(pppd/pppd.h,,
2017-05-05 10:00:01 +00:00
AC_MSG_ERROR("couldn't find pppd.h. pppd development headers are required."))
2011-02-21 23:48:08 +00:00
AC_DEFINE(WITH_PPP, 1, [Define if you have PPP support])
2011-04-14 18:16:55 +00:00
else
AC_DEFINE(WITH_PPP, 0, [Define if you have PPP support])
2011-02-21 23:48:08 +00:00
fi
AM_CONDITIONAL(WITH_PPP, test "${enable_ppp}" = "yes")
2007-08-15 14:30:06 +00:00
2017-05-05 10:00:01 +00:00
AC_ARG_WITH([pppd-plugin-dir],
AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory]))
2007-12-18 02:43:42 +00:00
if test -n "$with_pppd_plugin_dir" ; then
PPPD_PLUGIN_DIR="$with_pppd_plugin_dir"
else
2010-04-27 06:56:01 +00:00
PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.5"
2007-12-18 02:43:42 +00:00
fi
AC_SUBST(PPPD_PLUGIN_DIR)
2007-08-15 14:30:06 +00:00
2014-04-04 15:19:40 +00:00
AC_ARG_WITH(pppd, AS_HELP_STRING([--with-pppd=/path/to/pppd], [path to pppd binary]))
if test "x${with_pppd}" = x; then
2017-05-05 10:00:01 +00:00
AC_PATH_PROG(PPPD_PATH, pppd, [], $PATH:/sbin:/usr/sbin)
2014-04-04 15:19:40 +00:00
else
2017-05-05 10:00:01 +00:00
PPPD_PATH="$with_pppd"
2014-04-04 15:19:40 +00:00
fi
AC_DEFINE_UNQUOTED(PPPD_PATH, "$PPPD_PATH", [Define to path of pppd binary])
AC_SUBST(PPPD_PATH)
2012-11-07 14:40:35 +00:00
# ModemManager1 with libmm-glib
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(modem-manager-1,
AS_HELP_STRING([--with-modem-manager-1],
[Enable new ModemManager1 interface support]),
[], [with_modem_manager_1=auto])
2012-11-07 14:40:35 +00:00
if (test "${with_modem_manager_1}" != "no"); then
2017-05-05 10:00:01 +00:00
PKG_CHECK_MODULES(MM_GLIB,
[mm-glib >= 0.7.991],
[have_libmm_glib=yes],
[have_libmm_glib=no])
if (test "${have_libmm_glib}" = "no"); then
if (test "${with_modem_manager_1}" = "yes"); then
AC_MSG_ERROR([Couldn't find libmm-glib])
else
with_modem_manager_1="no"
fi
else
with_modem_manager_1="yes"
fi
2012-11-07 14:40:35 +00:00
fi
AM_CONDITIONAL(WITH_MODEM_MANAGER_1, test "${with_modem_manager_1}" = "yes")
2011-02-21 23:48:08 +00:00
2014-10-01 08:59:13 +00:00
# Bluez5 DUN support
PKG_CHECK_MODULES(BLUEZ5, [bluez >= 5], [have_bluez5=yes],[have_bluez5=no])
2017-05-05 10:00:01 +00:00
AC_ARG_ENABLE(bluez5-dun,
AS_HELP_STRING([--enable-bluez5-dun], [enable Bluez5 DUN support]),
[enable_bluez5_dun=${enableval}], [enable_bluez5_dun=${have_bluez5}])
2014-10-01 08:59:13 +00:00
if (test "${enable_bluez5_dun}" = "yes"); then
if test x"$have_bluez5" = x"no"; then
AC_MSG_ERROR(Bluez 5.x development headers are required)
fi
AC_DEFINE(WITH_BLUEZ5_DUN, 1, [Define if you have Bluez 5 libraries])
else
2014-11-12 15:48:08 +00:00
AC_DEFINE(WITH_BLUEZ5_DUN, 0, [Define if you have Bluez 5 libraries])
2014-10-01 08:59:13 +00:00
fi
AM_CONDITIONAL(WITH_BLUEZ5_DUN, test "${enable_bluez5_dun}" = "yes")
2016-06-10 21:56:25 +00:00
# OFONO
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(ofono,
AS_HELP_STRING([--with-ofono], [Enable oFono support (experimental)]),
[], [with_ofono=no])
2016-06-10 21:56:25 +00:00
if (test "${with_ofono}" = "yes"); then
2016-06-17 11:17:11 +00:00
AC_DEFINE(WITH_OFONO, 1, [Define if you have oFono support (experimental)])
2016-06-10 21:56:25 +00:00
else
2016-06-17 11:17:11 +00:00
AC_DEFINE(WITH_OFONO, 0, [Define if you have oFono support (experimental)])
2016-06-10 21:56:25 +00:00
fi
AM_CONDITIONAL(WITH_OFONO, test "${with_ofono}" = "yes")
2017-10-05 14:44:08 +00:00
# DHCP client support with dhcpcanon
AC_ARG_WITH([dhcpcanon],
AS_HELP_STRING([--with-dhcpcanon=yes|no|path], [Enable dhcpcanon support (experimental)]))
if test "$with_dhcpcanon" != "no"; then
with_dhcpcanon_="$with_dhcpcanon"
AC_PATH_PROGS(with_dhcpcanon, dhcpcanon, no, /sbin:/usr/sbin:/usr/local/sbin:/usr/bin:/usr/local/bin)
if test "$with_dhcpcanon" == "no"; then
if test "$with_dhcpcanon_" == yes; then
AC_MSG_WARN([dhcpcanon not found, assume path /sbin/dhcpcanon])
with_dhcpcanon=/sbin/dhcpcanon
fi
fi
fi
if test "$with_dhcpcanon" != "no"; then
AC_DEFINE(WITH_DHCPCANON, 1, [Define if you have dhcpcanon])
2018-09-07 14:55:54 +00:00
AC_DEFINE_UNQUOTED(DHCPCANON_PATH, "$with_dhcpcanon", [Define path to dhcpcanon])
2017-10-05 14:44:08 +00:00
else
AC_DEFINE(WITH_DHCPCANON, 0, [Define if you have dhcpcanon])
fi
2017-08-01 16:27:22 +00:00
2018-11-28 08:58:44 +00:00
# Open vSwitch integration
AC_ARG_ENABLE(ovs, AS_HELP_STRING([--enable-ovs], [enable Open vSwitch support]))
2017-08-01 16:27:22 +00:00
if test "${enable_ovs}" != "no"; then
enable_ovs='yes'
if test "$have_jansson" = "no"; then
AC_MSG_ERROR(Jansson is required for ovs support)
fi
fi
AM_CONDITIONAL(WITH_OPENVSWITCH, test "${enable_ovs}" = "yes")
2012-10-29 23:31:51 +00:00
# DHCP client support
2017-05-05 10:00:01 +00:00
AC_ARG_WITH([dhclient],
2018-09-07 14:53:40 +00:00
AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable dhclient support]))
2016-10-01 14:19:24 +00:00
if test "$with_dhclient" != "no"; then
with_dhclient_="$with_dhclient"
2012-10-29 23:31:51 +00:00
AC_PATH_PROGS(with_dhclient, dhclient, no, /sbin:/usr/sbin:/usr/local/sbin)
2016-10-01 14:19:24 +00:00
if test "$with_dhclient" == "no"; then
if test "$with_dhclient_" == yes; then
AC_MSG_WARN([dhclient not found, assume path /usr/sbin/dhclient])
with_dhclient=/usr/sbin/dhclient
fi
2012-10-29 23:31:51 +00:00
fi
fi
2016-10-01 14:19:24 +00:00
if test "$with_dhclient" != "no"; then
AC_DEFINE(WITH_DHCLIENT, 1, [Define if you have dhclient])
2018-09-07 14:55:54 +00:00
AC_DEFINE_UNQUOTED(DHCLIENT_PATH, "$with_dhclient", [Define path to dhclient])
2016-10-01 14:19:24 +00:00
else
AC_DEFINE(WITH_DHCLIENT, 0, [Define if you have dhclient])
fi
2017-05-05 10:00:01 +00:00
AC_ARG_WITH([dhcpcd],
AS_HELP_STRING([--with-dhcpcd=yes|no|path], [Enable dhcpcd 4.x support]))
2016-10-01 14:19:24 +00:00
if test "$with_dhcpcd" != "no"; then
with_dhcpcd_="$with_dhcpcd"
2012-10-29 23:31:51 +00:00
AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin)
2016-10-01 14:19:24 +00:00
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
2012-10-29 23:31:51 +00:00
fi
fi
fi
if test "$with_dhcpcd" != "no"; then
2016-10-01 14:19:24 +00:00
AC_DEFINE(WITH_DHCPCD, 1, [Define if you have dhcpcd])
2018-09-07 14:55:54 +00:00
AC_DEFINE_UNQUOTED(DHCPCD_PATH, "$with_dhcpcd", [Define path to dhcpcd])
2014-07-31 19:02:22 +00:00
else
2016-10-01 14:19:24 +00:00
AC_DEFINE(WITH_DHCPCD, 0, [Define if you have dhcpcd])
2008-07-16 20:39:58 +00:00
fi
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(config-dhcp-default,
AS_HELP_STRING([--with-config-dhcp-default=dhclient|dhcpcd|internal],
[Default configuration option for main.dhcp setting, used as fallback if the configuration option is unset]),
[config_dhcp_default="$withval"], [config_dhcp_default=""])
2016-10-14 09:00:16 +00:00
if test "$config_dhcp_default" = yes -o "$config_dhcp_default" = no; then
config_dhcp_default=''
fi
2017-10-05 14:44:08 +00:00
test -z "$config_dhcp_default" -a "$with_dhcpcanon" != "no" && config_dhcp_default='dhcpcanon'
2016-10-14 09:00:16 +00:00
test -z "$config_dhcp_default" -a "$with_dhclient" != "no" && config_dhcp_default='dhclient'
test -z "$config_dhcp_default" -a "$with_dhcpcd" != "no" && config_dhcp_default='dhcpcd'
test -z "$config_dhcp_default" && config_dhcp_default='internal'
2016-11-25 13:17:30 +00:00
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)
2016-10-14 09:00:16 +00:00
2012-09-24 22:12:52 +00:00
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]))
2016-05-19 14:43:48 +00:00
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])
2018-09-12 19:01:24 +00:00
if test "$config_dns_rc_manager_default" != "" -a \
2016-06-03 08:27:07 +00:00
"$config_dns_rc_manager_default" != file -a \
2018-09-12 19:01:24 +00:00
"$config_dns_rc_manager_default" != symlink -a \
2016-06-03 08:27:07 +00:00
"$config_dns_rc_manager_default" != netconfig -a \
"$config_dns_rc_manager_default" != resolvconf; then
2016-05-19 14:43:48 +00:00
AC_MSG_WARN([Unknown --with-config-dns-rc-manager-default=$config_dns_rc_manager_default setting.])
config_dns_rc_manager_default=
fi
2012-09-24 22:12:52 +00:00
# Use netconfig by default on SUSE
build: avoid AC_CHECK_FILE() due to problems with cross-compilation
AC_CHECK_FILE() does not work for cross compilation. Autoconf
documentation says:
Be aware that, like most Autoconf macros, they test a feature of the
host machine, and therefore, they die when cross-compiling. [1]
Test for the existance of the file directly. Of course, when cross
compiling, it's not at all clear that the host machine will run the same
distribution. And thus detecting --enable-ifcfg-rh based on the build
machine is likely wrong. Note, that we already did
AS_IF([test -z "$hostname_persist" -a -f /etc/SuSE-release], hostname_persist=suse)
which has the same problem.
At least, build no longer fails, and the user can inspect the ./configure
summary and see which features were misdetected.
[1] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Files.html
2018-07-26 06:02:33 +00:00
AS_IF([test -z "$with_netconfig" -a -f /etc/SuSE-release], with_netconfig=yes)
2012-09-24 22:12:52 +00:00
# Otherwise default to "no"
AS_IF([test -z "$with_resolvconf"], with_resolvconf=no)
AS_IF([test -z "$with_netconfig"], with_netconfig=no)
2018-09-12 19:01:24 +00:00
2012-09-24 22:12:52 +00:00
if test "$with_resolvconf" = "yes"; then
2018-09-12 19:01:24 +00:00
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
2012-09-24 22:12:52 +00:00
fi
2016-05-19 14:43:48 +00:00
if test "$with_resolvconf" != "no"; then
AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=resolvconf)
fi
2018-09-12 19:01:24 +00:00
2012-09-24 22:12:52 +00:00
if test "$with_netconfig" = "yes"; then
2018-09-12 19:01:24 +00:00
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
2012-09-24 22:12:52 +00:00
fi
2016-05-19 14:43:48 +00:00
if test "$with_netconfig" != "no"; then
AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=netconfig)
fi
2018-09-12 19:01:24 +00:00
2016-05-19 14:43:48 +00:00
AS_IF([test -z "$config_dns_rc_manager_default"], config_dns_rc_manager_default=symlink)
2018-09-12 19:01:24 +00:00
2012-11-01 12:22:14 +00:00
if test "$with_resolvconf" != "no"; then
2015-04-20 09:11:32 +00:00
AC_DEFINE_UNQUOTED(RESOLVCONF_PATH, "$with_resolvconf", [Path to resolvconf])
2012-09-24 22:12:52 +00:00
fi
2012-11-01 12:22:14 +00:00
if test "$with_netconfig" != "no"; then
2015-04-20 09:11:32 +00:00
AC_DEFINE_UNQUOTED(NETCONFIG_PATH, "$with_netconfig", [Path to netconfig])
2008-09-05 18:57:07 +00:00
fi
2016-11-25 13:17:30 +00:00
AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_MAIN_RC_MANAGER, "$config_dns_rc_manager_default", [Default value for main.rc-manager setting (--with-config-dns-rc-manager-default)])
AC_SUBST(NM_CONFIG_DEFAULT_MAIN_RC_MANAGER, $config_dns_rc_manager_default)
2008-09-05 18:57:07 +00:00
2009-10-01 11:31:09 +00:00
# iptables path
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(iptables,
AS_HELP_STRING([--with-iptables=/path/to/iptables], [path to iptables]))
2009-10-01 11:31:09 +00:00
if test "x${with_iptables}" = x; then
2017-05-05 10:00:01 +00:00
AC_PATH_PROG(IPTABLES_PATH, iptables, [], $PATH:/sbin:/usr/sbin)
if ! test -x "$IPTABLES_PATH"; then
AC_MSG_ERROR(iptables was not installed.)
fi
2009-10-01 11:31:09 +00:00
else
2017-05-05 10:00:01 +00:00
IPTABLES_PATH="$with_iptables"
2009-10-01 11:31:09 +00:00
fi
AC_DEFINE_UNQUOTED(IPTABLES_PATH, "$IPTABLES_PATH", [Define to path of iptables binary])
AC_SUBST(IPTABLES_PATH)
2013-05-13 11:10:00 +00:00
# dnsmasq path
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(dnsmasq,
AS_HELP_STRING([--with-dnsmasq=/path/to/dnsmasq], [path to dnsmasq]))
2013-05-13 11:10:00 +00:00
if test "x${with_dnsmasq}" = x; then
2017-05-05 10:00:01 +00:00
AC_PATH_PROG(DNSMASQ_PATH, dnsmasq, [], $PATH:/sbin:/usr/sbin)
2013-05-13 11:10:00 +00:00
else
2017-05-05 10:00:01 +00:00
DNSMASQ_PATH="$with_dnsmasq"
2013-05-13 11:10:00 +00:00
fi
AC_DEFINE_UNQUOTED(DNSMASQ_PATH, "$DNSMASQ_PATH", [Define to path of dnsmasq binary])
AC_SUBST(DNSMASQ_PATH)
2015-10-30 09:37:38 +00:00
# dnssec-trigger-script path
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(dnssec_trigger,
AS_HELP_STRING([--with-dnssec-trigger=/path/to/dnssec-trigger-script], [path to unbound dnssec-trigger-script]))
2015-10-30 09:37:38 +00:00
if test "x${with_dnssec_trigger}" = x; then
2018-09-12 13:53:13 +00:00
AC_PATH_PROG(DNSSEC_TRIGGER_PATH, dnssec-trigger-script, /usr/libexec/dnssec-trigger-script,
2017-05-05 10:00:01 +00:00
/usr/local/libexec:/usr/local/lib:/usr/local/lib/dnssec-trigger:/usr/libexec:/usr/lib:/usr/lib/dnssec-trigger)
2015-10-30 09:37:38 +00:00
else
2018-09-12 13:53:13 +00:00
DNSSEC_TRIGGER_PATH="$with_dnssec_trigger"
2015-10-30 09:37:38 +00:00
fi
2018-09-12 13:53:13 +00:00
AC_DEFINE_UNQUOTED(DNSSEC_TRIGGER_PATH, "$DNSSEC_TRIGGER_PATH", [Define to path of unbound dnssec-trigger-script])
AC_SUBST(DNSSEC_TRIGGER_PATH)
2015-10-30 09:37:38 +00:00
2008-11-21 18:59:37 +00:00
# system CA certificates path
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(system-ca-path,
2017-10-05 14:44:08 +00:00
AS_HELP_STRING([--with-system-ca-path=/path/to/ssl/certs], [path to system CA certificates]))
2008-11-21 18:59:37 +00:00
if test "x${with_system_ca_path}" = x; then
2017-05-05 10:00:01 +00:00
SYSTEM_CA_PATH=/etc/ssl/certs
2008-11-21 18:59:37 +00:00
else
2017-05-05 10:00:01 +00:00
SYSTEM_CA_PATH="$with_system_ca_path"
2008-11-21 18:59:37 +00:00
fi
AC_DEFINE_UNQUOTED(SYSTEM_CA_PATH, "$SYSTEM_CA_PATH", [Define to path to system CA certificates])
AC_SUBST(SYSTEM_CA_PATH)
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(kernel-firmware-dir,
AS_HELP_STRING([--with-kernel-firmware-dir=DIR], [where kernel firmware directory is (default is /lib/firmware)]))
2010-07-01 17:32:11 +00:00
if test -n "$with_kernel_firmware_dir" ; then
2017-05-05 10:00:01 +00:00
KERNEL_FIRMWARE_DIR="$with_kernel_firmware_dir"
2010-07-01 17:32:11 +00:00
else
2017-05-05 10:00:01 +00:00
KERNEL_FIRMWARE_DIR="/lib/firmware"
2010-07-01 17:32:11 +00:00
fi
AC_DEFINE_UNQUOTED(KERNEL_FIRMWARE_DIR, "$KERNEL_FIRMWARE_DIR", [Define to path of the kernel firmware directory])
AC_SUBST(KERNEL_FIRMWARE_DIR)
2017-03-20 16:57:58 +00:00
PKG_CHECK_MODULES(LIBPSL, [libpsl >= 0.1], [have_libpsl=yes],[have_libpsl=no])
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(libpsl,
AS_HELP_STRING([--with-libpsl=yes|no], [Link against libpsl]),
[], [with_libpsl=${have_libpsl}])
2017-03-20 16:57:58 +00:00
if test "$with_libpsl" != "no"; then
if test "$have_libpsl" != "yes"; then
AC_MSG_ERROR(libpsl library not found)
fi
with_libpsl='yes'
AC_DEFINE(WITH_LIBPSL, 1, [Define if you have libpsl])
else
AC_DEFINE(WITH_LIBPSL, 0, [Define if you have libpsl])
fi
AM_CONDITIONAL(WITH_LIBPSL, test "$with_libpsl" != "no")
2017-05-05 10:00:01 +00:00
2017-05-05 10:18:51 +00:00
AC_ARG_ENABLE(concheck,
AS_HELP_STRING([--enable-concheck], [enable connectivity checking support]),
2017-05-09 17:21:24 +00:00
[enable_concheck=${enableval}], [enable_concheck=yes])
2017-05-05 10:18:51 +00:00
if test "${enable_concheck}" = "yes"; then
2017-05-09 17:21:24 +00:00
PKG_CHECK_MODULES(LIBCURL, [libcurl >= 7.24.0], [have_libcurl=yes], [have_libcurl=no])
2017-05-05 10:18:51 +00:00
if test "$have_libcurl" != "yes"; then
2017-05-09 17:21:24 +00:00
AC_MSG_ERROR(--enable-concheck requires libcurl library.)
2017-05-05 10:18:51 +00:00
fi
2011-12-05 21:11:13 +00:00
AC_DEFINE(WITH_CONCHECK, 1, [Define if you want connectivity checking support])
else
2016-04-04 16:23:13 +00:00
enable_concheck=no
2011-12-05 21:11:13 +00:00
AC_DEFINE(WITH_CONCHECK, 0, [Define if you want connectivity checking support])
fi
2014-02-03 11:04:51 +00:00
PKG_CHECK_MODULES(LIBNDP, [libndp])
2013-06-13 13:05:40 +00:00
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(nmcli,
AS_HELP_STRING([--with-nmcli=yes|no], [Build nmcli]))
2015-11-19 00:02:16 +00:00
if test "$with_nmcli" != no; then
2017-05-05 10:00:01 +00:00
AX_LIB_READLINE
build_nmcli=yes
2015-11-19 00:02:16 +00:00
else
2017-05-05 10:00:01 +00:00
build_nmcli=no
2015-11-19 00:02:16 +00:00
fi
AM_CONDITIONAL(BUILD_NMCLI, test "$build_nmcli" = yes)
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(nmtui,
AS_HELP_STRING([--with-nmtui=yes|no], [Build nmtui]))
2013-12-02 21:20:26 +00:00
if test "$with_nmtui" != no; then
2017-05-05 10:00:01 +00:00
PKG_CHECK_MODULES(NEWT, [libnewt >= 0.52.15], [build_nmtui=yes], [build_nmtui=no])
2013-12-02 21:20:26 +00:00
else
2017-05-05 10:00:01 +00:00
build_nmtui=no
2013-12-02 21:20:26 +00:00
fi
if test "$with_nmtui" = yes -a "$build_nmtui" = no; then
2017-05-05 10:00:01 +00:00
AC_MSG_ERROR([You must have libnewt installed to build nmtui.])
2013-12-02 21:20:26 +00:00
fi
AM_CONDITIONAL(BUILD_NMTUI, test "$build_nmtui" = yes)
2017-01-18 10:07:33 +00:00
if test $(( ${NM_MINOR_VERSION} % 2 )) = "1"; then
2017-05-05 10:00:01 +00:00
# A development version
more_warnings_default=error
more_asserts_default=100
more_logging_default=yes
2017-01-18 10:07:33 +00:00
else
2017-05-05 10:00:01 +00:00
# A release version
more_warnings_default=yes
more_asserts_default=0
more_logging_default=no
2017-01-18 10:07:33 +00:00
fi
2013-06-13 13:05:40 +00:00
2018-09-04 08:25:19 +00:00
NM_COMPILER_WARNINGS(AM_CFLAGS, ${more_warnings_default})
2004-12-01 22:45:10 +00:00
2018-02-16 15:05:31 +00:00
NM_COMPILER_FLAG(LIBSYSTEMD_NM_CFLAGS, "-Wno-gnu-variable-sized-type-not-at-end")
AC_SUBST(LIBSYSTEMD_NM_CFLAGS)
2016-05-20 13:34:26 +00:00
CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-fno-strict-aliasing \
])
2018-09-04 08:25:19 +00:00
AM_CFLAGS="$AM_CFLAGS $with_cflags"
2016-05-20 13:34:26 +00:00
2015-04-10 05:25:03 +00:00
AC_ARG_ENABLE(more-asserts,
2017-05-05 10:00:01 +00:00
AS_HELP_STRING([--enable-more-asserts],
[Enable more assertions for debugging (default: auto). Deprecated option. Use --with-more-asserts=level]))
2015-04-10 05:25:03 +00:00
if test "${enable_more_asserts}" = "yes"; then
2017-05-05 10:00:01 +00:00
more_asserts=100
2015-10-05 11:48:01 +00:00
fi
AC_ARG_WITH(more-asserts,
2017-01-18 10:07:33 +00:00
AS_HELP_STRING([--with-more-asserts=level], [Enable more assertions for debugging (0 = none, 100 = all, default: auto)]),
2015-10-05 11:48:01 +00:00
[more_asserts=${with_more_asserts}],
[])
if test "${more_asserts}" = "no"; then
2017-05-05 10:00:01 +00:00
more_asserts=0
2015-10-05 11:48:01 +00:00
else
2017-05-05 10:00:01 +00:00
if test "${more_asserts}" = "yes"; then
more_asserts=100
fi
2015-04-10 05:25:03 +00:00
fi
2017-01-18 10:07:33 +00:00
if test "${more_asserts}" = ""; then
2017-05-05 10:00:01 +00:00
more_asserts=${more_asserts_default}
2017-01-18 10:07:33 +00:00
fi
2015-10-05 11:48:01 +00:00
AC_DEFINE_UNQUOTED(NM_MORE_ASSERTS, $more_asserts, [Define if more asserts are enabled])
2015-04-10 05:25:03 +00:00
2017-05-05 10:00:01 +00:00
AC_ARG_ENABLE(more-logging, AS_HELP_STRING([--enable-more-logging], [Enable more debug logging (default: auto)]))
2017-01-18 10:07:33 +00:00
if test "${enable_more_logging}" = ""; then
2017-05-05 10:00:01 +00:00
enable_more_logging=${more_logging_default}
2017-01-18 10:07:33 +00:00
fi
2015-04-10 05:39:14 +00:00
if test "${enable_more_logging}" = "yes"; then
2017-05-05 10:00:01 +00:00
AC_DEFINE(NM_MORE_LOGGING, [1], [Define if more debug logging is enabled])
2018-08-26 17:45:22 +00:00
else
AC_DEFINE(NM_MORE_LOGGING, [0], [Define if more debug logging is enabled])
2015-04-10 05:39:14 +00:00
fi
2017-02-10 10:28:01 +00:00
NM_LTO
NM_LD_GC
2014-12-02 18:41:20 +00:00
2018-02-07 10:10:31 +00:00
AC_ARG_WITH(address-sanitizer,
AS_HELP_STRING([--with-address-sanitizer=yes|no|exec], [Enable address sanitizer (default: no)]))
if test "$with_address_sanitizer" = yes -o "$with_address_sanitizer" = "exec"; then
2016-04-04 19:30:43 +00:00
CC_CHECK_FLAGS_APPEND([asan_cflags], [CFLAGS], [-fsanitize=address])
AS_IF([test -z "$asan_cflags"],
[AC_MSG_ERROR([*** -fsanitize=address is not supported])])
2018-02-07 10:10:31 +00:00
sanitizer_exec_cflags="$sanitizer_exec_cflags -fsanitize=address"
sanitizer_exec_ldflags="$sanitizer_exec_ldflags -Wc,-fsanitize=address"
2018-02-07 14:02:53 +00:00
AC_DEFINE(ASAN_BUILD, 1, [Whether NM is built with address sanitizer])
2018-02-07 10:10:31 +00:00
if test "$with_address_sanitizer" = "yes"; then
sanitizer_lib_cflags="$sanitizer_lib_cflags -fsanitize=address"
sanitizer_lib_ldflags="$sanitizer_lib_ldflags -Wc,-fsanitize=address"
sanitizers="${sanitizers}address "
asan_options="ASAN_OPTIONS=detect_leaks=0"
else
sanitizers="${sanitizers}address(executables-only) "
fi
2016-04-04 19:30:43 +00:00
fi
2017-05-05 10:00:01 +00:00
AC_ARG_ENABLE(undefined-sanitizer,
AS_HELP_STRING([--enable-undefined-sanitizer],
[Compile with undefined behavior sanitizer (default: no)]))
2016-04-04 19:30:43 +00:00
if (test "${enable_undefined_sanitizer}" = "yes"); then
CC_CHECK_FLAGS_APPEND([ubsan_cflags], [CFLAGS], [-fsanitize=undefined])
AS_IF([test -z "$ubsan_cflags"],
2017-05-05 10:00:01 +00:00
[AC_MSG_ERROR([*** -fsanitize=undefined is not supported])])
2016-04-04 19:30:43 +00:00
2018-02-07 10:10:31 +00:00
sanitizer_exec_cflags="$sanitizer_exec_cflags -fsanitize=undefined"
sanitizer_lib_cflags="$sanitizer_lib_cflags -fsanitize=undefined"
sanitizer_exec_ldflags="$sanitizer_exec_ldflags -Wc,-fsanitize=undefined"
sanitizer_lib_ldflags="$sanitizer_lib_ldflags -Wc,-fsanitize=undefined"
sanitizers="${sanitizers}undefined-behavior "
2016-04-04 19:30:43 +00:00
fi
if test -n "$sanitizers"; then
sanitizers="${sanitizers% }"
2018-02-07 10:10:31 +00:00
AC_SUBST(SANITIZER_ENV, ["$asan_options"])
AC_SUBST(SANITIZER_EXEC_CFLAGS, ["$sanitizer_exec_cflags -DVALGRIND=1 -fno-omit-frame-pointer"])
AC_SUBST(SANITIZER_LIB_CFLAGS, ["$sanitizer_lib_cflags -DVALGRIND=1 -fno-omit-frame-pointer"])
AC_SUBST(SANITIZER_EXEC_LDFLAGS, [$sanitizer_exec_ldflags])
AC_SUBST(SANITIZER_LIB_LDFLAGS, [$sanitizer_lib_ldflags])
2016-04-04 19:30:43 +00:00
fi
2017-11-10 11:00:09 +00:00
AC_MSG_CHECKING([CC support C11 _Generic()])
2018-01-28 07:51:25 +00:00
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int foo(void); int foo() { int a = 0; int b = _Generic (a, int: 4); return b + a; }]],
[[foo();]])],
2017-11-10 11:00:09 +00:00
[cc_support_generic=1],
[cc_support_generic=0])
AC_MSG_RESULT($cc_support_generic)
AC_DEFINE_UNQUOTED(_NM_CC_SUPPORT_GENERIC, $cc_support_generic, [Define whether the compiler supports C11 _Generic()])
AC_MSG_CHECKING([CC support gcc __auto_type])
2018-01-28 07:51:25 +00:00
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int foo(void); int foo() { int a = 0; __auto_type b = a; return b + a; }]],
[[foo();]])],
2017-11-10 11:00:09 +00:00
[cc_support_auto_type=1],
[cc_support_auto_type=0])
AC_MSG_RESULT($cc_support_auto_type)
AC_DEFINE_UNQUOTED(_NM_CC_SUPPORT_AUTO_TYPE, $cc_support_auto_type, [Define whether the compiler support gcc __auto_type])
2012-06-12 19:57:00 +00:00
dnl -------------------------
dnl Vala bindings
dnl -------------------------
2012-06-12 23:08:40 +00:00
VAPIGEN_CHECK(0.17.1.24)
2016-10-18 12:01:56 +00:00
AC_CONFIG_COMMANDS([vapi], [$MKDIR_P vapi])
2012-06-12 19:57:00 +00:00
2012-11-05 10:35:34 +00:00
# Tests, utilities and documentation
2012-12-18 13:14:13 +00:00
AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests=root|yes|no], [Build NetworkManager tests (default: yes)]))
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(valgrind,
AS_HELP_STRING([--with-valgrind=yes|no|path], [Use valgrind to memory-check the tests (default: no)]))
2013-05-10 14:55:09 +00:00
# Fallback to --with-tests
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(tests,
AS_HELP_STRING([--with-tests], [Build NetworkManager tests (deprecated)]))
2012-11-05 10:35:34 +00:00
AS_IF([test -n "$with_tests"], enable_tests="$with_tests")
2015-02-18 17:02:52 +00:00
# Default to --enable-tests --with-valgrind=no
2012-11-05 10:35:34 +00:00
AS_IF([test -z "$enable_tests"], enable_tests="yes")
2015-02-18 17:02:52 +00:00
AS_IF([test -z "$with_valgrind"], with_valgrind="no")
2012-11-05 10:35:34 +00:00
# Normalize values
2012-12-18 13:14:13 +00:00
AS_IF([test "$enable_tests" != "yes" -a "$enable_tests" != "root"], enable_tests="no")
2013-03-22 18:45:11 +00:00
# Search for tools
AS_IF([test "$with_valgrind" == "yes"],
2017-05-05 10:00:01 +00:00
[AC_PATH_PROGS(with_valgrind, valgrind, no)])
2013-03-22 18:45:11 +00:00
# Add conditionals and substitutions
2012-12-18 13:14:13 +00:00
AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no")
2014-04-22 12:22:11 +00:00
AM_CONDITIONAL(REQUIRE_ROOT_TESTS, test "$enable_tests" == "root")
2017-05-05 10:00:01 +00:00
AC_ARG_WITH(valgrind-suppressions,
AS_HELP_STRING([--with-valgrind-suppressions=path], [Use specific valgrind suppression file]))
2015-04-09 10:17:07 +00:00
if test "$with_valgrind" == no; then
with_valgrind_suppressions=
else
if test "$with_valgrind_suppressions" == ""; then
with_valgrind_suppressions='$(top_srcdir)/valgrind.suppressions'
fi
fi
2018-05-06 05:37:28 +00:00
AC_SUBST(NM_LOG_COMPILER, 'LOG_COMPILER = "$(top_srcdir)/tools/run-nm-test.sh" --called-from-make "$(abs_top_builddir)" "$(LIBTOOL)" "$(with_valgrind)" "'"$with_valgrind_suppressions"'" --launch-dbus=auto')
2013-05-10 14:55:09 +00:00
2016-12-14 17:18:37 +00:00
AM_PATH_PYTHON([], [], [PYTHON=python])
AC_SUBST(PYTHON, [$PYTHON])
AC_DEFINE_UNQUOTED(TEST_NM_PYTHON, "$PYTHON", [Define python path for test binary])
2017-02-13 16:07:38 +00:00
GTK_DOC_CHECK(1.0)
2017-02-08 15:18:11 +00:00
2014-06-27 16:25:54 +00:00
# check if we can build setting property documentation
build: combine handling of setting docs and man pages
Building the man pages via xsltproc requires "docbook.xsl"
which is part of docbook.
Previously, we would build the man pages solely based on
"--enable-introspection", which checks for the presence of
xsltproc, but not docbook. This can lead to build failure
when docbook is not available, but "--enable-introspection"
is given.
Instead of adding yet another configure option to fine-tune
and say "--with-docbook --disable-gtk-doc", just simplify it.
Now, documentation (both man pages and setting docs) will be generated
with "--enable-gtk-doc" and "--enable-introspection".
If the documentation is not about to be generated, pre-generated docs
will be installed if they are available. That is commonly the case
with a source tarball, but not with a git checkout.
Finally, if documentation is nither generated nor pre-generated,
no documentation will be installed *duh*.
This removes the possibility to treat man pages separate from settings
docs. Now you either generate both, install both pre-generated, or don't
get any of them.
https://bugzilla.gnome.org/show_bug.cgi?id=778551
2017-02-13 15:26:20 +00:00
build_docs=no
2016-11-24 17:04:33 +00:00
if test -n "$INTROSPECTION_MAKEFILE"; then
2017-05-05 10:00:01 +00:00
# If g-i is installed we know we have python, but we might not have pygobject
if ! "$PYTHON" -c 'from gi.repository import GObject' >& /dev/null; then
AC_MSG_ERROR(["--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)])
fi
AC_PATH_PROG(PERL, perl)
if test -z "$PERL"; then
AC_MSG_ERROR([--enable-introspection requires perl])
fi
AC_PATH_PROG(XSLTPROC, xsltproc)
if test -z "$XSLTPROC"; then
AC_MSG_ERROR([--enable-introspection requires xsltproc])
fi
have_introspection=yes
if test "$enable_gtk_doc" = "yes"; then
build_docs=yes
fi
2016-11-22 09:32:24 +00:00
else
2017-05-05 10:00:01 +00:00
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.
2018-09-08 09:27:15 +00:00
AC_MSG_ERROR(["--enable-gtk-doc requires --enable-introspection"])
2017-05-05 10:00:01 +00:00
fi
have_introspection=no
2014-06-27 16:25:54 +00:00
fi
build: combine handling of setting docs and man pages
Building the man pages via xsltproc requires "docbook.xsl"
which is part of docbook.
Previously, we would build the man pages solely based on
"--enable-introspection", which checks for the presence of
xsltproc, but not docbook. This can lead to build failure
when docbook is not available, but "--enable-introspection"
is given.
Instead of adding yet another configure option to fine-tune
and say "--with-docbook --disable-gtk-doc", just simplify it.
Now, documentation (both man pages and setting docs) will be generated
with "--enable-gtk-doc" and "--enable-introspection".
If the documentation is not about to be generated, pre-generated docs
will be installed if they are available. That is commonly the case
with a source tarball, but not with a git checkout.
Finally, if documentation is nither generated nor pre-generated,
no documentation will be installed *duh*.
This removes the possibility to treat man pages separate from settings
docs. Now you either generate both, install both pre-generated, or don't
get any of them.
https://bugzilla.gnome.org/show_bug.cgi?id=778551
2017-02-13 15:26:20 +00:00
# check for pregenerated manpages and documentation to be installed
use_pregen_docs=no
2017-05-05 10:00:01 +00:00
if test "$build_docs" != "yes" -a \
2017-05-27 17:48:49 +00:00
-f "$srcdir"/man/NetworkManager.8 -a \
-f "$srcdir"/man/NetworkManager.conf.5 -a \
-f "$srcdir"/man/nm-online.1 -a \
-f "$srcdir"/man/nmcli-examples.7 -a \
-f "$srcdir"/man/nmcli.1 -a \
-f "$srcdir"/man/nmtui.1 -a \
2017-05-05 10:00:01 +00:00
\
2017-10-30 16:32:30 +00:00
-f "$srcdir"/man/nm-openvswitch.7 -a \
\
2017-05-27 17:48:49 +00:00
-f "$srcdir"/man/nm-settings-ifcfg-rh.5 -a \
-f "$srcdir"/man/nm-settings-keyfile.5 -a \
-f "$srcdir"/man/nm-settings.5 -a \
2017-05-05 10:00:01 +00:00
\
2017-05-27 17:48:49 +00:00
-f "$srcdir"/man/nm-settings.xml -a \
-f "$srcdir"/man/nm-settings-keyfile.xml -a \
-f "$srcdir"/man/nm-settings-ifcfg-rh.xml -a \
2017-05-05 10:00:01 +00:00
\
2017-05-27 17:48:49 +00:00
-f "$srcdir"/docs/api/settings-spec.xml; then
build: combine handling of setting docs and man pages
Building the man pages via xsltproc requires "docbook.xsl"
which is part of docbook.
Previously, we would build the man pages solely based on
"--enable-introspection", which checks for the presence of
xsltproc, but not docbook. This can lead to build failure
when docbook is not available, but "--enable-introspection"
is given.
Instead of adding yet another configure option to fine-tune
and say "--with-docbook --disable-gtk-doc", just simplify it.
Now, documentation (both man pages and setting docs) will be generated
with "--enable-gtk-doc" and "--enable-introspection".
If the documentation is not about to be generated, pre-generated docs
will be installed if they are available. That is commonly the case
with a source tarball, but not with a git checkout.
Finally, if documentation is nither generated nor pre-generated,
no documentation will be installed *duh*.
This removes the possibility to treat man pages separate from settings
docs. Now you either generate both, install both pre-generated, or don't
get any of them.
https://bugzilla.gnome.org/show_bug.cgi?id=778551
2017-02-13 15:26:20 +00:00
use_pregen_docs=yes
2017-02-13 16:07:38 +00:00
fi
build: combine handling of setting docs and man pages
Building the man pages via xsltproc requires "docbook.xsl"
which is part of docbook.
Previously, we would build the man pages solely based on
"--enable-introspection", which checks for the presence of
xsltproc, but not docbook. This can lead to build failure
when docbook is not available, but "--enable-introspection"
is given.
Instead of adding yet another configure option to fine-tune
and say "--with-docbook --disable-gtk-doc", just simplify it.
Now, documentation (both man pages and setting docs) will be generated
with "--enable-gtk-doc" and "--enable-introspection".
If the documentation is not about to be generated, pre-generated docs
will be installed if they are available. That is commonly the case
with a source tarball, but not with a git checkout.
Finally, if documentation is nither generated nor pre-generated,
no documentation will be installed *duh*.
This removes the possibility to treat man pages separate from settings
docs. Now you either generate both, install both pre-generated, or don't
get any of them.
https://bugzilla.gnome.org/show_bug.cgi?id=778551
2017-02-13 15:26:20 +00:00
AM_CONDITIONAL(BUILD_DOCS, test "$build_docs" = "yes")
AM_CONDITIONAL(HAVE_DOCS, test "$build_docs" = "yes" -o "$use_pregen_docs" = "yes")
2018-09-04 08:25:19 +00:00
AC_SUBST(AM_CFLAGS)
2014-06-27 16:25:54 +00:00
2007-12-18 02:43:42 +00:00
AC_CONFIG_FILES([
2004-06-24 14:18:37 +00:00
Makefile
2015-12-22 11:18:22 +00:00
shared/nm-version-macros.h
2014-07-04 17:26:57 +00:00
libnm/libnm.pc
2019-04-03 06:52:38 +00:00
libnm-util/libnm-util.pc
libnm-glib/libnm-glib.pc
libnm-glib/libnm-glib-vpn.pc
2004-08-26 19:14:26 +00:00
po/Makefile.in
2016-11-03 12:25:36 +00:00
data/org.freedesktop.NetworkManager.policy.in
2011-02-16 22:24:16 +00:00
docs/api/Makefile
docs/api/version.xml
2019-04-03 06:52:38 +00:00
docs/libnm-glib/Makefile
docs/libnm-glib/version.xml
docs/libnm-util/Makefile
docs/libnm-util/version.xml
2014-07-24 12:59:21 +00:00
docs/libnm/Makefile
docs/libnm/version.xml
2004-09-02 02:30:03 +00:00
NetworkManager.pc
2004-06-24 14:18:37 +00:00
])
2007-12-18 02:43:42 +00:00
AC_OUTPUT
2004-08-25 20:52:19 +00:00
2012-08-01 18:01:33 +00:00
# Print build configuration
echo
2012-11-15 06:48:51 +00:00
echo "System paths:"
echo " prefix: $prefix"
echo " exec_prefix: $exec_prefix"
2018-01-03 21:43:38 +00:00
echo " sysconfdir: $sysconfdir"
echo " localstatedir: $localstatedir"
echo " runstatedir: $runstatedir"
echo " datadir: $datadir"
2012-11-15 06:48:51 +00:00
echo " systemdunitdir: $with_systemdsystemunitdir"
2012-11-15 09:38:53 +00:00
echo " nmbinary: $nmbinary"
echo " nmconfdir: $nmconfdir"
2015-06-08 15:40:54 +00:00
echo " nmlibdir: $nmlibdir"
2012-11-15 09:38:53 +00:00
echo " nmdatadir: $nmdatadir"
echo " nmstatedir: $nmstatedir"
echo " nmrundir: $nmrundir"
2012-11-15 06:48:51 +00:00
echo
2012-12-28 18:21:25 +00:00
echo "Platform:"
2013-07-30 21:09:52 +00:00
echo " session tracking: $session_tracking"
2012-12-28 18:21:25 +00:00
echo " suspend/resume: $with_suspend_resume"
auth-manager: always compile D-Bus calls to polkit
Supporting PolicyKit required no additional library, just extra code
to handle the D-Bus calls. For that, there was a compile time option
to even stip out that code. Note, that you could (and still can)
configure the system not to use policy-kit. The point was to reduce
the binary size in case you don't need it.
Remove this. I guess, we we aim for such aggressive optimization of
the binary size, we should instead make all device types disablable
at configuration time. We don't do that either and other low hanging
fruits, because it's better to always enable features, unless they
require external dependencies.
Also, the next commit will make more use of NMAuthManager. So, having
it disabled at compile time, makes even less sense.
2018-04-09 16:13:28 +00:00
if test "${enable_modify_system}" = "yes"; then
echo " policykit: main.auth-polkit=${enable_polkit} (permissive modify.system)"
2012-12-28 18:21:25 +00:00
else
auth-manager: always compile D-Bus calls to polkit
Supporting PolicyKit required no additional library, just extra code
to handle the D-Bus calls. For that, there was a compile time option
to even stip out that code. Note, that you could (and still can)
configure the system not to use policy-kit. The point was to reduce
the binary size in case you don't need it.
Remove this. I guess, we we aim for such aggressive optimization of
the binary size, we should instead make all device types disablable
at configuration time. We don't do that either and other low hanging
fruits, because it's better to always enable features, unless they
require external dependencies.
Also, the next commit will make more use of NMAuthManager. So, having
it disabled at compile time, makes even less sense.
2018-04-09 16:13:28 +00:00
echo " policykit: main.auth-polkit=${enable_polkit} (restrictive modify.system)"
2012-12-28 18:21:25 +00:00
fi
2014-10-29 12:18:40 +00:00
echo " polkit agent: ${enable_polkit_agent}"
2014-03-25 12:55:47 +00:00
echo " selinux: $have_selinux"
2015-08-04 12:16:23 +00:00
echo " systemd-journald: $have_systemd_journal (default: logging.backend=${nm_config_logging_backend_default})"
2015-03-23 08:15:47 +00:00
echo " hostname persist: ${hostname_persist}"
2015-08-04 12:04:55 +00:00
echo " libaudit: $have_libaudit (default: logging.audit=${NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT})"
2012-12-28 18:21:25 +00:00
echo
echo "Features:"
echo " wext: $ac_with_wext"
2015-01-23 13:12:02 +00:00
echo " wifi: $enable_wifi"
2018-09-11 13:05:03 +00:00
echo " ppp: $enable_ppp ${PPPD_PATH} plugins:${PPPD_PLUGIN_DIR}"
2012-12-28 18:21:25 +00:00
echo " modemmanager-1: $with_modem_manager_1"
2016-06-23 16:24:58 +00:00
echo " ofono: $with_ofono"
2012-12-28 18:21:25 +00:00
echo " concheck: $enable_concheck"
Revert "Makefile: rework team compilation flags"
I don't think we should do this.
- renamining/dropping configure options is still an annoyance,
because it requires to different ./configure options depending
on the version. The rename from --enable-teamctl to --enable-team
might be theoretically nice, but more annoying then helpful.
- There is no strict dependency between --enable-team and
--enable-json-validation. At most, one could argue that
when enabling the team plugin (--enable-teamctl), then
libnm must also be build with --enable-json-validation.
But in fact, the team plugin will happily work with a
libnm that doesn't link against libjansson.
That is --enable-teamctl --disable-json-validation will work
in practice just fine.
On the other hand, libnm is a client library to create connection
profiles, fully supporting team profiles also makes sense if the
actual plugin is not installed (or build). Thus, --disable-teamctl
--enable-json-validation certainly makes sense.
At this point, one might ask whether libnm is even still complete without
libjansson. Maybe libnm should *require* --enable-json-validation.
But that is not what the patch was doing, and it would also need
some careful consideration before doing so.
This reverts commit 9d5cd7eae8edc8c558d26f04ffd163effafe57f9.
2017-12-08 07:56:46 +00:00
echo " libteamdctl: $enable_teamdctl"
2017-08-01 16:27:22 +00:00
echo " ovs: $enable_ovs"
2019-04-03 06:52:38 +00:00
echo " libnm-glib: $with_libnm_glib"
2015-11-19 00:02:16 +00:00
echo " nmcli: $build_nmcli"
2013-12-02 21:20:26 +00:00
echo " nmtui: $build_nmtui"
2017-12-09 15:28:10 +00:00
echo " iwd: $ac_with_iwd"
2012-11-22 15:09:35 +00:00
echo
2014-10-16 10:01:35 +00:00
echo "Configuration plugins (main.plugins=${config_plugins_default})"
2014-10-21 07:13:33 +00:00
echo " ibft: ${enable_config_plugin_ibft}"
2012-08-01 18:01:33 +00:00
echo " ifcfg-rh: ${enable_ifcfg_rh}"
echo " ifupdown: ${enable_ifupdown}"
2004-08-25 20:52:19 +00:00
echo
2008-02-28 20:46:04 +00:00
2012-09-24 22:12:52 +00:00
echo "Handlers for /etc/resolv.conf:"
echo " resolvconf: ${with_resolvconf}"
echo " netconfig: ${with_netconfig}"
2016-05-19 14:43:48 +00:00
echo " config-dns-rc-manager-default: ${config_dns_rc_manager_default}"
2012-09-24 22:12:52 +00:00
echo
2010-01-13 06:55:24 +00:00
2016-10-14 09:00:16 +00:00
echo "DHCP clients (default $config_dhcp_default):"
2017-10-05 14:44:08 +00:00
echo " dhcpcanon: $with_dhcpcanon"
2012-10-29 23:31:51 +00:00
echo " dhclient: $with_dhclient"
echo " dhcpcd: $with_dhcpcd"
echo
2010-01-13 06:55:24 +00:00
2012-11-05 10:35:34 +00:00
echo "Miscellaneous:"
build: combine handling of setting docs and man pages
Building the man pages via xsltproc requires "docbook.xsl"
which is part of docbook.
Previously, we would build the man pages solely based on
"--enable-introspection", which checks for the presence of
xsltproc, but not docbook. This can lead to build failure
when docbook is not available, but "--enable-introspection"
is given.
Instead of adding yet another configure option to fine-tune
and say "--with-docbook --disable-gtk-doc", just simplify it.
Now, documentation (both man pages and setting docs) will be generated
with "--enable-gtk-doc" and "--enable-introspection".
If the documentation is not about to be generated, pre-generated docs
will be installed if they are available. That is commonly the case
with a source tarball, but not with a git checkout.
Finally, if documentation is nither generated nor pre-generated,
no documentation will be installed *duh*.
This removes the possibility to treat man pages separate from settings
docs. Now you either generate both, install both pre-generated, or don't
get any of them.
https://bugzilla.gnome.org/show_bug.cgi?id=778551
2017-02-13 15:26:20 +00:00
echo " have introspection: $have_introspection"
echo " build documentation and manpages: $build_docs"
echo " install pregenerated documentation and manpages: $use_pregen_docs"
2012-11-05 10:35:34 +00:00
echo " tests: $enable_tests"
2015-10-05 11:48:01 +00:00
echo " more-asserts: $more_asserts"
2017-01-18 10:07:33 +00:00
echo " more-logging: $enable_more_logging"
echo " more-warnings: $set_more_warnings"
2015-04-09 10:17:07 +00:00
echo " valgrind: $with_valgrind $with_valgrind_suppressions"
2012-12-19 16:48:52 +00:00
echo " code coverage: $enable_code_coverage"
2014-12-02 18:41:20 +00:00
echo " LTO: $enable_lto"
2016-05-18 18:19:05 +00:00
echo " linker garbage collection: $enable_ld_gc"
Revert "Makefile: rework team compilation flags"
I don't think we should do this.
- renamining/dropping configure options is still an annoyance,
because it requires to different ./configure options depending
on the version. The rename from --enable-teamctl to --enable-team
might be theoretically nice, but more annoying then helpful.
- There is no strict dependency between --enable-team and
--enable-json-validation. At most, one could argue that
when enabling the team plugin (--enable-teamctl), then
libnm must also be build with --enable-json-validation.
But in fact, the team plugin will happily work with a
libnm that doesn't link against libjansson.
That is --enable-teamctl --disable-json-validation will work
in practice just fine.
On the other hand, libnm is a client library to create connection
profiles, fully supporting team profiles also makes sense if the
actual plugin is not installed (or build). Thus, --disable-teamctl
--enable-json-validation certainly makes sense.
At this point, one might ask whether libnm is even still complete without
libjansson. Maybe libnm should *require* --enable-json-validation.
But that is not what the patch was doing, and it would also need
some careful consideration before doing so.
This reverts commit 9d5cd7eae8edc8c558d26f04ffd163effafe57f9.
2017-12-08 07:56:46 +00:00
echo " JSON validation for libnm: $enable_json_validation"
2018-08-30 06:30:19 +00:00
echo " crypto: $with_crypto (have-gnutls: $have_crypto_gnutls, have-nss: $have_crypto_nss)"
2016-04-04 19:30:43 +00:00
echo " sanitizers: $sanitizers"
2017-03-20 16:57:58 +00:00
echo " Mozilla Public Suffix List: $with_libpsl"
2018-09-19 14:38:38 +00:00
echo " eBPF: $have_ebpf"
2009-01-12 19:21:44 +00:00
echo