AC_PREREQ(2.60)
AC_INIT()
-AM_INIT_AUTOMAKE(connman, 0.20)
+AM_INIT_AUTOMAKE(connman, 0.37)
AM_CONFIG_HEADER(config.h)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PREFIX_DEFAULT(/usr/local)
+PKG_PROG_PKG_CONFIG
+
COMPILER_FLAGS
AC_SUBST(abs_top_srcdir)
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
+AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
+ [disable code optimization through compiler]), [
+ if (test "${enableval}" = "no"); then
+ CFLAGS="$CFLAGS -O0"
+ fi
+])
+
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
])
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 >= 141, dummy=yes,
- AC_MSG_ERROR(udev >= 141 is required))
- 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=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}])