summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-11-24 11:27:26 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-11-24 11:27:26 +0100
commitb6e6635dca3c929df0240fad174838e7cd17ccf3 (patch)
tree69e5af070df9ea0a7680f450166c3565758fb30e /configure.ac
parent501d003fce99e6a9c366d9bbac5c2a293dce9163 (diff)
downloadconnman-b6e6635dca3c929df0240fad174838e7cd17ccf3.tar.gz
connman-b6e6635dca3c929df0240fad174838e7cd17ccf3.tar.bz2
connman-b6e6635dca3c929df0240fad174838e7cd17ccf3.zip
Make threading support optional
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index c3e4f7f1..48074201 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,10 +56,15 @@ PKG_CHECK_MODULES(GLIB, glib-2.0, dummy=yes,
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
-PKG_CHECK_MODULES(GTHREAD, gthread-2.0, dummy=yes,
+AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads],
+ [enable threading support]), [
+ AC_DEFINE(NEED_THREADS, 1, [Define if threading support is required])
+
+ PKG_CHECK_MODULES(GTHREAD, gthread-2.0, dummy=yes,
AC_MSG_ERROR(gthread is required))
-AC_SUBST(GTHREAD_CFLAGS)
-AC_SUBST(GTHREAD_LIBS)
+ GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
+ GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
+])
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
AC_MSG_ERROR(libdbus is required))