AC_PREREQ(2.60)
AC_INIT()
-AM_INIT_AUTOMAKE(connman, 0.17)
+AM_INIT_AUTOMAKE(connman, 0.37)
AM_CONFIG_HEADER(config.h)
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
AM_MAINTAINER_MODE
AC_PREFIX_DEFAULT(/usr/local)
+PKG_PROG_PKG_CONFIG
+
COMPILER_FLAGS
+AC_SUBST(abs_top_srcdir)
+AC_SUBST(abs_top_builddir)
+
AC_LANG_C
AC_PROG_CC
+AM_PROG_CC_C_O
AC_PROG_CC_PIE
AC_PROG_INSTALL
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
-GTK_DOC_CHECK
+AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
+ [disable code optimization through compiler]), [
+ if (test "${enableval}" = "no"); then
+ CFLAGS="$CFLAGS -O0"
+ fi
+])
-SHAVE_ARG_ENABLE
+GTK_DOC_CHECK
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
[enable compiling with debugging information]), [
if (test "${enableval}" = "yes" &&
test "${ac_cv_prog_cc_g}" = "yes"); then
- CFLAGS="$CFLAGS -g -O0"
+ CFLAGS="$CFLAGS -g"
fi
])
AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" != "no")
AM_CONDITIONAL(BLUETOOTH_BUILTIN, test "${enable_bluetooth}" = "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_ENABLE(modemmgr,
AC_HELP_STRING([--enable-modemmgr], [enable Modem Manager support]),
[enable_modemmgr=${enableval}], [enable_modemmgr="no"])
-AM_CONDITIONAL(MODEMMGR, test "${enable_modemmgr}" = "yes")
+AM_CONDITIONAL(MODEMMGR, test "${enable_modemmgr}" != "no")
+AM_CONDITIONAL(MODEMMGR_BUILTIN, test "${enable_modemmgr}" = "builtin")
AC_ARG_WITH(udhcpc, AC_HELP_STRING([--with-udhcpc=PROGRAM],
[specify location of udhcpc binary]), [path_udhcpc=${withval}])
[enable HUAWEI support]), [enable_huawei=${enableval}])
AM_CONDITIONAL(HUAWEI, test "${enable_huawei}" = "yes")
-AC_ARG_ENABLE(hso, AC_HELP_STRING([--enable-hso],
- [enable HSO support]), [enable_hso=${enableval}])
-AM_CONDITIONAL(HSO, test "${enable_hso}" = "yes")
+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_WITH(pppd, AC_HELP_STRING([--with-pppd=PROGRAM],
[specify location of pppd binary]), [path_pppd=${withval}])
AC_CHECK_LIB(dl, dlopen, dummy=yes,
AC_MSG_ERROR(dynamic linking loader is required))
-AC_ARG_ENABLE(udev, AC_HELP_STRING([--enable-udev],
- [enable udev support]), [enable_udev=${enableval}])
-if (test "${enable_udev}" = "yes"); then
- AC_DEFINE(HAVE_UDEV, 1, [Define if udev support is available])
- PKG_CHECK_MODULES(UDEV, libudev >= 129, enable_udev=yes,
- AC_MSG_ERROR(udev >= 129 is required))
- AC_CHECK_LIB(udev, udev_enumerate_add_match_property, dummy=yes,
- AC_DEFINE(NEED_UDEV_ENUMERATE_ADD_MATCH_PROPERTY, 1,
- [Define to 1 if you need the
- udev_enumerate_add_match_property() function.]))
- AC_CHECK_LIB(udev, udev_device_get_parent_with_subsystem_devtype, dummy=yes,
- AC_DEFINE(NEED_UDEV_DEVICE_GET_PARENT_WITH_SUBSYSTEM_DEVTYPE, 1,
- [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_WITH(iwmxsdk, AC_HELP_STRING([--with-iwmxsdk=PATH],
+ [path to Intel WiMAX SDK]),
+ [pkgconfig_iwmxsdk=${withval}/lib/pkgconfig])
-AC_ARG_ENABLE(iwmxsdk, AC_HELP_STRING([--enable-iwmxsdk],
- [enable Intel WiMAX support]), [enable_iwmxsdk=${enableval}])
-if (test "${enable_iwmxsdk}" = "yes"); then
+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"
- PKG_CHECK_MODULES(IWMXSDK, libiWmxSdk-0, enable_iwmxsdk=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)
fi
-AM_CONDITIONAL(IWMXSDK, test "${enable_iwmxsdk}" = "yes")
+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")
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
AC_MSG_ERROR(GLib >= 2.16 is required))
AC_SUBST([GATCHAT_CFLAGS], ['-I$(top_srcdir)/gatchat'])
AC_SUBST([GATCHAT_LIBS], ['$(top_builddir)/gatchat/libgatchat.la'])
-AC_ARG_ENABLE(polkit, AC_HELP_STRING([--enable-polkit],
- [enable PolicyKit support]), [enable_polkit=${enableval}])
-if (test "${enable_polkit}" = "yes"); then
- PKG_CHECK_MODULES(POLKIT, polkit-dbus >= 0.7, enable_polkit=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)
fi
AC_SUBST(POLKIT_DATADIR)
fi
-AM_CONDITIONAL(POLKIT, test "${enable_polkit}" = "yes")
+AM_CONDITIONAL(POLKIT, test "${enable_polkit}" != "no")
+AM_CONDITIONAL(POLKIT_BUILTIN, test "${enable_polkit}" = "builtin")
AC_ARG_ENABLE(client, AC_HELP_STRING([--enable-client],
[enable command line client]), [enable_client=${enableval}])
AC_ARG_ENABLE(tools, AC_HELP_STRING([--enable-tools],
[enable testing tools]), [enable_tools=${enableval}])
if (test "${enable_tools}" = "yes"); then
- PKG_CHECK_MODULES(NETLINK, libnl-1, enable_netlink=yes,
+ PKG_CHECK_MODULES(NETLINK, libnl-1, dummy=yes,
AC_MSG_ERROR(Netlink library is required))
AC_SUBST(NETLINK_CFLAGS)
AC_SUBST(NETLINK_LIBS)
[enable fake device support]), [enable_fake=${enableval}])
AM_CONDITIONAL(FAKE, test "${enable_fake}" = "yes")
+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 >= 141,
+ [enable_udev="yes"], [enable_udev="no"])
+fi
+if (test "${enable_udev}" = "yes"); then
+ AC_CHECK_LIB(udev, udev_monitor_filter_update, dummy=yes,
+ AC_DEFINE(NEED_UDEV_MONITOR_FILTER, 1,
+ [Define to 1 if you need the
+ udev_monitor_filter...() functions.]))
+ 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}])
AM_CONDITIONAL(DATAFILES, test "${enable_datafiles}" != "no")
-SHAVE_INIT
-
AC_OUTPUT(Makefile gdbus/Makefile gatchat/Makefile
include/Makefile include/version.h
src/Makefile src/connman.service