X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=configure.ac;h=42f928e2a87a6ac87d71d5dbade2e55ae8ce34db;hb=a2de68d751417d75fb30ea071314800e33952fab;hp=f31adacede3c7873879f81e5d3b2543689651a90;hpb=4113a9a26b4ecdef89de8006cbf9755cc8656e4f;p=connman diff --git a/configure.ac b/configure.ac index f31adac..42f928e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ(2.60) AC_INIT() -AM_INIT_AUTOMAKE(connman, 0.5) +AM_INIT_AUTOMAKE(connman, 0.14) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE @@ -24,6 +24,8 @@ AC_PROG_LIBTOOL GTK_DOC_CHECK +SHAVE_ARG_ENABLE + AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable compiling with debugging information]), [ if (test "${enableval}" = "yes" && @@ -60,6 +62,10 @@ if (test "${enable_wifi}" = "yes"); then fi AM_CONDITIONAL(WIFI, test "${enable_wifi}" = "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}]) @@ -84,7 +90,7 @@ 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 @@ -99,7 +105,7 @@ 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 @@ -142,27 +148,6 @@ 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)) -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)) - 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_SUBST(DBUS_CFLAGS) -AC_SUBST(DBUS_LIBS) - -AC_SUBST([GDBUS_CFLAGS], ['$(DBUS_CFLAGS) -I$(top_srcdir)/gdbus']) -AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.la $(DBUS_LIBS)']) - AC_ARG_ENABLE(udev, AC_HELP_STRING([--enable-udev], [enable udev support]), [enable_udev=${enableval}]) if (test "${enable_udev}" = "yes"); then @@ -178,11 +163,59 @@ 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(iospm, AC_HELP_STRING([--enable-iospm], + [enable Intel OSPM support]), [enable_iospm=${enableval}]) +AM_CONDITIONAL(IOSPM, test "${enable_iospm}" = "yes") + +AC_ARG_ENABLE(iwmxsdk, AC_HELP_STRING([--enable-iwmxsdk], + [enable Intel WiMAX support]), [enable_iwmxsdk=${enableval}]) +if (test "${enable_iwmxsdk}" = "yes"); then + enable_threads="yes" + PKG_CHECK_MODULES(IWMXSDK, libiWmxSdk-0, enable_iwmxsdk=yes, + AC_MSG_ERROR(Intel WiMAX SDK is required)) + AC_SUBST(IWMXSDK_CFLAGS) + AC_SUBST(IWMXSDK_LIBS) +fi +AM_CONDITIONAL(IWMXSDK, test "${enable_iwmxsdk}" = "yes") + +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 >= 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(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)']) + AC_ARG_ENABLE(polkit, AC_HELP_STRING([--enable-polkit], [enable PolicyKit support]), [enable_polkit=${enableval}]) if (test "${enable_polkit}" = "yes"); then @@ -190,6 +223,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") @@ -201,6 +239,14 @@ 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") + +SHAVE_INIT + +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)