patches/metacity-07-xfree-xinerama.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 15770 e5241171576b
permissions -rw-r--r--
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446

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"