[gdm/gnome-2-20] Now configure favors the Xfree Xinerama interfaces over the obsolete Solaris



commit 66d8b0f71b5d589428d1b1941164f24e4e46f39f
Author: Brian Cameron <Brian Cameron sun com>
Date:   Fri Apr 24 02:41:42 2009 -0500

    Now configure favors the Xfree Xinerama interfaces over the obsolete Solaris
    specific interfaces.  This ensures that Xinerama works on OpenSolaris where
    Xfree should be used, and also on Solaris 10 where the Solaris specific
    interfaces should be used.  (bug 580060)
---
 configure.ac |   45 ++++++++++++++++++++++++---------------------
 1 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0cdddd3..5656452 100644
--- a/configure.ac
+++ b/configure.ac
@@ -699,9 +699,27 @@ fi
 ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
 
 if test ! x$with_xinerama = xno ; then
-  case "$host" in
-    *-*-solaris*)
-	# Check for solaris
+  # Check for XFree
+  use_xfree_xinerama=yes
+  AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
+            [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
+            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)
+            AC_DEFINE(HAVE_XINERAMA)
+            XINERAMA_LIBS="-lXinerama"
+            XINERAMA_SUPPORT=yes,
+            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);
+
+  if test x$use_xfree_xinerama = xno ; then
+    case "$host" in
+      *-*-solaris*)
+        # Check for solaris
 	use_solaris_xinerama=yes
 	AC_CHECK_LIB(Xext, XineramaGetInfo,
                      use_solaris_xinerama=yes, use_solaris_xinerama=no,
@@ -721,25 +739,10 @@ if test ! x$with_xinerama = xno ; 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,
-                             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)
-                             AC_DEFINE(HAVE_XINERAMA)
-		     	     XINERAMA_LIBS="-lXinerama"
-		     	     XINERAMA_SUPPORT=yes,
-                             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
 
 AC_SUBST(XINERAMA_LIBS)



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