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
m4_define([nm_major_version], [0])
2011-08-22 23:30:56 +00:00
m4_define([nm_minor_version], [9])
2013-02-12 15:43:49 +00:00
m4_define([nm_micro_version], [9])
2014-02-28 13:21:35 +00:00
m4_define([nm_nano_version], [1])
2011-03-02 23:16:27 +00:00
m4_define([nm_version],
2011-09-20 04:18:12 +00:00
[nm_major_version.nm_minor_version.nm_micro_version.nm_nano_version])
2014-02-02 12:18:01 +00:00
m4_define([nm_git_sha], [m4_esyscmd([ ( [[ -d ./.git/ && "$(realpath ./.git/)" = "$(realpath "$(git rev-parse --git-dir 2>/dev/null)" 2>/dev/null)" ]] && git rev-parse --verify -q HEAD 2>/dev/null ) || true ])])
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])
2009-04-21 23:45:30 +00:00
2013-07-30 10:17:17 +00:00
dnl Initialize automake. automake < 1.12 didn't have serial-tests and
dnl gives an error if it sees this, but for automake >= 1.13
dnl serial-tests is required so we have to include it. Solution is to
dnl test for the version of automake (by running an external command)
dnl and provide it if necessary. Note we have to do this entirely using
dnl m4 macros since automake queries this macro by running
dnl 'autoconf --trace ...'.
m4_define([serial_tests], [
m4_esyscmd([automake --version |
head -1 |
awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 12) { print "serial-tests" }}'
])
])
AM_INIT_AUTOMAKE(1.11 serial_tests tar-ustar no-dist-gzip dist-bzip2 -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
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
2014-02-02 12:18:01 +00:00
NM_GIT_SHA=nm_git_sha
2011-03-02 23:16:27 +00:00
AC_SUBST(NM_MAJOR_VERSION)
AC_SUBST(NM_MINOR_VERSION)
AC_SUBST(NM_MICRO_VERSION)
AC_SUBST(NM_VERSION)
2004-11-16 02:41:53 +00:00
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
AC_TYPE_PID_T
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])
2006-08-07 13:42:37 +00:00
dnl
dnl Make sha1.c happy on big endian systems
dnl
AC_C_BIGENDIAN
2012-08-23 09:53:41 +00:00
# NetworkManager paths
AC_SUBST(nmbinary, "$sbindir/$PACKAGE", [NetworkManager binary executable])
AC_SUBST(nmconfdir, "$sysconfdir/$PACKAGE", [NetworkManager configuration directory])
2012-11-15 09:38:53 +00:00
AC_SUBST(nmdatadir, "$datadir/$PACKAGE", [NetworkManager shared data directory])
2012-08-23 09:53:41 +00:00
AC_SUBST(nmstatedir, "$localstatedir/lib/$PACKAGE", [NetworkManager persistent state directory])
AC_SUBST(nmrundir, "$localstatedir/run/$PACKAGE", [NetworkManager runtime state directory])
2012-08-01 18:01:33 +00:00
# Alternative configuration plugins
AC_ARG_ENABLE(ifcfg-rh, AS_HELP_STRING([--enable-ifcfg-rh], [enable ifcfg-rh configuration plugin (Fedora/RHEL)]))
AC_ARG_ENABLE(ifcfg-suse, AS_HELP_STRING([--enable-ifcfg-suse], [enable ifcfg-suse configuration plugin (SUSE)]))
AC_ARG_ENABLE(ifupdown, AS_HELP_STRING([--enable-ifupdown], [enable ifupdown configuration plugin (Debian/Ubuntu)]))
AC_ARG_ENABLE(ifnet, AS_HELP_STRING([--enable-ifnet], [enable ifnet configuration plugin (Gentoo)]))
# Default alternative plugins by distribution
AS_IF([test -z "$enable_ifcfg_rh"], AC_CHECK_FILE(/etc/redhat-release, enable_ifcfg_rh=yes))
AS_IF([test -z "$enable_ifcfg_rh"], AC_CHECK_FILE(/etc/fedora-release, enable_ifcfg_rh=yes))
AS_IF([test -z "$enable_ifcfg_rh"], AC_CHECK_FILE(/etc/mandriva-release, enable_ifcfg_rh=yes))
AS_IF([test -z "$enable_ifcfg_suse"], AC_CHECK_FILE(/etc/SuSE-release, enable_ifcfg_suse=yes))
AS_IF([test -z "$enable_ifupdown"], AC_CHECK_FILE(/etc/debian_version, enable_ifupdown=yes))
AS_IF([test -z "$enable_ifnet"], AC_CHECK_FILE(/etc/gentoo-release, enable_ifnet=yes))
# Otherwise plugins default to "no"
AS_IF([test -z "$enable_ifcfg_rh"], enable_ifcfg_rh=no)
AS_IF([test -z "$enable_ifcfg_suse"], enable_ifcfg_suse=no)
AS_IF([test -z "$enable_ifupdown"], enable_ifupdown=no)
AS_IF([test -z "$enable_ifnet"], enable_ifnet=no)
# Create automake conditionals
AM_CONDITIONAL(CONFIG_PLUGIN_IFCFG_RH, test "$enable_ifcfg_rh" = "yes")
AM_CONDITIONAL(CONFIG_PLUGIN_IFCFG_SUSE, test "$enable_ifcfg_suse" = "yes")
AM_CONDITIONAL(CONFIG_PLUGIN_IFUPDOWN, test "$enable_ifupdown" = "yes")
AM_CONDITIONAL(CONFIG_PLUGIN_IFNET, test "$enable_ifnet" = "yes")
2013-12-16 19:42:40 +00:00
if test "$enable_ifcfg_rh" = "yes"; then
DISTRO_NETWORK_SERVICE=network.service
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
2012-11-14 22:14:52 +00:00
AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=<NM-distribution-version>], [Define the NM''s distribution version string]), ac_distver=$withval, ac_distver="")
2010-04-23 13:25:32 +00:00
if ! test x"$ac_distver" = x""; then
AC_DEFINE_UNQUOTED(NM_DIST_VERSION, "$ac_distver", [Define the distribution version string])
fi
2012-03-01 05:11:04 +00:00
dnl
dnl Default to using WEXT but allow it to be disabled
dnl
AC_ARG_WITH(wext, AS_HELP_STRING([--with-wext=yes], [Enable or disable Linux Wireless Extensions]), ac_with_wext=$withval, ac_with_wext="yes")
if test x"$ac_with_wext" = x"yes"; then
AC_MSG_CHECKING([Linux kernel WEXT headers])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#ifndef __user
#define __user
#endif
#include <sys/types.h>
#include <linux/types.h>
#include <sys/socket.h>
#include <linux/wireless.h>]],
[[#ifndef IWEVGENIE
#error "not found"
#endif]])],
[ac_have_iwevgenie=yes],
[ac_have_iwevgenie=no])
AC_MSG_RESULT($ac_have_iwevgenie)
if test "$ac_have_iwevgenie" = no; then
AC_MSG_ERROR(Linux kernel development header linux/wireless.h not installed or not functional)
fi
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
AC_MSG_CHECKING([Linux kernel nl80211 headers])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#ifndef __user
#define __user
#endif
#include <sys/types.h>
#include <linux/types.h>
#include <sys/socket.h>
#include <linux/nl80211.h>]],
2012-11-13 14:39:03 +00:00
[[int a = NL80211_RATE_INFO_BITRATE; a++;]])],
2011-10-05 19:29:01 +00:00
[ac_have_nl80211=yes],
[ac_have_nl80211=no])
AC_MSG_RESULT($ac_have_nl80211)
if test "$ac_have_nl80211" = no; then
AC_MSG_ERROR(Linux kernel development header linux/nl80211.h not installed or not functional)
2005-10-19 15:16:35 +00:00
fi
2004-06-24 14:18:37 +00:00
2013-05-23 16:08:27 +00:00
AC_MSG_CHECKING([Linux kernel nl80211 Critical Protocol Start/Stop])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#ifndef __user
#define __user
#endif
#include <sys/types.h>
#include <linux/types.h>
#include <sys/socket.h>
#include <linux/nl80211.h>]],
[[unsigned int a = NL80211_CMD_CRIT_PROTOCOL_START; a++;]])],
[ac_have_nl80211_critproto=yes],
[ac_have_nl80211_critproto=no])
AC_MSG_RESULT($ac_have_nl80211_critproto)
if test "$ac_have_nl80211_critproto" = yes; then
AC_DEFINE(HAVE_NL80211_CRITICAL_PROTOCOL_CMDS, 1, [Define if nl80211 has critical protocol support])
else
AC_DEFINE(HAVE_NL80211_CRITICAL_PROTOCOL_CMDS, 0, [Define if nl80211 has critical protocol support])
fi
2012-03-09 18:20:42 +00:00
dnl
2014-02-19 18:43:02 +00:00
dnl Check for newer VLAN flags
2012-03-09 18:20:42 +00:00
dnl
AC_MSG_CHECKING([Linux kernel VLAN_FLAG_LOOSE_BINDING enum value])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#ifndef __user
#define __user
#endif
#include <sys/types.h>
#include <linux/types.h>
#include <linux/if_vlan.h>]],
[[unsigned int a = VLAN_FLAG_LOOSE_BINDING;]])],
[ac_have_vlan_flag_loose_binding=yes],
[ac_have_vlan_flag_loose_binding=no])
AC_MSG_RESULT($ac_have_vlan_flag_loose_binding)
if test "$ac_have_vlan_flag_loose_binding" = yes; then
AC_DEFINE(HAVE_VLAN_FLAG_LOOSE_BINDING, 1, [Define if you have VLAN_FLAG_LOOSE_BINDING])
else
AC_DEFINE(HAVE_VLAN_FLAG_LOOSE_BINDING, 0, [Define if you have VLAN_FLAG_LOOSE_BINDING])
fi
2009-11-06 21:40:13 +00:00
dnl
dnl Checks for libm - needed for pow()
dnl
LT_LIB_M
2009-11-06 21:40:44 +00:00
dnl
dnl Checks for libdl - on certain platforms its part of libc
dnl
AC_CHECK_LIB([dl], [dladdr], LIBDL="-ldl", LIBDL="")
AC_SUBST(LIBDL)
2010-08-11 20:40:25 +00:00
dnl
2013-01-30 17:10:56 +00:00
dnl Checks for dbus-glib
2010-08-11 20:40:25 +00:00
dnl
2012-07-19 17:58:24 +00:00
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1 dbus-glib-1 >= 0.94)
2005-01-12 18:40:04 +00:00
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
2012-10-07 17:10:57 +00:00
AC_CHECK_LIB([dbus-glib-1], [dbus_g_method_invocation_get_g_connection], ac_have_gmi_get_con="1", ac_have_gmi_get_con="0")
AC_DEFINE_UNQUOTED(HAVE_DBUS_GLIB_GMI_GET_CONNECTION, $ac_have_gmi_get_con, [Define if you have a dbus-glib with dbus_g_method_invocation_get_g_connection()])
2012-10-05 03:26:18 +00:00
dnl
dnl Only dbus-glib >= 0.100 can use private dbus connections
dnl
PKG_CHECK_MODULES(DBUS_GLIB_100, [dbus-glib-1 >= 0.100], [have_dbus_glib_100=yes],[have_dbus_glib_100=no])
if (test "${have_dbus_glib_100}" = "yes"); then
AC_DEFINE(HAVE_DBUS_GLIB_100, 1, [Define if you have dbus-glib >= 0.100])
else
AC_DEFINE(HAVE_DBUS_GLIB_100, 0, [Define if you have dbus-glib >= 0.100])
fi
2013-05-14 15:14:43 +00:00
AM_CONDITIONAL(HAVE_DBUS_GLIB_100, test "${have_dbus_glib_100}" = "yes")
2012-10-05 03:26:18 +00:00
2013-02-24 13:24:41 +00:00
PKG_CHECK_MODULES(GLIB, gio-unix-2.0 >= 2.32 gmodule-2.0)
2012-10-31 21:01:36 +00:00
2013-02-24 13:24:41 +00:00
dnl GLIB_VERSION_MIN_REQUIRED should match the version above.
2014-02-08 13:03:49 +00:00
dnl GLIB_VERSION_MAX_ALLOWED should be set to the same version;
dnl nm-glib-compat.h will cause it to be overridden for the functions
dnl we have compat versions of.
GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32"
2012-05-17 13:46:24 +00:00
2005-12-09 23:25:22 +00:00
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
2012-11-26 20:02:03 +00:00
PKG_CHECK_MODULES(GUDEV, gudev-1.0 >= 165)
2009-06-05 05:55:02 +00:00
AC_SUBST(GUDEV_CFLAGS)
AC_SUBST(GUDEV_LIBS)
2011-01-21 20:46:09 +00:00
GOBJECT_INTROSPECTION_CHECK([0.9.6])
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])
2011-04-21 00:38:31 +00:00
AC_ARG_ENABLE(qt, AS_HELP_STRING([--enable-qt], [enable Qt examples]),
[enable_qt=${enableval}], [enable_qt=${have_qt}])
if (test "${enable_qt}" = "yes"); then
if test x"$have_qt" = x"no"; then
AC_MSG_ERROR(Qt development headers are required)
fi
AC_SUBST(QT_CFLAGS)
AC_SUBST(QT_LIBS)
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")
2009-08-05 20:34:02 +00:00
AC_ARG_WITH(udev-dir, AS_HELP_STRING([--with-udev-dir=DIR], [where the udev base directory is]))
if test -n "$with_udev_dir" ; then
UDEV_BASE_DIR="$with_udev_dir"
else
UDEV_BASE_DIR="/lib/udev"
fi
AC_SUBST(UDEV_BASE_DIR)
2012-02-01 22:49:46 +00:00
# systemd unit support
2012-11-15 06:48:51 +00:00
AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
[Directory for systemd service files]))
# default location
AS_IF([test -z "$with_systemdsystemunitdir" && $PKG_CONFIG systemd],
with_systemdsystemunitdir="\$(prefix)/lib/systemd/system")
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
2013-05-15 12:37:25 +00:00
PKG_CHECK_MODULES(SYSTEMD_200, [systemd >= 200], [have_systemd_200=yes],[have_systemd_200=no])
AM_CONDITIONAL(HAVE_SYSTEMD_200, test "${have_systemd_200}" = "yes")
2012-11-23 21:01:25 +00:00
# session tracking support
2012-12-28 17:52:01 +00:00
AC_MSG_CHECKING([Session tracking support])
2012-11-23 21:01:25 +00:00
AC_ARG_WITH(session-tracking, AS_HELP_STRING([--with-session-tracking=systemd|consolekit|no],
[Select session tracking support (default: consolekit)]))
# default to consolekit
AS_IF([test -z "$with_session_tracking"], with_session_tracking=consolekit)
AS_IF([test "$with_session_tracking" = "ck"], with_session_tracking=consolekit)
AS_IF([test "$with_session_tracking" = "none"], with_session_tracking=no)
# check value
2013-01-02 09:37:36 +00:00
AS_IF([! (echo "$with_session_tracking" | grep -q -E "^(systemd|consolekit|no)$")],
2012-11-23 21:01:25 +00:00
AC_MSG_ERROR([--with-session-tracking must be systemd/consolekit/no, not $with_session_tracking]))
# add conditionals and subtitutions
AM_CONDITIONAL(SESSION_TRACKING_CK, test "$with_session_tracking" = "consolekit")
2013-04-24 01:29:42 +00:00
AM_CONDITIONAL(SESSION_TRACKING_SYSTEMD, test "$with_session_tracking" = "systemd")
2012-11-23 21:01:25 +00:00
if test "$with_session_tracking" = "systemd"; then
PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login])
AC_SUBST(SYSTEMD_LOGIN_CFLAGS)
AC_SUBST(SYSTEMD_LOGIN_LIBS)
fi
2013-01-02 09:36:51 +00:00
if test "$with_session_tracking" = "consolekit"; then
2012-11-23 21:01:25 +00:00
AC_SUBST(CKDB_PATH, /var/run/ConsoleKit/database)
2011-12-24 01:07:07 +00:00
fi
2012-12-28 17:52:01 +00:00
AC_MSG_RESULT($with_session_tracking)
2011-12-24 01:07:07 +00:00
2012-11-06 20:22:44 +00:00
AC_ARG_WITH(suspend-resume, AS_HELP_STRING([--with-suspend-resume=upower|systemd], [Build NetworkManager with specific suspend/resume support]))
if test "z$with_suspend_resume" = "z"; then
2013-04-26 12:48:34 +00:00
PKG_CHECK_EXISTS([libsystemd-login >= 183], [have_systemd_inhibit=yes], [have_systemd_inhibit=no])
2012-11-06 20:22:44 +00:00
if test "z${have_systemd_inhibit}" = "zyes"; then
# Use systemd if it's new enough
with_suspend_resume="systemd"
else
# Fall back to upower
with_suspend_resume="upower"
fi
fi
case $with_suspend_resume in
upower) ;;
systemd)
2013-04-26 12:48:34 +00:00
PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])
2012-11-06 20:22:44 +00:00
;;
*)
AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd])
;;
esac
AM_CONDITIONAL(SUSPEND_RESUME_UPOWER, test "x$with_suspend_resume" = "xupower")
AM_CONDITIONAL(SUSPEND_RESUME_SYSTEMD, test "x$with_suspend_resume" = "xsystemd")
2014-03-25 12:55:47 +00:00
# SELinux support
AC_ARG_WITH(selinux, AS_HELP_STRING([--with-selinux=yes|no|auto], [Build with SELinux (default: auto)]),,[with_selinux=auto])
if test "$with_selinux" = "yes" -o "$with_selinux" = "auto"; then
PKG_CHECK_MODULES(SELINUX, libselinux, [have_selinux=yes], [have_selinux=no])
else
have_selinux=no
fi
if test "$with_selinux" = "yes" -a "$have_selinux" = "no"; then
AC_MSG_ERROR([You must have libselinux installed to build --with-selinux=yes.])
fi
if test "$have_selinux" = "yes"; then
AC_DEFINE(HAVE_SELINUX, 1, [Define if you have SELinux support])
else
AC_DEFINE(HAVE_SELINUX, 0, [Define if you have SELinux support])
fi
AM_CONDITIONAL(HAVE_SELINUX, test "${have_selinux}" = "yes")
2012-11-22 15:09:35 +00:00
# libnl support for the linux platform
2013-05-03 23:46:14 +00:00
PKG_CHECK_MODULES(LIBNL, libnl-3.0 >= 3.2.8 libnl-route-3.0 libnl-genl-3.0)
2013-01-23 09:18:59 +00:00
AC_SUBST(LIBNL_CFLAGS)
AC_SUBST(LIBNL_LIBS)
2005-10-28 03:16:02 +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)
AC_SUBST(UUID_CFLAGS)
AC_SUBST(UUID_LIBS)
2014-05-13 13:50:38 +00:00
dnl
dnl Checks for readline library - used by nmcli
dnl
#PKG_CHECK_MODULES(READLINE, readline)
AC_CHECK_LIB(readline, readline, [READLINE_LIBS=-lreadline], [AC_MSG_ERROR(readline library is required)])
AC_CHECK_HEADERS(readline/readline.h, [], [AC_MSG_ERROR(readline/readline.h - readline devel files required)])
AC_SUBST(READLINE_LIBS)
2011-03-18 17:29:06 +00:00
# Intel WiMAX SDK checks
PKG_CHECK_MODULES(IWMX_SDK, [libiWmxSdk-0 >= 1.5.1], [have_wimax=yes],[have_wimax=no])
2011-03-14 06:24:08 +00:00
AC_ARG_ENABLE(wimax, AS_HELP_STRING([--enable-wimax], [enable WiMAX support]),
2011-03-18 17:29:06 +00:00
[enable_wimax=${enableval}], [enable_wimax=${have_wimax}])
2011-01-06 00:23:08 +00:00
if (test "${enable_wimax}" = "yes"); then
2011-03-18 17:29:06 +00:00
if test x"$have_wimax" = x"no"; then
AC_MSG_ERROR(Intel WiMAX SDK is required)
fi
2013-05-06 17:15:28 +00:00
# Ensure the WiMAX stack is built with libnl3; otherwise crashes happen
# due to symbol conflicts
WMX_LIB_PATH=`$PKG_CONFIG --variable=libdir libiWmxSdk-0`
FOO=`ldd $WMX_LIB_PATH/libiWmxSdk.so.0.0.0 | grep libnl-3 2>&1`
if test "$?" != "0"; then
AC_MSG_ERROR([Intel WiMAX stack built with incompatible libnl version!])
fi
2011-01-06 00:23:08 +00:00
AC_SUBST(IWMX_SDK_CFLAGS)
AC_SUBST(IWMX_SDK_LIBS)
AC_DEFINE(WITH_WIMAX, 1, [Define if you have WiMAX support])
2011-04-14 18:16:55 +00:00
else
AC_DEFINE(WITH_WIMAX, 0, [Define if you have WiMAX support])
2011-01-06 00:23:08 +00:00
fi
AM_CONDITIONAL(WITH_WIMAX, test "${enable_wimax}" = "yes")
2008-05-12 02:49:54 +00:00
2013-08-16 13:33:46 +00:00
# Teamd control checks
2014-02-27 15:13:20 +00:00
PKG_CHECK_MODULES(LIBTEAMDCTL, [libteamdctl >= 1.9], [have_teamdctl=yes],[have_teamdctl=no])
2013-08-16 13:33:46 +00:00
AC_ARG_ENABLE(teamdctl, AS_HELP_STRING([--enable-teamdctl], [enable Teamd control support]),
[enable_teamdctl=${enableval}], [enable_teamdctl=${have_teamdctl}])
if (test "${enable_teamdctl}" = "yes"); then
if test x"$have_teamdctl" = x"no"; then
AC_MSG_ERROR(Teamd control is required)
fi
AC_SUBST(LIBTEAMDCTL_CFLAGS)
AC_SUBST(LIBTEAMDCTL_LIBS)
# 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")
2011-05-19 03:38:39 +00:00
PKG_CHECK_MODULES(POLKIT, [polkit-gobject-1 >= 0.97], [have_polkit=yes],[have_polkit=no])
AC_ARG_ENABLE(polkit, AS_HELP_STRING([--enable-polkit], [enable PolicyKit support]),
[enable_polkit=${enableval}], [enable_polkit=${have_polkit}])
if (test "${enable_polkit}" = "yes"); then
if test x"$have_polkit" = x"no"; then
AC_MSG_ERROR(PolicyKit development headers are required)
fi
AC_SUBST(POLKIT_CFLAGS)
AC_SUBST(POLKIT_LIBS)
AC_DEFINE(WITH_POLKIT, 1, [Define if you have PolicyKit support])
else
AC_DEFINE(WITH_POLKIT, 0, [Define if you have PolicyKit support])
fi
AM_CONDITIONAL(WITH_POLKIT, test "${enable_polkit}" = "yes")
2008-05-12 02:49:54 +00:00
2012-09-28 12:45:05 +00:00
AC_ARG_ENABLE(modify-system,
AS_HELP_STRING([--enable-modify-system], [Allow users to modify system connections]))
if test "${enable_modify_system}" = "yes"; then
if ! test "${enable_polkit}" = "yes"; then
AC_MSG_ERROR([--enable-modify-system requires --enable-polkit])
fi
NM_MODIFY_SYSTEM_POLICY="yes"
else
NM_MODIFY_SYSTEM_POLICY="auth_admin_keep"
fi
AC_SUBST(NM_MODIFY_SYSTEM_POLICY)
2012-07-19 14:40:50 +00:00
AC_ARG_WITH(crypto, AS_HELP_STRING([--with-crypto=nss|gnutls], [Cryptography library to use for certificate and key operations]),ac_crypto=$withval, ac_crypto=nss)
2008-05-22 17:19:34 +00:00
with_nss=no
with_gnutls=no
if test x"$ac_crypto" = xnss; then
2008-05-19 07:43:13 +00:00
PKG_CHECK_MODULES(NSS, [nss >= 3.11])
2010-11-07 22:31:53 +00:00
# Work around a pkg-config bug (fdo #29801) where exists != usable
2013-05-06 17:15:28 +00:00
FOO=`$PKG_CONFIG --cflags --libs nss`
if test x"$?" != "x0"; then
AC_MSG_ERROR([No usable NSS found])
2010-11-07 22:31:53 +00:00
fi
2010-11-07 21:02:11 +00:00
AC_SUBST(NSS_CFLAGS)
AC_SUBST(NSS_LIBS)
2008-05-19 07:43:13 +00:00
AC_DEFINE(HAVE_NSS, 1, [Define if you have NSS])
2008-05-22 17:19:34 +00:00
with_nss=yes
elif test x"$ac_crypto" = xgnutls; then
2008-05-19 07:43:13 +00:00
PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.2])
AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
2008-05-22 17:19:34 +00:00
if test x"$LIBGCRYPT_CONFIG" = xno; then
AC_MSG_ERROR([gnutls explicitly requested but gcrypt not found on system])
else
AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have libgnutls])
LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
AC_SUBST(LIBGCRYPT_CFLAGS)
AC_SUBST(LIBGCRYPT_LIBS)
with_gnutls=yes
fi
2008-05-19 07:43:13 +00:00
else
2010-11-07 21:02:11 +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
2008-05-22 17:19:34 +00:00
AM_CONDITIONAL(WITH_NSS, test x"$with_nss" != xno)
AM_CONDITIONAL(WITH_GNUTLS, test x"$with_gnutls" != xno)
2008-05-19 07:43:13 +00:00
2008-05-22 17:19:34 +00:00
# Shouldn't ever trigger this, but just in case...
2008-05-19 07:43:13 +00:00
if test x"$ac_nss" = xno -a x"$ac_gnutls" = xno; then
2008-05-22 17:19:34 +00:00
AC_MSG_ERROR([Could not find required development headers and libraries for '$ac_crypto'])
2008-05-19 07:43:13 +00:00
fi
2012-02-08 17:56:52 +00:00
GLIB_MAKEFILE='$(top_srcdir)/Makefile.glib'
AC_SUBST(GLIB_MAKEFILE)
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
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
2013-02-24 12:53:30 +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
2007-12-18 02:43:42 +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
DBUS_SYS_DIR="$with_dbus_sys_dir"
2004-07-28 18:04:23 +00:00
else
2004-08-13 15:59:47 +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
2011-03-14 06:24:08 +00:00
AC_ARG_ENABLE(ppp, AS_HELP_STRING([--enable-ppp], [enable PPP/PPPoE support]),
2011-02-21 23:48:08 +00:00
[enable_ppp=${enableval}], [enable_ppp=yes])
if (test "${enable_ppp}" = "yes"); then
AC_CHECK_HEADERS(pppd/pppd.h,,
2012-10-29 23:31:51 +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
2007-12-18 02:43:42 +00:00
AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory]))
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
AC_PATH_PROG(PPPD_PATH, pppd, [], $PATH:/sbin:/usr/sbin)
else
PPPD_PATH="$with_pppd"
fi
AC_DEFINE_UNQUOTED(PPPD_PATH, "$PPPD_PATH", [Define to path of pppd binary])
AC_SUBST(PPPD_PATH)
2014-04-04 15:50:20 +00:00
AC_ARG_WITH(pppoe, AS_HELP_STRING([--with-pppoe=/path/to/pppoe], [path to pppoe binary]))
if test "x${with_pppoe}" = x; then
AC_PATH_PROG(PPPOE_PATH, pppoe, [], $PATH:/sbin:/usr/sbin)
else
PPPOE_PATH="$with_pppoe"
fi
AC_DEFINE_UNQUOTED(PPPOE_PATH, "$PPPOE_PATH", [Define to path of pppoe binary])
AC_SUBST(PPPOE_PATH)
2012-11-07 14:40:35 +00:00
# ModemManager1 with libmm-glib
AC_ARG_WITH(modem-manager-1, AS_HELP_STRING([--with-modem-manager-1], [Enable new ModemManager1 interface support]),,[with_modem_manager_1=auto])
if (test "${with_modem_manager_1}" != "no"); then
PKG_CHECK_MODULES(MM_GLIB,
2013-06-05 14:34:10 +00:00
[mm-glib >= 0.7.991],
2012-11-07 14:40:35 +00:00
[have_libmm_glib=yes],
[have_libmm_glib=no])
AC_SUBST(MM_GLIB_CFLAGS)
AC_SUBST(MM_GLIB_LIBS)
if (test "${have_libmm_glib}" = "no"); then
if (test "${with_modem_manager_1}" = "yes"); then
AC_MSG_ERROR([Couldn't find libmm-glib])
2013-05-08 08:32:05 +00:00
else
with_modem_manager_1="no"
2012-11-07 14:40:35 +00:00
fi
else
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")
2011-02-21 23:48:08 +00:00
2012-10-29 23:31:51 +00:00
# DHCP client support
2010-01-13 06:55:24 +00:00
AC_ARG_WITH([dhclient], AS_HELP_STRING([--with-dhclient=yes|no|path], [Enable dhclient 4.x support]))
AC_ARG_WITH([dhcpcd], AS_HELP_STRING([--with-dhcpcd=yes|no|path], [Enable dhcpcd 4.x support]))
2012-10-29 23:31:51 +00:00
# Default to "yes"
AS_IF([test -z "$with_dhclient"], with_dhclient=yes)
AS_IF([test -z "$with_dhcpcd"], with_dhcpcd=yes)
# Search and check the executables
if test "$with_dhclient" = "yes"; then
AC_PATH_PROGS(with_dhclient, dhclient, no, /sbin:/usr/sbin:/usr/local/sbin)
if test "$with_dhclient" != "no"; then
if ! $with_dhclient --version 2>&1 | grep -q "^isc-dhclient-4\."; then
AC_MSG_WARN([Cannot use dhclient, version 4.x is required])
with_dhclient=no
2008-07-16 20:39:58 +00:00
fi
2012-10-29 23:31:51 +00:00
fi
fi
if test "$with_dhcpcd" = "yes"; then
AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin)
if test "$with_dhcpcd" != "no"; then
2013-07-19 18:32:44 +00:00
if ! $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [[456789]]\."; then
AC_MSG_WARN([Cannot use dhcpcd, version 4.x or higher is required])
2012-10-29 23:31:51 +00:00
with_dhcpcd=no
2013-11-27 23:14:32 +00:00
elif $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [[6789]]\."; then
AC_DEFINE(DHCPCD_SUPPORTS_IPV6, 1, [Define if dhcpcd supports IPv6 (6.x+)])
2012-10-29 23:31:51 +00:00
fi
fi
fi
# Fallback
if test "$with_dhclient" = "no" -a "$with_dhcpcd" = "no"; then
AC_MSG_WARN([Could not find a suitable DHCP client, falling back to dhclient])
with_dhclient=/sbin/dhclient
fi
# Add substitutions
if test "$with_dhclient" != "no"; then
AC_SUBST(DHCLIENT_PATH, $with_dhclient)
fi
if test "$with_dhcpcd" != "no"; then
AC_SUBST(DHCPCD_PATH, $with_dhcpcd)
2008-07-16 20:39:58 +00:00
fi
2012-09-24 22:12:52 +00:00
# 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]))
# Use netconfig by default on SUSE
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, no, /sbin:/usr/sbin:/usr/local/sbin)
fi
if test "$with_netconfig" = "yes"; then
AC_PATH_PROGS(with_netconfig, netconfig, no, /sbin:/usr/sbin:/usr/local/sbin)
fi
# Define resolvconf and netconfig paths
2012-11-01 12:22:14 +00:00
if test "$with_resolvconf" != "no"; then
2012-09-24 22:12:52 +00:00
AC_DEFINE_UNQUOTED(RESOLVCONF_PATH, "$with_resolvconf", [Path to resolvconf (if enabled)])
fi
2012-11-01 12:22:14 +00:00
if test "$with_netconfig" != "no"; then
2012-09-24 22:12:52 +00:00
AC_DEFINE_UNQUOTED(NETCONFIG_PATH, "$with_netconfig", [Path to netconfig (if enabled)])
2008-09-05 18:57:07 +00:00
fi
2009-10-01 11:31:09 +00:00
# iptables path
2011-03-14 06:24:08 +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
AC_PATH_PROG(IPTABLES_PATH, iptables, [], $PATH:/sbin:/usr/sbin)
if ! test -x "$IPTABLES_PATH"; then
AC_MSG_ERROR(iptables was not installed.)
fi
else
IPTABLES_PATH="$with_iptables"
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
AC_ARG_WITH(dnsmasq, AS_HELP_STRING([--with-dnsmasq=/path/to/dnsmasq], [path to dnsmasq]))
if test "x${with_dnsmasq}" = x; then
AC_PATH_PROG(DNSMASQ_PATH, dnsmasq, [], $PATH:/sbin:/usr/sbin)
else
DNSMASQ_PATH="$with_dnsmasq"
fi
AC_DEFINE_UNQUOTED(DNSMASQ_PATH, "$DNSMASQ_PATH", [Define to path of dnsmasq binary])
AC_SUBST(DNSMASQ_PATH)
2008-11-21 18:59:37 +00:00
# system CA certificates path
AC_ARG_WITH(system-ca-path, AS_HELP_STRING([--with-system-ca-path=/path/to/ssl/certs], [path to system CA certificates]))
if test "x${with_system_ca_path}" = x; then
SYSTEM_CA_PATH=/etc/ssl/certs
else
SYSTEM_CA_PATH="$with_system_ca_path"
fi
AC_DEFINE_UNQUOTED(SYSTEM_CA_PATH, "$SYSTEM_CA_PATH", [Define to path to system CA certificates])
AC_SUBST(SYSTEM_CA_PATH)
2010-07-01 17:32:11 +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)]))
if test -n "$with_kernel_firmware_dir" ; then
KERNEL_FIRMWARE_DIR="$with_kernel_firmware_dir"
else
KERNEL_FIRMWARE_DIR="/lib/firmware"
fi
AC_DEFINE_UNQUOTED(KERNEL_FIRMWARE_DIR, "$KERNEL_FIRMWARE_DIR", [Define to path of the kernel firmware directory])
AC_SUBST(KERNEL_FIRMWARE_DIR)
2011-12-05 21:11:13 +00:00
PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26], [have_libsoup=yes],[have_libsoup=no])
2013-12-16 18:51:24 +00:00
if test "$have_libsoup" = "yes"; then
AC_DEFINE(HAVE_LIBSOUP, 1, [Define if you have libsoup])
else
AC_DEFINE(HAVE_LIBSOUP, 0, [Define if you have libsoup])
fi
2011-12-05 21:11:13 +00:00
AC_ARG_ENABLE(concheck, AS_HELP_STRING([--enable-concheck], [enable connectivity checking support]),
[enable_concheck=${enableval}], [enable_concheck=${have_libsoup}])
if (test "${enable_concheck}" = "yes"); then
2012-05-13 09:16:44 +00:00
if test x"$have_libsoup" = x"no"; then
2011-12-05 21:11:13 +00:00
AC_MSG_ERROR(Connectivity checking requires libsoup development headers)
fi
AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS)
AC_DEFINE(WITH_CONCHECK, 1, [Define if you want connectivity checking support])
else
AC_DEFINE(WITH_CONCHECK, 0, [Define if you want connectivity checking support])
fi
AM_CONDITIONAL(WITH_CONCHECK, test "${enable_concheck}" = "yes")
2014-02-03 11:04:51 +00:00
PKG_CHECK_MODULES(LIBNDP, [libndp])
2013-06-13 13:05:40 +00:00
2013-12-02 21:20:26 +00:00
AC_ARG_WITH(nmtui, AS_HELP_STRING([--with-nmtui=yes|no], [Build nmtui]))
if test "$with_nmtui" != no; then
PKG_CHECK_MODULES(NEWT, [libnewt >= 0.52.15], [build_nmtui=yes], [build_nmtui=no])
else
build_nmtui=no
fi
if test "$with_nmtui" = yes -a "$build_nmtui" = no; then
AC_MSG_ERROR([You must have libnewt installed to build nmtui.])
fi
AM_CONDITIONAL(BUILD_NMTUI, test "$build_nmtui" = yes)
2013-06-13 13:05:40 +00:00
2009-04-22 00:50:45 +00:00
NM_COMPILER_WARNINGS
2004-12-01 22:45:10 +00:00
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)
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)]))
2013-03-22 18:45:11 +00:00
AC_ARG_WITH(valgrind, AS_HELP_STRING([--with-valgrind=yes|no|path], [Use valgrind to memory-check the tests (default: yes)]))
2013-05-10 14:55:09 +00:00
# Fallback to --with-tests
2012-11-05 10:35:34 +00:00
AC_ARG_WITH(tests, AS_HELP_STRING([--with-tests], [Build NetworkManager tests (deprecated)]))
AS_IF([test -n "$with_tests"], enable_tests="$with_tests")
2013-05-10 14:55:09 +00:00
# Default to --enable-tests --with-valgrind
2012-11-05 10:35:34 +00:00
AS_IF([test -z "$enable_tests"], enable_tests="yes")
2013-03-22 18:45:11 +00:00
AS_IF([test -z "$with_valgrind"], with_valgrind="yes")
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"],
[AC_PATH_PROGS(with_valgrind, valgrind, no)])
# Add conditionals and substitutions
2012-12-18 13:14:13 +00:00
AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no")
AM_CONDITIONAL(RUN_ROOT_TESTS, test "$enable_tests" == "root")
2013-03-23 01:54:20 +00:00
AS_IF([test "$with_valgrind" != "no"],
2013-07-26 12:16:47 +00:00
AC_SUBST(VALGRIND_RULES, 'TESTS_ENVIRONMENT = "$(top_srcdir)/tools/run-test-valgrind.sh" "$(LIBTOOL)" "$(with_valgrind)" "$(top_srcdir)/valgrind.suppressions"'),
2013-03-22 18:45:11 +00:00
AC_SUBST(VALGRIND_RULES, []))
2013-05-10 14:55:09 +00:00
2012-11-05 10:35:34 +00:00
GTK_DOC_CHECK(1.0)
2009-01-12 19:21:44 +00:00
2013-05-10 14:55:09 +00:00
# check for pregenerated manpages to be installed
install_pregen_manpages=no
if test "$enable_gtk_doc" != "yes" \
-a -f man/NetworkManager.conf.5 \
-a -f man/nm-settings.5 \
2013-11-16 15:51:27 +00:00
-a -f man/nmcli-examples.5 \
2013-05-10 14:55:09 +00:00
-a -f man/NetworkManager.8; then
install_pregen_manpages=yes
fi
AM_CONDITIONAL(INSTALL_PREGEN_MANPAGES, test "x${install_pregen_manpages}" = "xyes")
2007-12-18 02:43:42 +00:00
AC_CONFIG_FILES([
2004-06-24 14:18:37 +00:00
Makefile
2005-12-06 23:37:09 +00:00
include/Makefile
2011-03-02 23:16:27 +00:00
include/nm-version.h
2004-06-24 14:18:37 +00:00
src/Makefile
2009-01-19 04:19:09 +00:00
src/tests/Makefile
2013-03-12 17:38:39 +00:00
src/config/tests/Makefile
2005-05-03 Dan Williams <dcbw@redhat.com>
* Kill dhcpcd. We now use "dhcdbd", a dbus daemon that controls dhclient.
This means that NetworkManager shouldn't have DHCP issues anymore. It also
means you need dhcdbd, which you can get here (get the latest one):
http://people.redhat.com/jvdias/dhcdbd/
Technically NetworkManager can use any DHCP daemon that uses the same DBUS
interface as dhcdbd.
* Rewrite device activation to facilitate the new DHCP infrastructure and
future improvements. Its now "activation request" based, ie there is a single
activation request composed of the device, access point, and other info which
follows the entire activation process. There are 5 stages of the activation
process which correspond to:
1) Device preparation
2) Device configuration (bring it up, set ESSID/Key/etc)
3) IP Config Start (fire off DHCP if we're using it)
4) IP Config Get (grab config from DHCP or static config files)
5) IP Config Commit (set device's IP address, DNS, etc)
Note that there is no longer a "scanning" step, since the access point must
be known _before_ activation starts. If the access point drops out or does
not exist for some reason, the entire activation process fails and must be
restarted for a different access point or device.
Patch from Bill Moss:
* gnome/applet/applet.c
- Fix type of vpn_failure dialog -> vpn_banner dialog
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@597 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-05-03 20:41:36 +00:00
src/dhcp-manager/Makefile
2010-12-18 05:00:03 +00:00
src/dhcp-manager/tests/Makefile
2012-10-12 20:25:23 +00:00
src/dnsmasq-manager/tests/Makefile
2009-05-10 02:34:35 +00:00
src/supplicant-manager/tests/Makefile
2007-08-15 14:30:06 +00:00
src/ppp-manager/Makefile
2011-02-15 17:55:34 +00:00
src/settings/plugins/Makefile
src/settings/plugins/ifupdown/Makefile
src/settings/plugins/ifupdown/tests/Makefile
src/settings/plugins/ifnet/Makefile
src/settings/plugins/ifnet/tests/Makefile
src/settings/plugins/ifcfg-rh/Makefile
src/settings/plugins/ifcfg-rh/tests/Makefile
src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile
src/settings/plugins/ifcfg-suse/Makefile
src/settings/plugins/keyfile/Makefile
src/settings/plugins/keyfile/tests/Makefile
src/settings/plugins/keyfile/tests/keyfiles/Makefile
2012-05-07 20:19:09 +00:00
src/settings/plugins/example/Makefile
2011-03-30 17:02:50 +00:00
src/settings/tests/Makefile
2013-06-19 11:32:20 +00:00
src/platform/Makefile
2013-03-27 21:23:24 +00:00
src/platform/tests/Makefile
2013-07-29 12:44:49 +00:00
src/rdisc/Makefile
2013-05-30 14:50:05 +00:00
src/rdisc/tests/Makefile
2014-03-19 18:16:48 +00:00
src/devices/adsl/Makefile
2013-05-08 12:37:26 +00:00
src/devices/wimax/Makefile
2014-02-10 12:35:56 +00:00
src/devices/bluetooth/Makefile
2014-04-15 22:12:13 +00:00
src/devices/wifi/Makefile
src/devices/wifi/tests/Makefile
2014-02-11 00:57:09 +00:00
src/devices/wwan/Makefile
2005-12-09 23:25:22 +00:00
libnm-util/libnm-util.pc
libnm-util/Makefile
2009-02-02 01:18:21 +00:00
libnm-util/tests/Makefile
2009-02-02 06:03:15 +00:00
libnm-util/tests/certs/Makefile
2009-08-26 18:07:35 +00:00
libnm-glib/libnm-glib.pc
libnm-glib/libnm-glib-vpn.pc
2007-02-12 09:23:43 +00:00
libnm-glib/Makefile
2010-12-28 23:11:27 +00:00
libnm-glib/tests/Makefile
2007-08-12 15:21:15 +00:00
callouts/Makefile
2011-05-03 03:38:51 +00:00
callouts/tests/Makefile
2008-03-24 17:42:17 +00:00
tools/Makefile
2010-02-25 17:52:30 +00:00
cli/Makefile
cli/src/Makefile
2013-02-17 01:07:36 +00:00
cli/completion/Makefile
2013-12-02 21:20:26 +00:00
tui/Makefile
tui/newt/Makefile
2004-06-24 17:55:51 +00:00
test/Makefile
2005-08-18 19:51:11 +00:00
initscript/RedHat/NetworkManager
2008-11-05 16:42:54 +00:00
initscript/Debian/NetworkManager
2006-04-17 02:03:09 +00:00
initscript/Slackware/rc.networkmanager
2005-08-18 19:51:11 +00:00
initscript/SUSE/networkmanager
2006-03-27 18:30:52 +00:00
initscript/Arch/networkmanager
2008-04-01 21:26:09 +00:00
initscript/Mandriva/networkmanager
2010-10-09 04:03:10 +00:00
initscript/linexa/networkmanager
2007-07-10 18:31:32 +00:00
introspection/Makefile
2011-08-06 08:59:19 +00:00
introspection/all.xml
2006-01-20 21:10:33 +00:00
man/Makefile
2010-03-01 20:35:20 +00:00
man/nm-system-settings.conf.5
2010-08-06 11:51:41 +00:00
man/nm-online.1
2010-04-14 21:40:52 +00:00
man/nmcli.1
2004-08-26 19:14:26 +00:00
po/Makefile.in
2008-05-09 06:33:30 +00:00
policy/Makefile
2012-09-28 12:45:05 +00:00
policy/org.freedesktop.NetworkManager.policy.in
2010-08-12 16:15:26 +00:00
data/Makefile
2009-02-15 16:20:25 +00:00
docs/Makefile
2011-02-16 22:24:16 +00:00
docs/api/Makefile
docs/api/version.xml
2008-08-12 08:05:21 +00:00
docs/libnm-glib/Makefile
2012-08-07 03:04:06 +00:00
docs/libnm-glib/version.xml
2008-11-19 18:46:01 +00:00
docs/libnm-util/Makefile
2012-08-07 03:04:06 +00:00
docs/libnm-util/version.xml
2004-09-02 02:30:03 +00:00
NetworkManager.pc
2010-02-18 18:17:08 +00:00
examples/Makefile
2011-12-08 15:36:37 +00:00
examples/shell/Makefile
2010-02-18 18:17:08 +00:00
examples/python/Makefile
2013-09-24 10:35:19 +00:00
examples/python/dbus/Makefile
examples/python/gi/Makefile
2011-11-29 15:20:04 +00:00
examples/ruby/Makefile
2010-09-30 19:09:01 +00:00
examples/C/Makefile
2011-04-21 00:25:50 +00:00
examples/C/glib/Makefile
2011-04-21 00:38:31 +00:00
examples/C/qt/Makefile
2012-09-20 15:19:11 +00:00
examples/dispatcher/Makefile
2012-06-12 19:57:00 +00:00
vapi/Makefile
2004-06-24 14:18:37 +00:00
])
2013-06-04 17:07:03 +00:00
AC_CONFIG_SUBDIRS([libndp])
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"
echo " systemdunitdir: $with_systemdsystemunitdir"
2012-11-15 09:38:53 +00:00
echo " nmbinary: $nmbinary"
echo " nmconfdir: $nmconfdir"
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:"
echo " session tracking: $with_session_tracking"
echo " suspend/resume: $with_suspend_resume"
if test "${enable_polkit}" = "yes"; then
2013-01-29 19:47:31 +00:00
if test "${enable_modify_system}" = "yes"; then
2012-12-28 18:21:25 +00:00
echo " policykit: yes (permissive modify.system)"
else
echo " policykit: yes (restrictive modify.system)"
fi
else
echo " policykit: no"
fi
2014-03-25 12:55:47 +00:00
echo " selinux: $have_selinux"
2012-12-28 18:21:25 +00:00
echo
echo "Features:"
echo " wext: $ac_with_wext"
echo " wimax: $enable_wimax"
echo " ppp: $enable_ppp"
echo " modemmanager-1: $with_modem_manager_1"
echo " concheck: $enable_concheck"
2013-06-13 13:05:40 +00:00
echo " libndp: $libndp_location"
2013-08-16 13:33:46 +00:00
echo " libteamdctl: $enable_teamdctl"
2013-12-02 21:20:26 +00:00
echo " nmtui: $build_nmtui"
2012-11-22 15:09:35 +00:00
echo
echo "Configuration plugins"
2012-08-01 18:01:33 +00:00
echo " ifcfg-rh: ${enable_ifcfg_rh}"
echo " ifcfg-suse: ${enable_ifcfg_suse}"
echo " ifupdown: ${enable_ifupdown}"
echo " ifnet: ${enable_ifnet}"
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}"
echo
2010-01-13 06:55:24 +00:00
2012-10-29 23:31:51 +00:00
echo "DHCP clients:"
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:"
2013-05-10 14:55:09 +00:00
echo " documentation: $enable_gtk_doc"
2012-11-05 10:35:34 +00:00
echo " tests: $enable_tests"
2013-03-22 18:45:11 +00:00
echo " valgrind: $with_valgrind"
2012-12-19 16:48:52 +00:00
echo " code coverage: $enable_code_coverage"
2009-01-12 19:21:44 +00:00
echo