4 AM_INIT_AUTOMAKE(connman, 0.0)
5 AM_CONFIG_HEADER(config.h)
9 AC_PREFIX_DEFAULT(/usr/local)
11 if (test "${CFLAGS}" = ""); then
12 CFLAGS="-Wall -O2 -D_FORTIFY_SOURCE=2"
21 m4_define([_LT_AC_TAGCONFIG], [])
22 m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
27 AC_PATH_PROG([XSLTPROC], [xsltproc])
31 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
32 [enable compiling with debugging information]), [
33 if (test "${enableval}" = "yes" &&
34 test "${ac_cv_prog_cc_g}" = "yes"); then
35 CFLAGS="$CFLAGS -g -O0"
39 AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
40 [enable position independent executables flag]), [
41 if (test "${enableval}" = "yes" &&
42 test "${ac_cv_prog_cc_pie}" = "yes"); then
43 CFLAGS="$CFLAGS -fPIE"
44 LDFLAGS="$LDFLAGS -pie"
48 AC_PATH_PROG(DHCLIENT, [dhclient])
49 AC_PATH_PROG(WPASUPPLICANT, [wpa_supplicant])
51 PKG_CHECK_MODULES(GLIB, glib-2.0, dummy=yes,
52 AC_MSG_ERROR(glib is required))
56 PKG_CHECK_MODULES(GTHREAD, gthread-2.0, dummy=yes,
57 AC_MSG_ERROR(gthread is required))
58 AC_SUBST(GTHREAD_CFLAGS)
59 AC_SUBST(GTHREAD_LIBS)
61 PKG_CHECK_MODULES(GMODULE, gmodule-2.0, dummy=yes,
62 AC_MSG_ERROR(gmodule is required))
63 AC_SUBST(GMODULE_CFLAGS)
64 AC_SUBST(GMODULE_LIBS)
66 PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
67 AC_MSG_ERROR(libdbus is required))
71 AC_SUBST([GDBUS_CFLAGS], ['$(DBUS_CFLAGS) -I$(top_srcdir)/gdbus'])
72 AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.la $(DBUS_LIBS)'])
74 PKG_CHECK_MODULES(HAL, hal >= 0.5.8, hal_found=yes, hal_found=no)
77 AM_CONDITIONAL(HAL, test "${hal_found}" = "yes")
79 PKG_CHECK_MODULES(POLKIT, polkit-dbus >= 0.7, polkit_found=yes, polkit_found=no)
80 AC_SUBST(POLKIT_CFLAGS)
82 AM_CONDITIONAL(POLKIT, test "${polkit_found}" = "yes")
84 PKG_CHECK_MODULES(SQLITE, sqlite3, sqlite_found=yes, sqlite_found=no)
85 AC_SUBST(SQLITE_CFLAGS)
88 AC_OUTPUT(Makefile gdbus/Makefile include/Makefile src/Makefile doc/Makefile
89 test/Makefile plugins/Makefile scripts/Makefile scripts/connman
90 src/connman.service doc/version.xml connman.pc)