AC_PREREQ(2.60)
AC_INIT()
-AM_INIT_AUTOMAKE(connman, 0.19)
+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
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(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, dummy=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_WITH(iwmxsdk, AC_HELP_STRING([--with-iwmxsdk=PATH],
[path to Intel WiMAX SDK]),
[pkgconfig_iwmxsdk=${withval}/lib/pkgconfig])
[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