Release 0.11
[connman] / configure.ac
index 39dbced..6c915e3 100644 (file)
@@ -1,7 +1,7 @@
 AC_PREREQ(2.60)
 AC_INIT()
 
-AM_INIT_AUTOMAKE(connman, 0.5)
+AM_INIT_AUTOMAKE(connman, 0.11)
 AM_CONFIG_HEADER(config.h)
 
 AM_MAINTAINER_MODE
@@ -48,6 +48,10 @@ AC_ARG_ENABLE(loopback, AC_HELP_STRING([--enable-loopback],
                [enable loopback support]), [enable_loopback=${enableval}])
 AM_CONDITIONAL(LOOPBACK, test "${enable_loopback}" = "yes")
 
+AC_ARG_ENABLE(ethernet, AC_HELP_STRING([--enable-ethernet],
+               [enable Ethernet support]), [enable_ethernet=${enableval}])
+AM_CONDITIONAL(ETHERNET, test "${enable_ethernet}" = "yes")
+
 AC_ARG_ENABLE(wifi, AC_HELP_STRING([--enable-wifi],
                [enable WiFi support]), [enable_wifi=${enableval}])
 if (test "${enable_wifi}" = "yes"); then
@@ -56,10 +60,18 @@ if (test "${enable_wifi}" = "yes"); then
 fi
 AM_CONDITIONAL(WIFI, test "${enable_wifi}" = "yes")
 
+AC_ARG_ENABLE(wimax, AC_HELP_STRING([--enable-wimax],
+               [enable WiMAX support]), [enable_wimax=${enableval}])
+AM_CONDITIONAL(WIMAX, test "${enable_wimax}" = "yes")
+
+AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--enable-bluetooth],
+               [enable Bluetooth support]), [enable_bluetooth=${enableval}])
+AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" = "yes")
+
 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],
+AC_ARG_ENABLE(udhcp, AC_HELP_STRING([--enable-udhcp],
                [enable uDHCP support]), [enable_udhcp=${enableval}])
 if (test "${enable_udhcp}" = "yes"); then
        if (test -z "${path_udhcpc}"); then
@@ -74,13 +86,13 @@ AM_CONDITIONAL(UDHCP, test "${enable_udhcp}" = "yes")
 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],
+AC_ARG_ENABLE(dhclient, AC_HELP_STRING([--enable-dhclient],
                [enable dhclient support]), [enable_dhclient=${enableval}])
 if (test "${enable_dhclient}" = "yes"); then
        if (test -z "${path_dhclient}"); then
                AC_PATH_PROG(DHCLIENT, [dhclient], [], $PATH:/sbin:/usr/sbin)
        else
-               UDHCPC="${path_dhclient}"
+               DHCLIENT="${path_dhclient}"
                AC_SUBST(DHCLIENT)
        fi
 fi
@@ -89,18 +101,22 @@ AM_CONDITIONAL(DHCLIENT, test "${enable_dhclient}" = "yes")
 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],
+AC_ARG_ENABLE(resolvconf, AC_HELP_STRING([--enable-resolvconf],
                [enable resolvconf support]), [enable_resolvconf=${enableval}])
 if (test "${enable_resolvconf}" = "yes"); then
        if (test -z "${path_resolvconf}"); then
                AC_PATH_PROG(RESOLVCONF, [resolvconf], [], $PATH:/sbin:/usr/sbin)
        else
-               UDHCPC="${path_resolvconf}"
+               RESOLVCONF="${path_resolvconf}"
                AC_SUBST(RESOLVCONF)
        fi
 fi
 AM_CONDITIONAL(RESOLVCONF, test "${enable_resolvconf}" = "yes")
 
+AC_ARG_ENABLE(dnsproxy, AC_HELP_STRING([--enable-dnsproxy],
+               [enable DNS proxy support]), [enable_dnsproxy=${enableval}])
+AM_CONDITIONAL(DNSPROXY, test "${enable_dnsproxy}" = "yes")
+
 AC_ARG_ENABLE(novatel, AC_HELP_STRING([--enable-novatel],
                [enable Novatel support]), [enable_novatel=${enableval}])
 AM_CONDITIONAL(NOVATEL, test "${enable_novatel}" = "yes")
@@ -134,23 +150,30 @@ AM_CONDITIONAL(PPPD, test "${enable_ppp}" = "yes")
 AC_CHECK_LIB(dl, dlopen, dummy=yes,
                        AC_MSG_ERROR(dynamic linking loader is required))
 
-PKG_CHECK_MODULES(GLIB, glib-2.0, dummy=yes,
-                               AC_MSG_ERROR(glib is required))
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
+                               AC_MSG_ERROR(GLib >= 2.16 is required))
 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, dummy=yes,
-                               AC_MSG_ERROR(gthread 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(DBUS, dbus-1 >= 1.0, dummy=yes,
-                               AC_MSG_ERROR(libdbus is required))
+                               AC_MSG_ERROR(D-Bus >= 1.0 is required))
 AC_SUBST(DBUS_CFLAGS)
 AC_SUBST(DBUS_LIBS)
+DBUS_DATADIR="`$PKG_CONFIG --variable=sysconfdir dbus-1`"
+if (test -z "{DBUS_DATADIR}"); then
+       DBUS_DATADIR="${sysconfdir}/dbus-1/system.d"
+else
+       DBUS_DATADIR="$DBUS_DATADIR/dbus-1/system.d"
+fi
+AC_SUBST(DBUS_DATADIR)
 
 AC_SUBST([GDBUS_CFLAGS], ['$(DBUS_CFLAGS) -I$(top_srcdir)/gdbus'])
 AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.la $(DBUS_LIBS)'])
@@ -170,11 +193,20 @@ if (test "${enable_udev}" = "yes"); then
                        [Define to 1 if you need the
                                udev_device_get_parent_with_subsystem_devtype()
                                                                        function.]))
+       UDEV_DATADIR="`$PKG_CONFIG --variable=rulesdir libudev`"
+       if (test -z "${UDEV_DATADIR}"); then
+               UDEV_DATADIR="${sysconfdir}/udev/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(ospm, AC_HELP_STRING([--enable-ospm],
+               [enable OSPM support]), [enable_ospm=${enableval}])
+AM_CONDITIONAL(OSPM, test "${enable_ospm}" = "yes")
+
 AC_ARG_ENABLE(polkit, AC_HELP_STRING([--enable-polkit],
                [enable PolicyKit support]), [enable_polkit=${enableval}])
 if (test "${enable_polkit}" = "yes"); then
@@ -182,6 +214,11 @@ if (test "${enable_polkit}" = "yes"); then
                                AC_MSG_ERROR(PolicyKit >= 0.7 is required))
        AC_SUBST(POLKIT_CFLAGS)
        AC_SUBST(POLKIT_LIBS)
+       POLKIT_DATADIR="`$PKG_CONFIG --variable=policydir polkit`"
+       if (test -z "${POLKIT_DATADIR}"); then
+               POLKIT_DATADIR="${datadir}/PolicyKit/policy"
+       fi
+       AC_SUBST(POLKIT_DATADIR)
 fi
 AM_CONDITIONAL(POLKIT, test "${enable_polkit}" = "yes")
 
@@ -193,6 +230,12 @@ AC_ARG_ENABLE(fake, AC_HELP_STRING([--enable-fake],
                [enable fake device support]), [enable_fake=${enableval}])
 AM_CONDITIONAL(FAKE, test "${enable_fake}" = "yes")
 
-AC_OUTPUT(Makefile gdbus/Makefile include/Makefile src/Makefile doc/Makefile
-               test/Makefile plugins/Makefile client/Makefile scripts/Makefile
-               scripts/connman src/connman.service doc/version.xml connman.pc)
+AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
+                       [don't install configuration and data files]),
+                                       [enable_datafiles=${enableval}])
+AM_CONDITIONAL(DATAFILES, test "${enable_datafiles}" != "no")
+
+AC_OUTPUT(Makefile gdbus/Makefile include/Makefile include/version.h
+               src/Makefile src/connman.service scripts/connman
+               scripts/Makefile plugins/Makefile client/Makefile
+               test/Makefile doc/Makefile doc/version.xml connman.pc)