AC_PREREQ(2.60)
-AC_INIT(connman, 0.48)
+AC_INIT(connman, 0.65)
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_CONFIG_HEADER(config.h)
AM_PROG_CC_C_O
AC_PROG_CC_PIE
AC_PROG_INSTALL
-AC_PROG_SED
-AC_PROG_AWK
AM_PROG_MKDIR_P
m4_define([_LT_AC_TAGCONFIG], [])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
-AC_PROG_NM
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
[disable code optimization through compiler]), [
AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no")
AM_CONDITIONAL(BLUETOOTH_BUILTIN, test "${enable_bluetooth}" = "builtin")
+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(ofono,
AC_HELP_STRING([--enable-ofono], [enable oFono support]),
[enable_ofono=${enableval}], [enable_ofono="no"])
AM_CONDITIONAL(OFONO, test "${enable_ofono}" != "no")
AM_CONDITIONAL(OFONO_BUILTIN, test "${enable_ofono}" = "builtin")
-AC_ARG_WITH(udhcpc, AC_HELP_STRING([--with-udhcpc=PROGRAM],
- [specify location of udhcpc binary]), [path_udhcpc=${withval}])
-
-AC_ARG_ENABLE(udhcp,
- AC_HELP_STRING([--enable-udhcp], [enable uDHCP support]),
- [enable_udhcp=${enableval}], [enable_udhcp="no"])
-if (test "${enable_udhcp}" != "no"); then
- if (test -z "${path_udhcpc}"); then
- AC_PATH_PROG(UDHCPC, [udhcpc], [], $PATH:/sbin:/usr/sbin)
- else
- UDHCPC="${path_udhcpc}"
- AC_SUBST(UDHCPC)
- fi
-fi
-AM_CONDITIONAL(UDHCP, test "${enable_udhcp}" != "no")
-AM_CONDITIONAL(UDHCP_BUILTIN, test "${enable_udhcp}" = "builtin")
-
-AC_ARG_WITH(dhclient, AC_HELP_STRING([--with-dhclient=PROGRAM],
- [specify location of dhclient binary]), [path_dhclient=${withval}])
-
-AC_ARG_ENABLE(dhclient,
- AC_HELP_STRING([--enable-dhclient], [enable dhclient support]),
- [enable_dhclient=${enableval}], [enable_dhclient="no"])
-if (test "${enable_dhclient}" != "no"); then
- if (test -z "${path_dhclient}"); then
- AC_PATH_PROG(DHCLIENT, [dhclient], [], $PATH:/sbin:/usr/sbin)
- else
- DHCLIENT="${path_dhclient}"
- AC_SUBST(DHCLIENT)
- fi
-fi
-AM_CONDITIONAL(DHCLIENT, test "${enable_dhclient}" != "no")
-AM_CONDITIONAL(DHCLIENT_BUILTIN, test "${enable_dhclient}" = "builtin")
-
-AC_ARG_WITH(resolvconf, AC_HELP_STRING([--with-resolvconf=PROGRAM],
- [specify location of resolvconf binary]), [path_resolvconf=${withval}])
-
-AC_ARG_ENABLE(resolvconf,
- AC_HELP_STRING([--enable-resolvconf], [enable resolvconf support]),
- [enable_resolvconf=${enableval}], [enable_resolvconf="no"])
-if (test "${enable_resolvconf}" != "no"); then
- if (test -z "${path_resolvconf}"); then
- AC_PATH_PROG(RESOLVCONF, [resolvconf], [], $PATH:/sbin:/usr/sbin)
- else
- RESOLVCONF="${path_resolvconf}"
- AC_SUBST(RESOLVCONF)
- fi
-fi
-AM_CONDITIONAL(RESOLVCONF, test "${enable_resolvconf}" != "no")
-AM_CONDITIONAL(RESOLVCONF_BUILTIN, test "${enable_resolvconf}" = "builtin")
-
AC_ARG_WITH(openconnect, AC_HELP_STRING([--with-openconnect=PROGRAM],
[specify location of openconnect binary]), [path_openconnect=${withval}])
AC_ARG_ENABLE(openconnect,
- AC_HELP_STRING([--enable-openconnect], [enable openconnect support]),
- [enable_openconnect=${enableval}], [enable_openconnect="no"])
+ AC_HELP_STRING([--enable-openconnect], [enable openconnect support]),
+ [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)
- else
- OPENCONNECT="${path_openconnect}"
- AC_SUBST(OPENCONNECT)
- fi
+ if (test -z "${path_openconnect}"); then
+ AC_PATH_PROG(OPENCONNECT, [openconnect], [], $PATH:/sbin:/usr/sbin)
+ else
+ OPENCONNECT="${path_openconnect}"
+ AC_SUBST(OPENCONNECT)
+ fi
fi
AM_CONDITIONAL(OPENCONNECT, test "${enable_openconnect}" != "no")
AM_CONDITIONAL(OPENCONNECT_BUILTIN, test "${enable_openconnect}" = "builtin")
+AC_ARG_ENABLE(portal,
+ AC_HELP_STRING([--enable-portal], [enable portal detection support]),
+ [enable_portal=${enableval}], [enable_portal="no"])
+AM_CONDITIONAL(PORTAL, test "${enable_portal}" != "no")
+AM_CONDITIONAL(PORTAL_BUILTIN, test "${enable_portal}" = "builtin")
+
+AC_ARG_WITH(openvpn, AC_HELP_STRING([--with-openvpn=PROGRAM],
+ [specify location of openvpn binary]), [path_openvpn=${withval}])
+
+AC_ARG_ENABLE(openvpn,
+ AC_HELP_STRING([--enable-openvpn], [enable openvpn support]),
+ [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)
+ else
+ OPENVPN="${path_openvpn}"
+ AC_SUBST(OPENVPN)
+ fi
+fi
+AM_CONDITIONAL(OPENVPN, test "${enable_openvpn}" != "no")
+AM_CONDITIONAL(OPENVPN_BUILTIN, test "${enable_openvpn}" = "builtin")
+
AC_ARG_ENABLE(loopback,
AC_HELP_STRING([--enable-loopback], [enable loopback support]),
[enable_loopback=${enableval}], [enable_loopback="no"])
AC_ARG_ENABLE(dnsproxy,
AC_HELP_STRING([--enable-dnsproxy], [enable DNS proxy support]),
[enable_dnsproxy=${enableval}], [enable_dnsproxy="no"])
+
AM_CONDITIONAL(DNSPROXY, test "${enable_dnsproxy}" != "no")
AM_CONDITIONAL(DNSPROXY_BUILTIN, test "${enable_dnsproxy}" = "builtin")
+AC_ARG_ENABLE(pacrunner,
+ AC_HELP_STRING([--enable-pacrunner], [enable PAC runner support]),
+ [enable_pacrunner=${enableval}], [enable_pacrunner="no"])
+
+AM_CONDITIONAL(PACRUNNER, test "${enable_pacrunner}" != "no")
+AM_CONDITIONAL(PACRUNNER_BUILTIN, test "${enable_pacrunner}" = "builtin")
+
AC_ARG_ENABLE(google,
AC_HELP_STRING([--enable-google], [enable Google Public DNS support]),
[enable_google=${enableval}], [enable_google="no"])
AM_CONDITIONAL(GOOGLE, test "${enable_google}" != "no")
AM_CONDITIONAL(GOOGLE_BUILTIN, test "${enable_google}" = "builtin")
-AC_ARG_ENABLE(moblin,
- AC_HELP_STRING([--enable-moblin], [enable Moblin features support]),
- [enable_moblin=${enableval}], [enable_moblin="no"])
-AM_CONDITIONAL(MOBLIN, test "${enable_moblin}" != "no")
-AM_CONDITIONAL(MOBLIN_BUILTIN, test "${enable_moblin}" = "builtin")
-
-AC_ARG_ENABLE(hso,
- AC_HELP_STRING([--enable-hso], [enable HSO support]),
- [enable_hso=${enableval}], [enable_hso="no"])
-AM_CONDITIONAL(HSO, test "${enable_hso}" != "no")
-AM_CONDITIONAL(HSO_BUILTIN, test "${enable_hso}" = "builtin")
-
-AC_ARG_ENABLE(mbm,
- AC_HELP_STRING([--enable-mbm], [enable MBM support]),
- [enable_mbm=${enableval}], [enable_mbm="no"])
-AM_CONDITIONAL(MBM, test "${enable_mbm}" != "no")
-AM_CONDITIONAL(MBM_BUILTIN, test "${enable_mbm}" = "builtin")
+AC_ARG_ENABLE(meego,
+ AC_HELP_STRING([--enable-meego], [enable MeeGo features support]),
+ [enable_meego=${enableval}], [enable_meego="no"])
+AM_CONDITIONAL(MEEGO, test "${enable_meego}" != "no")
+AM_CONDITIONAL(MEEGO_BUILTIN, test "${enable_meego}" = "builtin")
+
+AC_CHECK_HEADERS(resolv.h, dummy=yes,
+ AC_MSG_ERROR(resolver header files are required))
+AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
+ AC_CHECK_LIB(resolv, __ns_initparse, dummy=yes,
+ AC_MSG_ERROR(resolver library support is required))
+])
AC_CHECK_LIB(dl, dlopen, dummy=yes,
AC_MSG_ERROR(dynamic linking loader is required))
[enable Intel OSPM support]), [enable_iospm=${enableval}])
AM_CONDITIONAL(IOSPM, test "${enable_iospm}" = "yes")
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
- AC_MSG_ERROR(GLib >= 2.16 is required))
+AC_ARG_WITH(ntpd, AC_HELP_STRING([--with-ntpd=PROGRAM],
+ [specify ntpd binary location]), [path_ntpd=${withval}])
+
+AC_ARG_ENABLE(ntpd,
+ AC_HELP_STRING([--enable-ntpd], [enable ntpd support]),
+ [enable_ntpd=${enableval}], [enable_ntpd="no"])
+
+if (test "${enable_ntpd}" != "no"); then
+ if (test -z "${path_ntpd}"); then
+ AC_PATH_PROG(NTPD, [ntpd], [], $PATH:/sbin:/usr/sbin)
+ else
+ NTPD="${path_ntpd}"
+ AC_SUBST(NTPD)
+ fi
+fi
+AM_CONDITIONAL(NTPD, test "${enable_ntpd}" != "no")
+AM_CONDITIONAL(NTPD_BUILTIN, test "${enable_ntpd}" = "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]),
+ [stats_max_file_size=${withval}])
+
+if (test -z "${stats_max_file_size}"); then
+ # default size is 16 kByte
+ stats_max_file_size="16 * 8 * 128"
+fi
+
+AC_DEFINE_UNQUOTED([STATS_MAX_FILE_SIZE], (${stats_max_file_size}), [Maximal size of a statistics round robin file])
+
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.22, dummy=yes,
+ AC_MSG_ERROR(GLib >= 2.22 is required))
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
-AC_ARG_WITH(dbusconf, AC_HELP_STRING([--with-dbusconf=PATH],
+AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH],
[path to D-Bus config directory]), [path_dbusconf=${withval}],
[path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`"])
if (test -z "${path_dbusconf}"); then
- DBUS_DATADIR="${sysconfdir}/dbus-1/system.d"
+ DBUS_CONFDIR="${sysconfdir}/dbus-1/system.d"
+else
+ DBUS_CONFDIR="${path_dbusconf}/dbus-1/system.d"
+fi
+AC_SUBST(DBUS_CONFDIR)
+
+AC_ARG_WITH(dbusdatadir, AC_HELP_STRING([--with-dbusdatadir=PATH],
+ [path to D-Bus data directory]), [path_dbusdata=${withval}],
+ [path_dbusdata="`$PKG_CONFIG --variable=datadir dbus-1`"])
+if (test -z "${path_dbusdata}"); then
+ DBUS_DATADIR="${datadir}/dbus-1/system-services"
else
- DBUS_DATADIR="${path_dbusconf}/dbus-1/system.d"
+ DBUS_DATADIR="${path_dbusdata}/dbus-1/system-services"
fi
AC_SUBST(DBUS_DATADIR)
+PKG_CHECK_MODULES(XTABLES, xtables, dummy=yes,
+ AC_MSG_ERROR(Xtables library is required))
+AC_SUBST(XTABLES_CFLAGS)
+AC_SUBST(XTABLES_LIBS)
+
+
+AC_ARG_ENABLE(systemd, AC_HELP_STRING([--enable-systemd],
+ [enable systemd support]), [enable_systemd=${enableval}])
+if (test "${enable_systemd}" = "yes"); then
+ PKG_CHECK_MODULES(SYSTEMD, systemd, dummy=yes,
+ AC_MSG_ERROR(systemd is required))
+ SYSTEMD_UNITDIR="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"
+ if (test -z "${SYSTEMD_UNITDIR}"); then
+ SYSTEMD_UNITDIR="/lib/systemd/system"
+ fi
+ AC_SUBST(SYSTEMD_UNITDIR)
+fi
+AM_CONDITIONAL(SYSTEMD, test "${enable_systemd}" = "yes")
+
AC_ARG_ENABLE(polkit,
AC_HELP_STRING([--enable-polkit], [enable PolicyKit support]),
[enable_polkit=${enableval}], [enable_polkit="no"])
if (test "${enable_polkit}" != "no"); then
- PKG_CHECK_MODULES(POLKIT, polkit-dbus >= 0.7, dummy=yes,
- AC_MSG_ERROR(PolicyKit >= 0.7 is required))
- AC_SUBST(POLKIT_CFLAGS)
- AC_SUBST(POLKIT_LIBS)
- POLKIT_DATADIR="`$PKG_CONFIG --variable=policydir polkit`"
+ POLKIT_DATADIR="`$PKG_CONFIG --variable=actiondir polkit`"
+ POLKIT_DATADIR=""
if (test -z "${POLKIT_DATADIR}"); then
- POLKIT_DATADIR="${datadir}/PolicyKit/policy"
+ POLKIT_DATADIR="${datadir}/polkit-1/actions"
fi
AC_SUBST(POLKIT_DATADIR)
fi
AC_MSG_ERROR(Netlink library is required))
AC_SUBST(NETLINK_CFLAGS)
AC_SUBST(NETLINK_LIBS)
+
+ PKG_CHECK_MODULES(GNUTLS, gnutls, dummy=yes,
+ AC_MSG_ERROR(GnuTLS library is required))
+ AC_SUBST(GNUTLS_CFLAGS)
+ AC_SUBST(GNUTLS_LIBS)
fi
AM_CONDITIONAL(TOOLS, test "${enable_tools}" = "yes")
AC_DEFINE(HAVE_CAPNG, 1, [Define to 1 if you have capabilities library.])
fi
-AC_ARG_ENABLE(udev, AC_HELP_STRING([--disable-udev],
- [don't use udev support even if available]),
- [enable_udev=${enableval}])
-if (test "${enable_udev}" != "no"); then
- PKG_CHECK_MODULES(UDEV, libudev >= 143,
- [enable_udev="yes"], [enable_udev="no"])
-fi
-if (test "${enable_udev}" = "yes"); then
- UDEV_DATADIR="`$PKG_CONFIG --variable=udevdir udev`"
- if (test -z "${UDEV_DATADIR}"); then
- UDEV_DATADIR="${sysconfdir}/udev/rules.d"
- else
- UDEV_DATADIR="${UDEV_DATADIR}/rules.d"
- fi
- AC_SUBST(UDEV_DATADIR)
-fi
-AC_SUBST(UDEV_CFLAGS)
-AC_SUBST(UDEV_LIBS)
-AM_CONDITIONAL(UDEV, test "${enable_udev}" = "yes")
-
AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
[don't install configuration and data files]),
[enable_datafiles=${enableval}])