summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac53
1 files changed, 48 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index e7d31a77..4baa6852 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,7 @@
AC_PREREQ(2.60)
-AC_INIT(connman, 1.29)
+AC_INIT(connman, 1.35)
+
+AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
AC_CONFIG_HEADERS([config.h])
@@ -31,6 +33,8 @@ m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
+gl_CONFIGMAKE_PREP
+
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
[disable code optimization through compiler]), [
if (test "${enableval}" = "no"); then
@@ -178,6 +182,9 @@ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
AC_MSG_ERROR(resolver library support is required))
])
+AC_CHECK_HEADERS([execinfo.h])
+AM_CONDITIONAL([BACKTRACE], [test "${ac_cv_header_execinfo_h}" = "yes"])
+
AC_CHECK_FUNC(signalfd, dummy=yes,
AC_MSG_ERROR(signalfd support is required))
@@ -250,10 +257,41 @@ if (test -n "${path_systemdunit}"); then
fi
AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
-PKG_CHECK_MODULES(XTABLES, xtables >= 1.4.11, dummy=yes,
- AC_MSG_ERROR(Xtables library is required))
-AC_SUBST(XTABLES_CFLAGS)
-AC_SUBST(XTABLES_LIBS)
+AC_ARG_WITH([tmpfilesdir], AC_HELP_STRING([--with-tmpfilesdir=DIR],
+ [path to systemd tmpfiles.d directory]), [path_tmpfiles=${withval}],
+ [path_tmpfiles="`$PKG_CONFIG --variable=tmpfilesdir systemd`"])
+if (test -n "${path_tmpfiles}"); then
+ SYSTEMD_TMPFILESDIR="${path_tmpfiles}"
+ AC_SUBST(SYSTEMD_TMPFILESDIR)
+fi
+
+AC_ARG_WITH(firewall, AC_HELP_STRING([--with-firewall=TYPE],
+ [specify which firewall type is used iptables or nftables [default=iptables]]),
+ [firewall_type=${withval}],
+ [firewall_type="iptables"])
+
+if (test "${firewall_type}" != "iptables" -a \
+ "${firewall_type}" != "nftables"); then
+ AC_MSG_ERROR(neither nftables nor iptables support enabled)
+fi
+
+found_iptables="no"
+if (test "${firewall_type}" = "iptables"); then
+ PKG_CHECK_MODULES(XTABLES, xtables >= 1.4.11, [found_iptables="yes"],
+ AC_MSG_ERROR(Xtables library is required))
+ AC_SUBST(XTABLES_CFLAGS)
+ AC_SUBST(XTABLES_LIBS)
+fi
+AM_CONDITIONAL(XTABLES, test "${found_iptables}" != "no")
+
+found_nftables="no"
+if (test "${firewall_type}" = "nftables"); then
+ PKG_CHECK_MODULES(NFTABLES, [libnftnl >= 1.0.4 libmnl >= 1.0.0], [found_nftables="yes"],
+ AC_MSG_ERROR([libnftnl >= 1.0.4 or libmnl >= 1.0.0 not found]))
+ AC_SUBST(NFTABLES_CFLAGS)
+ AC_SUBST(NFTABLES_LIBS)
+fi
+AM_CONDITIONAL(NFTABLES, test "${found_nftables}" != "no")
AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
[enable test/example scripts]), [enable_test=${enableval}])
@@ -302,6 +340,11 @@ AC_ARG_ENABLE(wifi, AC_HELP_STRING([--disable-wifi],
[enable_wifi=${enableval}])
AM_CONDITIONAL(WIFI, test "${enable_wifi}" != "no")
+AC_ARG_ENABLE(iwd, AC_HELP_STRING([--enable-iwd],
+ [enable iwd support]),
+ [enable_iwd=${enableval}])
+AM_CONDITIONAL(IWD, test "${enable_iwd}" = "yes")
+
AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--disable-bluetooth],
[disable Bluetooth support]),
[enable_bluetooth=${enableval}])