summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@0d.be>2009-08-08 17:15:34 +0100
committerLucas Rocha <lucasr@gnome.org>2009-08-08 17:24:54 +0100
commiteae739b52894f9eb631cfef4535b2c36384aba31 (patch)
treeeb2d39fce4ce82ff061a772cf49158d37935fad3 /configure.in
parent[progress] Remove duplicate code when returning (diff)
downloadzenity-eae739b52894f9eb631cfef4535b2c36384aba31.tar.gz
zenity-eae739b52894f9eb631cfef4535b2c36384aba31.tar.bz2
zenity-eae739b52894f9eb631cfef4535b2c36384aba31.zip
Bug 559638 – explicitly link against libX11
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index b3f8ea2b..2034b2e0 100644
--- a/configure.in
+++ b/configure.in
@@ -22,6 +22,34 @@ PKG_CHECK_MODULES([ZENITY],[gtk+-2.0 >= $GTK_REQUIRED glib-2.0])
AC_SUBST([ZENITY_CFLAGS])
AC_SUBST([ZENITY_LIBS])
+dnl *************************
+dnl Check for the GTK+ backend, if it's X11, we -lX11
+dnl *************************
+
+zenity_save_cflags="$CFLAGS"
+# pull in the CFLAGS to locate gdkconfig.h
+CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
+AC_COMPILE_IFELSE([
+#include <gdkconfig.h>
+
+int main(void) {
+#ifndef GDK_WINDOWING_X11
+#error GDK_WINDOWING_X11 not defined
+#endif
+ return 0;
+}
+],
+ GDK_BACKEND_X11=yes,
+ GDK_BACKEND_X11=no)
+
+CFLAGS="$zenity_save_cflags"
+
+if test "x$GDK_BACKEND_X11" = "xyes"; then
+ PKG_CHECK_MODULES(X, x11)
+ ZENITY_CFLAGS="$ZENITY_CFLAGS $X_CFLAGS"
+ ZENITY_LIBS="$ZENITY_LIBS $X_LIBS"
+fi
+
# *******************************
# perl check
# *******************************
bgstack15