[devhelp] build: Fix detection of GDK backend in case of multiple backends
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] build: Fix detection of GDK backend in case of multiple backends
- Date: Sat, 17 Dec 2011 15:51:31 +0000 (UTC)
commit 51e150fd3a708d4451c1ff311dae0b2e42495a1a
Author: Vincent Untz <vuntz gnome org>
Date: Mon Jul 4 14:39:22 2011 +0200
build: Fix detection of GDK backend in case of multiple backends
The GDK backend detection routine only worked in the case where GTK+ is
built for one and only one backend.
https://bugzilla.gnome.org/show_bug.cgi?id=652999
acinclude.m4 | 44 ++++++++++++++++++++++++++------------------
1 files changed, 26 insertions(+), 18 deletions(-)
---
diff --git a/acinclude.m4 b/acinclude.m4
index 56aa3a2..cc47f19 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,24 +1,32 @@
AC_DEFUN([IGE_PLATFORM_CHECK],[
- gdk_target=`$PKG_CONFIG --variable=targets gtk+-3.0`
+ gdk_targets=`$PKG_CONFIG --variable=targets gtk+-3.0`
- if test "x$gdk_target" = "xquartz"; then
- AC_MSG_CHECKING([checking for Mac OS X support])
- carbon_ok=no
- AC_TRY_CPP([
- #include <Carbon/Carbon.h>
- #include <CoreServices/CoreServices.h>
- ], carbon_ok=yes)
- AC_MSG_RESULT($carbon_ok)
- if test $carbon_ok = yes; then
- IGE_PLATFORM=osx
- IGE_PLATFORM_NAME="GTK+ OS X"
- AC_DEFINE(HAVE_PLATFORM_OSX, 1, [whether GTK+ OS X is available])
+ IGE_PLATFORM=
+
+ for gdk_target in $gdk_targets; do
+ if test "x$gdk_target" = "xquartz"; then
+ AC_MSG_CHECKING([checking for Mac OS X support])
+ carbon_ok=no
+ AC_TRY_CPP([
+ #include <Carbon/Carbon.h>
+ #include <CoreServices/CoreServices.h>
+ ], carbon_ok=yes)
+ AC_MSG_RESULT($carbon_ok)
+ if test $carbon_ok = yes; then
+ IGE_PLATFORM=osx
+ IGE_PLATFORM_NAME="GTK+ OS X"
+ AC_DEFINE(HAVE_PLATFORM_OSX, 1, [whether GTK+ OS X is available])
+ break
+ fi
+ elif test "x$gdk_target" = "xx11"; then
+ IGE_PLATFORM=x11
+ IGE_PLATFORM_NAME="GTK+ X11"
+ AC_DEFINE(HAVE_PLATFORM_X11, 1, [whether GTK+ X11 is available])
+ break
fi
- elif test "x$gdk_target" = "xx11"; then
- IGE_PLATFORM=x11
- IGE_PLATFORM_NAME="GTK+ X11"
- AC_DEFINE(HAVE_PLATFORM_X11, 1, [whether GTK+ X11 is available])
- else
+ done
+
+ if test "x$IGE_PLATFORM" = "x"; then
AC_MSG_ERROR([Could not detect the platform])
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]