[unique] [build] Check for X11 if we are building for it
- From: Emmanuele Bassi <ebassi src gnome org>
- To: svn-commits-list gnome org
- Subject: [unique] [build] Check for X11 if we are building for it
- Date: Sun, 3 May 2009 10:02:23 -0400 (EDT)
commit 2c594e55d418793a9467eb7ca02db916dd2394dd
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun May 3 10:53:05 2009 +0100
[build] Check for X11 if we are building for it
Currently we use AC_PATH_XTRA and check for X11 using pkg-config
unconditionally. Instead, we should check for GTK+ first, see which
GDK target is installed and check for X11 only if we are building
against an X11 build.
---
configure.ac | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index c73fb06..5341ec5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,7 +52,6 @@ AC_SUBST(UNIQUE_LT_CURRENT_MINUS_AGE)
AC_ISC_POSIX
AC_PROG_CC
-AC_PATH_XTRA
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_C_CONST
@@ -70,10 +69,24 @@ m4_define([glib_required], [2.12.0])
m4_define([gtk_required], [2.11.0])
m4_define([dbus_required], [0.70])
-PKG_CHECK_MODULES(UNIQUE, x11 dnl
- glib-2.0 >= glib_required dnl
+PKG_CHECK_MODULES(UNIQUE, glib-2.0 >= glib_required dnl
gtk+-2.0 >= gtk_required)
+gdktarget=`$PKG_CONFIG --variable=target gdk-2.0`
+AS_IF([test "X$gdktarget" = "Xx11"],
+ [
+ AC_PATH_XTRA
+
+ PKG_CHECK_MODULES(UNIQUE_X11, x11)
+
+ UNIQUE_CFLAGS="$UNIQUE_CFLAGS $UNIQUE_X11_CFLAGS"
+ UNIQUE_LIBS="$UNIQUE_LIBS $UNIQUE_X11_LIBS"
+ ]
+)
+
+AC_SUBST(UNIQUE_CFLAGS)
+AC_SUBST(UNIQUE_LIBS)
+
dnl D-Bus backend dependencies
m4_define([have_dbus_default], [yes])
AC_ARG_ENABLE([dbus],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]