summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel.holtmann@intel.com>2009-04-26 20:46:54 +0200
committerMarcel Holtmann <marcel.holtmann@intel.com>2009-04-26 20:46:54 +0200
commit798111efd4d2af5101993f10f7df76cbcfaa24bb (patch)
tree831988aec48316bc6276cb5561fbd61e4bd2f656
parentedaa239e92e69577f840f58ea90025d299f2c42c (diff)
downloadofono-798111efd4d2af5101993f10f7df76cbcfaa24bb.tar.bz2
Add checks for GLib and D-Bus support
-rw-r--r--README21
-rw-r--r--configure.ac31
2 files changed, 52 insertions, 0 deletions
diff --git a/README b/README
index e69de29b..7061e3d0 100644
--- a/README
+++ b/README
@@ -0,0 +1,21 @@
+oFono - Open Telephony stack for Linux
+**************************************
+
+Copyright (C) 2008-2009 Intel Corporation. All rights reserved.
+
+
+Compilation and installation
+============================
+
+In order to compile Telephony stack you need following software packages:
+ - GCC compiler
+ - GLib library
+ - D-Bus library
+
+To configure run:
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+
+Configure automatically searches for all required components and packages.
+
+To compile and install run:
+ make && make install
diff --git a/configure.ac b/configure.ac
index 03c7efe2..33543c5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,4 +33,35 @@ AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
fi
])
+AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads],
+ [enable threading support]), [enable_threads=${enableval}])
+
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
+ AC_MSG_ERROR(GLib >= 2.16 is required))
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+if (test "${enable_threads}" = "yes"); then
+ AC_DEFINE(NEED_THREADS, 1, [Define if threading support is required])
+ PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
+ AC_MSG_ERROR(GThread >= 2.16 is required))
+ GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
+ GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
+fi
+
+PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
+ AC_MSG_ERROR(D-Bus >= 1.0 is required))
+AC_CHECK_LIB(dbus-1, dbus_watch_get_unix_fd, dummy=yes,
+ AC_DEFINE(NEED_DBUS_WATCH_GET_UNIX_FD, 1,
+ [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
+ DBUS_DATADIR="${sysconfdir}/dbus-1/system.d"
+else
+ DBUS_DATADIR="$DBUS_DATADIR/dbus-1/system.d"
+fi
+AC_SUBST(DBUS_DATADIR)
+
AC_OUTPUT(Makefile)