From: Marcel Holtmann Date: Sun, 26 Apr 2009 18:46:54 +0000 (+0200) Subject: Add checks for GLib and D-Bus support X-Git-Tag: 0.1~268 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=798111efd4d2af5101993f10f7df76cbcfaa24bb;p=platform%2Fupstream%2Fofono.git Add checks for GLib and D-Bus support --- diff --git a/README b/README index e69de29..7061e3d 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 03c7efe..33543c5 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)