summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-07-29 22:35:31 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-07-29 22:35:31 +0200
commit8f4ff42f40e48954df28bdea79fcdfdb9e201418 (patch)
tree14ff731db89156d51a67f8b05fb20f24f873d269 /configure.ac
parent908161662bbe796e2962929ff2131c9bae07f13e (diff)
downloadconnman-8f4ff42f40e48954df28bdea79fcdfdb9e201418.tar.gz
connman-8f4ff42f40e48954df28bdea79fcdfdb9e201418.tar.bz2
connman-8f4ff42f40e48954df28bdea79fcdfdb9e201418.zip
Use configure.ac as it is the preferred name
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac86
1 files changed, 86 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000..8abdd137
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,86 @@
+AC_PREREQ(2.50)
+AC_INIT()
+
+AM_INIT_AUTOMAKE(connman, 0.0)
+AM_CONFIG_HEADER(config.h)
+
+AM_MAINTAINER_MODE
+
+AC_PREFIX_DEFAULT(/usr/local)
+
+if (test "${CFLAGS}" = ""); then
+ CFLAGS="-Wall -O2 -D_FORTIFY_SOURCE=2"
+fi
+
+AC_LANG_C
+
+AC_PROG_CC
+AC_PROG_CC_PIE
+AC_PROG_INSTALL
+
+m4_define([_LT_AC_TAGCONFIG], [])
+m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
+
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
+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"
+ fi
+])
+
+AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
+ [enable position independent executables flag]), [
+ if (test "${enableval}" = "yes" &&
+ test "${ac_cv_prog_cc_pie}" = "yes"); then
+ CFLAGS="$CFLAGS -fPIE"
+ LDFLAGS="$LDFLAGS -pie"
+ fi
+])
+
+AC_PATH_PROG(DHCLIENT, [dhclient])
+AC_PATH_PROG(WPASUPPLICANT, [wpa_supplicant])
+
+PKG_CHECK_MODULES(GLIB, glib-2.0, dummy=yes,
+ AC_MSG_ERROR(glib is required))
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+PKG_CHECK_MODULES(GTHREAD, gthread-2.0, dummy=yes,
+ AC_MSG_ERROR(gthread is required))
+AC_SUBST(GTHREAD_CFLAGS)
+AC_SUBST(GTHREAD_LIBS)
+
+PKG_CHECK_MODULES(GMODULE, gmodule-2.0, dummy=yes,
+ AC_MSG_ERROR(gmodule is required))
+AC_SUBST(GMODULE_CFLAGS)
+AC_SUBST(GMODULE_LIBS)
+
+PKG_CHECK_MODULES(GDBUS, gdbus, dummy=yes,
+ AC_MSG_ERROR(libgdbus is required))
+AC_SUBST(GDBUS_CFLAGS)
+AC_SUBST(GDBUS_LIBS)
+
+PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
+ AC_MSG_ERROR(libdbus is required))
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+
+PKG_CHECK_MODULES(HAL, hal >= 0.5.8, dummy=yes,
+ AC_MSG_ERROR(libhal is required))
+AC_SUBST(HAL_CFLAGS)
+AC_SUBST(HAL_LIBS)
+
+PKG_CHECK_MODULES(SQLITE, sqlite3, dummy=yes,
+ AC_MSG_ERROR(sqlite3 is required))
+AC_SUBST(SQLITE_CFLAGS)
+AC_SUBST(SQLITE_LIBS)
+
+AC_OUTPUT(Makefile include/Makefile src/Makefile doc/Makefile
+ test/Makefile plugins/Makefile scripts/Makefile
+ scripts/fi.epitest.hostap.WPASupplicant.service
+ scripts/connman src/connman.service connman.pc)
+