AC_PREREQ(2.60)
-AC_INIT(connman, 1.9)
+AC_INIT(connman, 1.29)
AM_INIT_AUTOMAKE([foreign subdir-objects color-tests])
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
[disable code optimization through compiler]), [
if (test "${enableval}" = "no"); then
- CFLAGS="$CFLAGS -O0"
+ CFLAGS="$CFLAGS -O0 -U_FORTIFY_SOURCE"
fi
])
-GTK_DOC_CHECK
-
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
[enable compiling with debugging information]), [
if (test "${enableval}" = "yes" &&
fi
])
-AC_ARG_ENABLE(threads,
- AC_HELP_STRING([--enable-threads], [enable threading support]),
- [enable_threads=${enableval}], [enable_threads="no"])
-
AC_ARG_ENABLE(hh2serial-gps,
AC_HELP_STRING([--enable-hh2serial-gps], [enable hh2serial GPS support]),
[enable_hh2serial_gps=${enableval}], [enable_hh2serial_gps="no"])
AM_CONDITIONAL(HH2SERIAL_GPS, test "${enable_hh2serial_gps}" != "no")
AM_CONDITIONAL(HH2SERIAL_GPS_BUILTIN, test "${enable_hh2serial_gps}" = "builtin")
+AC_ARG_ENABLE(telephony,
+ AC_HELP_STRING([--enable-telephony], [enable Telephony support]),
+ [enable_telephony=${enableval}], [enable_telephony="yes"])
+AM_CONDITIONAL(TELEPHONY, test "${enable_telephony}" != "no")
+AM_CONDITIONAL(TELEPHONY_BUILTIN, test "${enable_telephony}" = "builtin")
+
+AC_ARG_ENABLE(tizen-ext,
+ AC_HELP_STRING([--enable-tizen-ext], [enable TIZEN extensions]),
+ [if (test "${enableval}" = "yes"); then
+ CFLAGS="$CFLAGS -DTIZEN_EXT"
+ LIBS="$LIBS -lsmack"
+ fi])
+AM_CONDITIONAL(TIZEN_EXT, test "${enable-tizen-ext}" != "no")
+
AC_ARG_WITH(openconnect, AC_HELP_STRING([--with-openconnect=PROGRAM],
[specify location of openconnect binary]), [path_openconnect=${withval}])
[enable_openconnect=${enableval}], [enable_openconnect="no"])
if (test "${enable_openconnect}" != "no"); then
if (test -z "${path_openconnect}"); then
- AC_PATH_PROG(OPENCONNECT, [openconnect], [], $PATH:/sbin:/usr/sbin)
+ AC_PATH_PROG(OPENCONNECT, [openconnect], [], $PATH:/bin:/usr/bin)
if (test -z "${OPENCONNECT}"); then
AC_MSG_ERROR(openconnect binary not found)
fi
[enable_openvpn=${enableval}], [enable_openvpn="no"])
if (test "${enable_openvpn}" != "no"); then
if (test -z "${path_openvpn}"); then
- AC_PATH_PROG(OPENVPN, [openvpn], [], $PATH:/sbin:/usr/sbin)
+ AC_PATH_PROG(OPENVPN, [openvpn], [/usr/bin/openvpn], $PATH:/bin:/usr/bin)
if (test -z "${OPENVPN}"); then
AC_MSG_ERROR(openvpn binary not found)
fi
AM_CONDITIONAL(OPENVPN, test "${enable_openvpn}" != "no")
AM_CONDITIONAL(OPENVPN_BUILTIN, test "${enable_openvpn}" = "builtin")
+AC_ARG_WITH(ipsec, AC_HELP_STRING([--with-ipsec=PROGRAM],
+ [specify location of ipsec binary]), [path_ipsec=${withval}])
+
+AC_ARG_ENABLE(ipsec,
+ AC_HELP_STRING([--enable-ipsec], [enable ipsec support]),
+ [enable_ipsec=${enableval}], [enable_ipsec="no"])
+if (test "${enable_ipsec}" != "no"); then
+ PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.28, dummy=yes,
+ AC_MSG_ERROR(GIO >= 2.28 is required))
+ AC_SUBST(GIO_CFLAGS)
+ AC_SUBST(GIO_LIBS)
+ if (test -z "${path_ipsec}"); then
+ AC_PATH_PROG(IPSEC, [charon], [/usr/bin/charon], $PATH:/usr/bin)
+ if (test -z "${IPSEC}"); then
+ AC_MSG_ERROR(ipsec binary not found)
+ fi
+ else
+ IPSEC="${path_ipsec}"
+ AC_SUBST(IPSEC)
+ fi
+fi
+AM_CONDITIONAL(IPSEC, test "${enable_ipsec}" != "no")
+AM_CONDITIONAL(IPSEC_BUILTIN, test "${enable_ipsec}" = "builtin")
+
AC_ARG_WITH(vpnc, AC_HELP_STRING([--with-vpnc=PROGRAM],
[specify location of vpnc binary]), [path_vpnc=${withval}])
[enable_vpnc=${enableval}], [enable_vpnc="no"])
if (test "${enable_vpnc}" != "no"); then
if (test -z "${path_vpnc}"); then
- AC_PATH_PROG(VPNC, [vpnc], [], $PATH:/sbin:/usr/sbin)
+ AC_PATH_PROG(VPNC, [vpnc], [], $PATH:/bin:/usr/bin)
if (test -z "${VPNC}"); then
AC_MSG_ERROR(vpnc binary not found)
fi
AM_CONDITIONAL(VPNC, test "${enable_vpnc}" != "no")
AM_CONDITIONAL(VPNC_BUILTIN, test "${enable_vpnc}" = "builtin")
+AC_ARG_WITH(l2tp, AC_HELP_STRING([--with-l2tp=PROGRAM],
+ [specify location of l2tp binary]), [path_l2tp=${withval}])
+
AC_ARG_ENABLE(l2tp,
AC_HELP_STRING([--enable-l2tp], [enable l2tp support]),
[enable_l2tp=${enableval}], [enable_l2tp="no"])
if (test "${enable_l2tp}" != "no"); then
if (test -z "${path_pppd}"); then
- AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
+ AC_PATH_PROG(PPPD, [pppd], [/usr/bin/pppd], $PATH:/bin:/usr/bin)
else
PPPD="${path_pppd}"
AC_SUBST(PPPD)
AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
AC_MSG_ERROR(ppp header files are required))
if (test -z "${path_l2tp}"); then
- AC_PATH_PROG(L2TP, [xl2tpd], [/usr/sbin/xl2tpd], $PATH:/sbin:/usr/sbin)
+ AC_PATH_PROG(L2TP, [xl2tpd], [/usr/bin/xl2tpd], $PATH:/bin:/usr/bin)
else
L2TP="${path_l2tp}"
AC_SUBST(L2TP)
AM_CONDITIONAL(L2TP, test "${enable_l2tp}" != "no")
AM_CONDITIONAL(L2TP_BUILTIN, test "${enable_l2tp}" = "builtin")
+AC_ARG_WITH(pptp, AC_HELP_STRING([--with-pptp=PROGRAM],
+ [specify location of pptp binary]), [path_pptp=${withval}])
+
AC_ARG_ENABLE(pptp,
AC_HELP_STRING([--enable-pptp], [enable pptp support]),
[enable_pptp=${enableval}], [enable_pptp="no"])
if (test "${enable_pptp}" != "no"); then
if (test -z "${path_pppd}"); then
- AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
+ AC_PATH_PROG(PPPD, [pppd], [/usr/bin/pppd], $PATH:/bin:/usr/bin)
else
PPPD="${path_pppd}"
AC_SUBST(PPPD)
AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
AC_MSG_ERROR(ppp header files are required))
if (test -z "${path_pptp}"); then
- AC_PATH_PROG(PPTP, [pptp], [/usr/sbin/pptp], $PATH:/sbin:/usr/sbin)
+ AC_PATH_PROG(PPTP, [pptp], [/usr/bin/pptp], $PATH:/bin:/usr/bin)
else
PPTP="${path_pptp}"
AC_SUBST(PPTP)
AC_CHECK_LIB(dl, dlopen, dummy=yes,
AC_MSG_ERROR(dynamic linking loader is required))
-AC_ARG_WITH(iwmxsdk, AC_HELP_STRING([--with-iwmxsdk=PATH],
- [path to Intel WiMAX SDK]),
- [pkgconfig_iwmxsdk=${withval}/lib/pkgconfig])
-
-AC_ARG_ENABLE(iwmx, AC_HELP_STRING([--enable-iwmx],
- [enable Intel WiMAX support]), [enable_iwmx=${enableval}])
-if (test "${enable_iwmx}" = "yes"); then
- enable_threads="yes"
- export PKG_CONFIG_PATH="${pkgconfig_iwmxsdk}"
- PKG_CHECK_MODULES(IWMXSDK, libiWmxSdk-0, dummy=yes,
- AC_MSG_ERROR(Intel WiMAX SDK is required))
- PKG_CONFIG_PATH=""
- AC_SUBST(IWMXSDK_CFLAGS)
- AC_SUBST(IWMXSDK_LIBS)
-
- # Fix API compat breakage from 1.4 to 1.5...
- CPPFLAGS_save=$CPPFLAGS
- CPPFLAGS="$IWMXSDK_CFLAGS $CPPFLAGS"
- AH_TEMPLATE([HAVE_IWMXSDK_STATUS_IDLE],
- [WIMAX_API_DEVICE_STATUS_Connection_Idle is present])
- AC_CHECK_DECL(WIMAX_API_DEVICE_STATUS_Connection_Idle,
- [AC_DEFINE([HAVE_IWMXSDK_STATUS_IDLE], [1], [])],
- [],
- [[#include <WiMaxType.h>]])
-
- AH_TEMPLATE([HAVE_WIMAX_API_DEVICE_ID],
- [WIMAX_API_DEVICE_ID is present])
- AC_CHECK_TYPE(WIMAX_API_DEVICE_ID,
- [AC_DEFINE([HAVE_WIMAX_API_DEVICE_ID], [1], [])],
- [],
- [[#include <WiMaxType.h>]])
-
- AH_TEMPLATE([HAVE_WIMAX_API_HW_DEVICE_ID],
- [WIMAX_API_HW_DEVICE_ID is present])
- AC_CHECK_TYPE(WIMAX_API_HW_DEVICE_ID,
- [AC_DEFINE([HAVE_WIMAX_API_HW_DEVICE_ID], [1], [])],
- [],
- [[#include <WiMaxType.h>]])
-
- AH_TEMPLATE([HAVE_WIMAX_API_NSP_INFO_EX],
- [WIMAX_API_NSP_INFO_EX is present])
- AC_CHECK_TYPE(WIMAX_API_NSP_INFO_EX,
- [AC_DEFINE([HAVE_WIMAX_API_NSP_INFO_EX], [1], [])],
- [],
- [[#include <WiMaxType.h>]
- [#include <WiMaxTypesEx.h>]])
-
- AH_TEMPLATE([HAVE_WIMAX_API_CONNECTED_NSP_INFO],
- [WIMAX_API_CONNECTED_NSP_INFO is present])
- AC_CHECK_TYPE(WIMAX_API_CONNECTED_NSP_INFO,
- [AC_DEFINE([HAVE_WIMAX_API_CONNECTED_NSP_INFO], [1], [])],
- [],
- [[#include <WiMaxType.h>]])
-
- CPPFLAGS=$CPPFLAGS_save
-fi
-AM_CONDITIONAL(IWMX, test "${enable_iwmx}" = "yes")
-
AC_ARG_ENABLE(iospm, AC_HELP_STRING([--enable-iospm],
[enable Intel OSPM support]), [enable_iospm=${enableval}])
AM_CONDITIONAL(IOSPM, test "${enable_iospm}" = "yes")
AM_CONDITIONAL(TIST, test "${enable_tist}" != "no")
AM_CONDITIONAL(TIST_BUILTIN, test "${enable_tist}" = "builtin")
-AC_ARG_ENABLE(session-policy,
- AC_HELP_STRING([--enable-session-policy], [enable default Session policy configuration support]),
- [enable_session_policy=${enableval}], [enable_session_policy="no"])
-AM_CONDITIONAL(SESSION_POLICY, test "${enable_session_policy}" != "no")
-AM_CONDITIONAL(SESSION_POLICY_BUILTIN, test "${enable_session_policy}" = "builtin")
+AC_ARG_ENABLE(session-policy-local,
+ AC_HELP_STRING([--enable-session-policy-local], [enable local file Session policy configuration support]),
+ [enable_session_policy_local=${enableval}], [enable_session_policy_local="no"])
+AM_CONDITIONAL(SESSION_POLICY_LOCAL, test "${enable_session_policy_local}" != "no")
+AM_CONDITIONAL(SESSION_POLICY_LOCAL_BUILTIN, test "${enable_session_policy_local}" = "builtin")
AC_ARG_WITH(stats-max-file-size, AC_HELP_STRING([--with-stats-max-file-size=SIZE],
[Maximal size of a statistics round robin file]),
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
-if (test "${enable_threads}" = "yes"); then
- AC_DEFINE(NEED_THREADS, 1, [Define if threading support is required])
- PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
- AC_MSG_ERROR(GThread >= 2.16 is required))
- GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
- GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
-fi
+PKG_CHECK_MODULES(LIBSYSTEMD, libsystemd-daemon, dummy=yes,
+ AC_MSG_ERROR(libsystemd-daemon library is required))
+AC_SUBST(LIBSYSTEMD_CFLAGS)
+AC_SUBST(LIBSYSTEMD_LIBS)
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes,
AC_MSG_ERROR(D-Bus >= 1.4 is required))
fi
AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
-PKG_CHECK_MODULES(XTABLES, xtables, dummy=yes,
+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)
fi
AM_CONDITIONAL(POLKIT, test "${enable_polkit}" != "no")
+AC_ARG_ENABLE(selinux, AC_HELP_STRING([--enable-selinux],
+ [enable selinux support]),
+ [enable_selinux=${enableval}], [enable_selinux="no"])
+AM_CONDITIONAL(SELINUX, test "${enable_selinux}" != "no")
+
AC_ARG_ENABLE(loopback, AC_HELP_STRING([--disable-loopback],
[disable loopback support]),
[enable_loopback=${enableval}])
[enable_ethernet=${enableval}])
AM_CONDITIONAL(ETHERNET, test "${enable_ethernet}" != "no")
+AC_ARG_ENABLE(gadget, AC_HELP_STRING([--disable-gadget],
+ [disable USB Gadget support]),
+ [enable_gadget=${enableval}])
+AM_CONDITIONAL(GADGET, test "${enable_gadget}" != "no")
+
AC_ARG_ENABLE(wifi, AC_HELP_STRING([--disable-wifi],
[disable WiFi support]),
[enable_wifi=${enableval}])
[enable_pacrunner=${enableval}])
AM_CONDITIONAL(PACRUNNER, test "${enable_pacrunner}" != "no")
+AC_ARG_ENABLE(neard, AC_HELP_STRING([--disable-neard],
+ [disable Neard support]),
+ [enable_neard=${enableval}])
+AM_CONDITIONAL(NEARD, test "${enable_neard}" != "no")
+
AC_ARG_ENABLE(wispr, AC_HELP_STRING([--disable-wispr],
[disable WISPr support]),
[enable_wispr=${enableval}])
[enable_tools=${enableval}])
AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no")
+if (test "${enable_tools}" != "no"); then
+ AC_PATH_PROGS(IPTABLES_SAVE, [iptables-save], [],
+ $PATH:/bin:/usr/bin)
+ IPTABLES_SAVE=$ac_cv_path_IPTABLES_SAVE
+else
+ IPTABLES_SAVE=""
+fi
+AC_SUBST(IPTABLES_SAVE)
+
AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
[disable command line client]),
- [disable_client=${enableval}])
+ [enable_client=${enableval}])
AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no")
if (test "${enable_wispr}" != "no"); then
if (test "${enable_wifi}" != "no"); then
AC_PATH_PROG(WPASUPPLICANT, [wpa_supplicant], [],
- $PATH:/sbin:/usr/sbin)
+ $PATH:/bin:/usr/bin)
fi
AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
AC_MSG_ERROR(readline header files are required))
fi
-AC_OUTPUT(Makefile include/version.h src/connman.service
- scripts/connman doc/version.xml connman.pc)
+AM_CONDITIONAL(VPN, test "${enable_openconnect}" != "no" -o \
+ "${enable_openvpn}" != "no" -o \
+ "${enable_ipsec}" != "no" -o \
+ "${enable_vpnc}" != "no" -o \
+ "${enable_l2tp}" != "no" -o \
+ "${enable_pptp}" != "no")
+
+AC_OUTPUT(Makefile include/version.h connman.pc src/connman.service src/connman_tv.service vpn/connman-vpn.service)