X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=220d62b8b1c2ed924c40d13cb14f5c71bbc3be1d;hb=5479dad2b3b5f342f51ca6e7ec8a5a501820bd55;hp=d1b765388f6f16ecd607d70c0de5b809503fbc6e;hpb=9cf96394ffeebc9d47dc7824b31b744533d92072;p=platform%2Fupstream%2Fconnman.git diff --git a/configure.ac b/configure.ac index d1b7653..220d62b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT(connman, 1.35) +AC_INIT(connman, 1.40) AC_CONFIG_MACRO_DIR([m4]) @@ -20,6 +20,7 @@ AC_SUBST(abs_top_srcdir) AC_SUBST(abs_top_builddir) AC_LANG_C +AC_USE_SYSTEM_EXTENSIONS AC_PROG_CC AM_PROG_CC_C_O @@ -79,11 +80,23 @@ AC_ARG_ENABLE(tizen-ext, fi]) AM_CONDITIONAL(TIZEN_EXT, test "${enable-tizen-ext}" != "no") +AC_ARG_ENABLE(tizen-ext-ins, + AC_HELP_STRING([--enable-tizen-ext-ins], [enable TIZEN extensions for INS]), + [if (test "${enableval}" = "yes"); then + CFLAGS="$CFLAGS -DTIZEN_EXT_INS" + fi]) +AM_CONDITIONAL(TIZEN_EXT_INS, test "${enable_tizen_ext_ins}" != "no") + AC_ARG_ENABLE(tizen-ext-wifi-mesh, AC_HELP_STRING([--enable-tizen-ext-wifi-mesh], [enable TIZEN extensions for Wi-Fi Mesh]), [CFLAGS="$CFLAGS -DTIZEN_EXT_WIFI_MESH"], [enable_tizen_ext_wifi_mesh="no"]) AM_CONDITIONAL(TIZEN_EXT_WIFI_MESH, test "${enable_tizen_ext_wifi_mesh}" != "no") +AC_ARG_ENABLE(tizen-ext-eap-on-ethernet, + AC_HELP_STRING([--enable-tizen-ext-eap-on-ethernet], [enable TIZEN extensions for EAP on Ethernet]), + [CFLAGS="$CFLAGS -DTIZEN_EXT_EAP_ON_ETHERNET"], [enable_tizen_ext_eap_on_ethernet="no"]) +AM_CONDITIONAL(TIZEN_EXT_EAP_ON_ETHERNET, test "${enable_tizen_ext_eap_on_ethernet}" != "no") + AC_ARG_ENABLE(tizen-maintain-online, AC_HELP_STRING([--enable-tizen-maintain-online], [enable TIZEN extensions]), [if (test "${enableval}" = "yes"); then @@ -107,6 +120,8 @@ if (test "${enable_openconnect}" != "no"); then OPENCONNECT="${path_openconnect}" AC_SUBST(OPENCONNECT) fi + PKG_CHECK_MODULES(LIBOPENCONNECT, openconnect >= 8, [], + AC_MSG_ERROR(openconnect >= 8 is required)) fi AM_CONDITIONAL(OPENCONNECT, test "${enable_openconnect}" != "no") AM_CONDITIONAL(OPENCONNECT_BUILTIN, test "${enable_openconnect}" = "builtin") @@ -232,6 +247,11 @@ 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_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include ]]) + AC_CHECK_FUNC(signalfd, dummy=yes, AC_MSG_ERROR(signalfd support is required)) @@ -265,13 +285,23 @@ 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.28, dummy=yes, - AC_MSG_ERROR(GLib >= 2.28 is required)) +PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.40, dummy=yes, + AC_MSG_ERROR(GLib >= 2.40 is required)) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) -PKG_CHECK_MODULES(LIBSYSTEMD, libsystemd-daemon, dummy=yes, - AC_MSG_ERROR(libsystemd-daemon library is required)) +PKG_CHECK_MODULES(LIBNL, libnl-3.0, dummy=yes, + AC_MSG_ERROR(libnl-3.0 is required)) +AC_SUBST(LIBNL_CFLAGS) +AC_SUBST(LIBNL_LIBS) + +PKG_CHECK_MODULES(LIBNL_GENL, libnl-genl-3.0, dummy=yes, + AC_MSG_ERROR(libnl-genl-3.0 is required)) +AC_SUBST(LIBNL_GENL_CFLAGS) +AC_SUBST(LIBNL_GENL_LIBS) + +PKG_CHECK_MODULES(LIBSYSTEMD, libsystemd, dummy=yes, + AC_MSG_ERROR(libsystemd library is required)) AC_SUBST(LIBSYSTEMD_CFLAGS) AC_SUBST(LIBSYSTEMD_LIBS) @@ -280,6 +310,11 @@ PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes, AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) +PKG_CHECK_MODULES(DLOG, dlog, dummy=yes, + AC_MSG_ERROR(dlog is required)) +AC_SUBST(DLOG_CFLAGS) +AC_SUBST(DLOG_LIBS) + 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`"]) @@ -309,6 +344,14 @@ if (test -n "${path_systemdunit}"); then fi AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}") +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}], @@ -328,10 +371,20 @@ if (test "${firewall_type}" = "iptables"); then fi AM_CONDITIONAL(XTABLES, test "${found_iptables}" != "no") +found_libmnl="no" +if (test "${firewall_type}" = "nftables" -o \ + "${enable_wireguard}" != "no"); then + PKG_CHECK_MODULES(LIBMNL, [libmnl >= 1.0.0], [found_libmnl="yes"], + AC_MSG_ERROR([libmnl >= 1.0.0 not found])) + AC_SUBST(LIBMNL_CFLAGS) + AC_SUBST(LIBMNL_LIBS) +fi +AM_CONDITIONAL(LIBMNL, test "${found_libmnl}" != "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])) + PKG_CHECK_MODULES(NFTABLES, [libnftnl >= 1.0.4], [found_nftables="yes"], + AC_MSG_ERROR([libnftnl >= 1.0.4])) AC_SUBST(NFTABLES_CFLAGS) AC_SUBST(NFTABLES_LIBS) fi @@ -374,6 +427,12 @@ AC_ARG_ENABLE(ethernet, AC_HELP_STRING([--disable-ethernet], [enable_ethernet=${enableval}]) AM_CONDITIONAL(ETHERNET, test "${enable_ethernet}" != "no") +AC_ARG_ENABLE(wireguard, AC_HELP_STRING([--disable-wireguard], + [disable Wireguard support]), + [enable_wireguard=${enableval}]) +AM_CONDITIONAL(WIREGUARD, test "${enable_wireguard}" != "no") +AM_CONDITIONAL(WIREGUARD_BUILTIN, test "${enable_wireguard}" = "builtin") + AC_ARG_ENABLE(gadget, AC_HELP_STRING([--disable-gadget], [disable USB Gadget support]), [enable_gadget=${enableval}]) @@ -419,19 +478,34 @@ AC_ARG_ENABLE(wispr, AC_HELP_STRING([--disable-wispr], [enable_wispr=${enableval}]) AM_CONDITIONAL(WISPR, test "${enable_wispr}" != "no") +AC_ARG_ENABLE(backtrace, AC_HELP_STRING([--disable-backtrace], + [disable backtrace support]), + [enable_backtrace=${enableval}]) +AM_CONDITIONAL(BACKTRACE, test "${enable_backtrace}" != "no") + AC_ARG_ENABLE(tools, AC_HELP_STRING([--disable-tools], [disable testing tools]), [enable_tools=${enableval}]) AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no") +AC_ARG_ENABLE(stats, AC_HELP_STRING([--disable-stats], + [disable statistics round robin file generation]), + [enable_stats=${enableval}]) +AM_CONDITIONAL(STATS, test "${enable_stats}" != "no") + if (test "${enable_tools}" != "no"); then AC_PATH_PROGS(IPTABLES_SAVE, [iptables-save], [], $PATH:/bin:/usr/bin) + AC_PATH_PROGS(IP6TABLES_SAVE, [ip6tables-save], [], + $PATH:/bin:/usr/bin) IPTABLES_SAVE=$ac_cv_path_IPTABLES_SAVE + IP6TABLES_SAVE=$ac_cv_path_IP6TABLES_SAVE else IPTABLES_SAVE="" + IP6TABLES_SAVE="" fi AC_SUBST(IPTABLES_SAVE) +AC_SUBST(IP6TABLES_SAVE) AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client], [disable command line client]), @@ -476,6 +550,21 @@ AM_CONDITIONAL(VPN, test "${enable_openconnect}" != "no" -o \ "${enable_ipsec}" != "no" -o \ "${enable_vpnc}" != "no" -o \ "${enable_l2tp}" != "no" -o \ - "${enable_pptp}" != "no") + "${enable_pptp}" != "no" -o \ + "${enable_wireguard}" != "no") + +AC_MSG_CHECKING(which DNS backend to use) +AC_ARG_WITH(dns-backend, AC_HELP_STRING([--with-dns-backend=TYPE], + [specify which DNS backend to use: internal or systemd-resolved [default=internal]]), + [dns_backend=${withval}], + [dns_backend="internal"]) + +if (test "${dns_backend}" != "internal" -a \ + "${dns_backend}" != "systemd-resolved"); then + AC_MSG_ERROR(no suitable DNS backend defined) +fi +AM_CONDITIONAL(INTERNAL_DNS_BACKEND, test "${dns_backend}" = "internal") +AM_CONDITIONAL(SYSTEMD_RESOLVED_DNS_BACKEND, test "${dns_backend}" = "systemd-resolved") +AC_MSG_RESULT(${dns_backend}) AC_OUTPUT(Makefile include/version.h connman.pc src/connman.service src/connman_tv.service vpn/connman-vpn.service)