[gtk+] build: split out a HAVE_GIO_UNIX config variable



commit 1713cbe8d0ee9a610a448aa8d27cf7d7ddf5ad41
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Apr 11 10:22:57 2012 -0400

    build: split out a HAVE_GIO_UNIX config variable
    
    We'll use it in GtkApplicationWindow, since we need to conditionally
    depend on gio-unix there.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673882

 configure.ac |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2910127..f94997b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -318,11 +318,11 @@ AC_ARG_ENABLE(quartz-relocation,
 
 cairo_backends=
 backend_immodules=
+have_gio_unix=no
 GDK_BACKENDS=
 GDK_EXTRA_LIBS=
 GDK_EXTRA_CFLAGS=
 GDK_WINDOWING=
-GIO_PACKAGE=gio-2.0
 PANGO_PACKAGES="pango pangocairo"
 
 if test "$enable_x11_backend" = "yes"; then
@@ -332,7 +332,7 @@ if test "$enable_x11_backend" = "yes"; then
   GDK_BACKENDS="$GDK_BACKENDS x11"
   # Pull in gio-unix for GDesktopAppInfo usage, see at least
   # gdkapplaunchcontext-x11.c
-  GIO_PACKAGE=gio-unix-2.0
+  have_gio_unix=yes
   backend_immodules="$backend_immodules,xim"
   GDK_WINDOWING="$GDK_WINDOWING
 #define GDK_WINDOWING_X11"
@@ -382,7 +382,7 @@ if test "x$enable_wayland_backend" == "xyes"; then
   # Wayland uses cairo-gl
   cairo_backends="$cairo_backends cairo-gl"
   GDK_BACKENDS="$GDK_BACKENDS wayland"
-  GIO_PACKAGE=gio-unix-2.0
+  have_gio_unix=yes
   GDK_WINDOWING="$GDK_WINDOWING
 #define GDK_WINDOWING_WAYLAND"
   WAYLAND_PACKAGES="wayland-client xkbcommon wayland-egl egl"
@@ -1194,6 +1194,15 @@ else
   AM_CONDITIONAL(USE_X11, false)
 fi
 
+# Check for gio-unix
+if test "$have_gio_unix" = "yes"; then
+  GDK_GIO_PACKAGE=gio-unix-2.0
+  AC_DEFINE([HAVE_GIO_UNIX], [1],
+            [Define if gio-unix is available])
+else
+  GDK_GIO_PACKAGE=gio-2.0
+fi
+
 # Check for Pango flags
 
 AC_MSG_CHECKING(Pango flags)
@@ -1226,7 +1235,7 @@ CFLAGS="$saved_cflags"
 LDFLAGS="$saved_ldflags"
 
 GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 cairo cairo-gobject"
-GDK_PRIVATE_PACKAGES="$GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $cairo_backends"
+GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $cairo_backends"
 if test "x$enable_x11_backend" = xyes; then
   GDK_PRIVATE_PACKAGES="$GDK_PRIVATE_PACKAGES pangoft2"
 fi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]