patches/metacity-07-xfree-xinerama.diff
author erwannc
Fri, 15 May 2009 09:54:37 +0000
changeset 15770 e5241171576b
parent 15737 184f2cac7373
permissions -rw-r--r--
2009-05-15 Erwann Chenede - <[email protected]> * patches/metacity-07-xfree-xinerama.diff: only change the Xinerama implementation detection order instead of removing the Solaris xinerama implementation. This allow this version of metacity to be build Xinerama on system including XSun xinerama implementation

diff -rup metacity-2.26.0/configure.in ../metacity-2.26.0/configure.in
--- metacity-2.26.0/configure.in	2009-05-15 11:43:22.275520544 +0200
+++ ../metacity-2.26.0/configure.in	2009-05-15 11:42:21.247062243 +0200
@@ -301,8 +301,28 @@ AC_ARG_ENABLE(xinerama,
 
 use_solaris_xinerama=no
 use_xfree_xinerama=no
+
 if test "${try_xinerama}" != no; then
-    case "$host" in
+
+  # Check for XFree
+  use_xfree_xinerama=yes
+      AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
+          [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
+                           X_EXTRA_LIBS="-lXinerama $X_EXTRA_LIBS"   
+                           if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
+                               X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
+                           fi
+                           AC_DEFINE(HAVE_XFREE_XINERAMA, , [Have XFree86-style Xinerama])
+                           AC_DEFINE(HAVE_XINERAMA,, [Have some version of Xinerama]), 
+                           use_xfree_xinerama=no,
+                           [#include <X11/Xlib.h>])],
+          use_xfree_xinerama=no, -lXext $ALL_X_LIBS)
+      AC_MSG_CHECKING(for Xinerama support on XFree86)
+      AC_MSG_RESULT($use_xfree_xinerama);
+
+    # Fallback to Solaris implementation if it doesn't exist
+    if test "x$use_xfree_xinerama" == "xno"; then
+      case "$host" in
         *-*-solaris*)
             # Check for solaris
             use_solaris_xinerama=yes
@@ -322,24 +342,8 @@ if test "${try_xinerama}" != no; then
             AC_MSG_CHECKING(for Xinerama support on Solaris)
             AC_MSG_RESULT($use_solaris_xinerama);
             ;;
-        *)
-            # Check for XFree
-            use_xfree_xinerama=yes
-            AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
-                [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
-                                 X_EXTRA_LIBS="-lXinerama $X_EXTRA_LIBS"   
-                                 if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
-                                     X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
-                                 fi
-                                 AC_DEFINE(HAVE_XFREE_XINERAMA, , [Have XFree86-style Xinerama])
-                                 AC_DEFINE(HAVE_XINERAMA,, [Have some version of Xinerama]), 
-                                 use_xfree_xinerama=no,
-                                 [#include <X11/Xlib.h>])],
-                use_xfree_xinerama=no, -lXext $ALL_X_LIBS)
-            AC_MSG_CHECKING(for Xinerama support on XFree86)
-            AC_MSG_RESULT($use_xfree_xinerama);
-            ;;
-    esac
+	esac
+    fi
 fi
 
 CPPFLAGS="$metacity_save_cppflags"