AC_PREREQ(2.60)
-AC_INIT()
+AC_INIT(connman, 0.43)
-AM_INIT_AUTOMAKE(connman, 0.20)
+AM_INIT_AUTOMAKE([foreign subdir-objects])
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)
AM_PROG_CC_C_O
AC_PROG_CC_PIE
AC_PROG_INSTALL
+AC_PROG_SED
+AC_PROG_AWK
+AM_PROG_MKDIR_P
m4_define([_LT_AC_TAGCONFIG], [])
m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
+AC_PROG_NM
+
+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
[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_HELP_STRING([--enable-threads], [enable threading support]),
[enable_threads=${enableval}], [enable_threads="no"])
-AC_ARG_ENABLE(loopback,
- AC_HELP_STRING([--enable-loopback], [enable loopback support]),
- [enable_loopback=${enableval}], [enable_loopback="no"])
-AM_CONDITIONAL(LOOPBACK, test "${enable_loopback}" != "no")
-AM_CONDITIONAL(LOOPBACK_BUILTIN, test "${enable_loopback}" = "builtin")
-
AC_ARG_ENABLE(ethernet,
AC_HELP_STRING([--enable-ethernet], [enable Ethernet support]),
[enable_ethernet=${enableval}], [enable_ethernet="no"])
AM_CONDITIONAL(RESOLVCONF, test "${enable_resolvconf}" != "no")
AM_CONDITIONAL(RESOLVCONF_BUILTIN, test "${enable_resolvconf}" = "builtin")
+AC_ARG_ENABLE(loopback,
+ AC_HELP_STRING([--enable-loopback], [enable loopback support]),
+ [enable_loopback=${enableval}], [enable_loopback="no"])
+if (test "${enable_loopback}" != "no"); then
+ AC_CHECK_HEADERS(sys/inotify.h, dummy=yes,
+ AC_MSG_ERROR(inotify header files are required))
+
+ AC_CHECK_LIB(c, inotify_init, dummy=yes,
+ AC_MSG_ERROR(inotify library support is required))
+fi
+AM_CONDITIONAL(LOOPBACK, test "${enable_loopback}" != "no")
+AM_CONDITIONAL(LOOPBACK_BUILTIN, test "${enable_loopback}" = "builtin")
+
AC_ARG_ENABLE(dnsproxy,
AC_HELP_STRING([--enable-dnsproxy], [enable DNS proxy support]),
[enable_dnsproxy=${enableval}], [enable_dnsproxy="no"])
fi
AM_CONDITIONAL(PPPD, test "${enable_ppp}" = "yes")
-AC_CHECK_HEADERS(sys/inotify.h, dummy=yes,
- AC_MSG_ERROR(inotify header files are required))
-
-AC_CHECK_LIB(c, inotify_init, dummy=yes,
- AC_MSG_ERROR(inotify library support is required))
-
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])
PKG_CONFIG_PATH=""
AC_SUBST(IWMXSDK_CFLAGS)
AC_SUBST(IWMXSDK_LIBS)
+
+ # Fix API compat breakage from 1.4 to 1.5...
+ CPPFLAGS_save=$CPPFLAGS
+ CPPFLAGS="$IWMXSDK_CFLAGS $CPPFLAGS"
+ AH_TEMPLATE([HAVE_IWMXSDK_STATUS_IDLE],
+ [WIMAX_API_DEVICE_STATUS_Connection_Idle is present])
+ AC_CHECK_DECL(WIMAX_API_DEVICE_STATUS_Connection_Idle,
+ [AC_DEFINE([HAVE_IWMXSDK_STATUS_IDLE], [1], [])],
+ [],
+ [[#include <WiMaxType.h>]])
+
+ AH_TEMPLATE([HAVE_WIMAX_API_DEVICE_ID],
+ [WIMAX_API_DEVICE_ID is present])
+ AC_CHECK_TYPE(WIMAX_API_DEVICE_ID,
+ [AC_DEFINE([HAVE_WIMAX_API_DEVICE_ID], [1], [])],
+ [],
+ [[#include <WiMaxType.h>]])
+
+ AH_TEMPLATE([HAVE_WIMAX_API_HW_DEVICE_ID],
+ [WIMAX_API_HW_DEVICE_ID is present])
+ AC_CHECK_TYPE(WIMAX_API_HW_DEVICE_ID,
+ [AC_DEFINE([HAVE_WIMAX_API_HW_DEVICE_ID], [1], [])],
+ [],
+ [[#include <WiMaxType.h>]])
+
+ AH_TEMPLATE([HAVE_WIMAX_API_NSP_INFO_EX],
+ [WIMAX_API_NSP_INFO_EX is present])
+ AC_CHECK_TYPE(WIMAX_API_NSP_INFO_EX,
+ [AC_DEFINE([HAVE_WIMAX_API_NSP_INFO_EX], [1], [])],
+ [],
+ [[#include <WiMaxType.h>]
+ [#include <WiMaxTypesEx.h>]])
+
+ AH_TEMPLATE([HAVE_WIMAX_API_CONNECTED_NSP_INFO],
+ [WIMAX_API_CONNECTED_NSP_INFO is present])
+ AC_CHECK_TYPE(WIMAX_API_CONNECTED_NSP_INFO,
+ [AC_DEFINE([HAVE_WIMAX_API_CONNECTED_NSP_INFO], [1], [])],
+ [],
+ [[#include <WiMaxType.h>]])
+
+ CPPFLAGS=$CPPFLAGS_save
fi
AM_CONDITIONAL(IWMX, test "${enable_iwmx}" = "yes")
[Define to 1 if you need the dbus_watch_get_unix_fd() function.]))
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
-DBUS_DATADIR="`$PKG_CONFIG --variable=sysconfdir dbus-1`"
-if (test -z "{DBUS_DATADIR}"); then
+
+AC_ARG_WITH(dbusconf, AC_HELP_STRING([--with-dbusconf=PATH],
+ [path to D-Bus config directory]), [path_dbusconf=${withval}],
+ [path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`"])
+if (test -z "${path_dbusconf}"); then
DBUS_DATADIR="${sysconfdir}/dbus-1/system.d"
else
- DBUS_DATADIR="$DBUS_DATADIR/dbus-1/system.d"
+ DBUS_DATADIR="${path_dbusconf}/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_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}], [enable_polkit="no"])
fi
AM_CONDITIONAL(TOOLS, test "${enable_tools}" = "yes")
+AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
+ [enable test/example scripts]), [enable_test=${enableval}])
+AM_CONDITIONAL(TEST, test "${enable_test}" = "yes")
+
AC_ARG_ENABLE(fake, AC_HELP_STRING([--enable-fake],
[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")
-AC_OUTPUT(Makefile gdbus/Makefile gatchat/Makefile
- include/Makefile include/version.h
- src/Makefile src/connman.service
- scripts/connman scripts/Makefile
- plugins/Makefile client/Makefile
- tools/Makefile test/Makefile
- doc/Makefile doc/version.xml connman.pc)
+AC_OUTPUT(Makefile include/version.h src/connman.service
+ scripts/connman doc/version.xml connman.pc)