summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-09-27 20:28:34 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-09-27 20:28:34 +0000
commit74b3bca93d0223e3b273c7613b9020fdbd8fef80 (patch)
treec62e308f1d98ae0cec62415196116e57ac33fb64 /configure.in
parente7e41b045d1dc27bf5cb474651db9418d062d362 (diff)
downloadmetacity-74b3bca93d0223e3b273c7613b9020fdbd8fef80.tar.gz
metacity-74b3bca93d0223e3b273c7613b9020fdbd8fef80.tar.bz2
Try to handle Solaris Xinerama, all coded blind, someone on Solaris will
2002-09-27 Havoc Pennington <hp@redhat.com> Try to handle Solaris Xinerama, all coded blind, someone on Solaris will need to debug the typos. * src/display.c: updates for Solaris Xinerama * src/screen.c: updates for Solaris Xinerama * configure.in: make Xinerama check more complicated to catch Solaris Xinerama
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in58
1 files changed, 46 insertions, 12 deletions
diff --git a/configure.in b/configure.in
index 271230f..c6fd4f3 100644
--- a/configure.in
+++ b/configure.in
@@ -102,25 +102,59 @@ fi
AC_PATH_XTRA
-XINERAMA_LIBS=
-found_xinerama=false
-save_CPPFLAGS="$CPPFLAGS"
+ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
+
+# Check for Xinerama extension (Solaris impl or Xfree impl)
+metacity_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-AC_CHECK_LIB(Xext, XineramaQueryExtension,
- [AC_CHECK_HEADERS(X11/extensions/Xinerama.h,
- XINERAMA_LIBS=-lXinerama found_xinerama=true)],
- , -lXinerama $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS)
-if test "$found_xinerama" = "true"; then
- AC_DEFINE(HAVE_XINERAMA)
-fi
+case "$host" in
+ *-*-solaris*)
+ # Check for solaris
+ use_solaris_xinerama=yes
+ AC_CHECK_LIB(Xext, XineramaGetInfo,
+ use_solaris_xinerama=yes, use_solaris_xinerama=no,
+ $ALL_X_LIBS)
+ if test "x$use_solaris_xinerama" = "xyes"; then
+ 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_SOLARIS_XINERAMA)
+ AC_DEFINE(HAVE_XINERAMA),
+ use_solaris_xinerama=no,
+ [#include <X11/Xlib.h>])
+ fi
+ 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)
+ AC_DEFINE(HAVE_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
+
+CPPFLAGS="$metacity_save_cppflags"
SHAPE_LIBS=
found_shape=false
AC_CHECK_LIB(Xext, XShapeQueryExtension,
[AC_CHECK_HEADERS(X11/extensions/shape.h,
SHAPE_LIBS=-lXext found_shape=true)],
- , -lXext $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS)
+ , $ALL_X_LIBS)
if test "$found_shape" = "true"; then
AC_DEFINE(HAVE_SHAPE)
@@ -128,7 +162,7 @@ fi
CPPFLAGS="$save_CPPFLAGS"
-METACITY_LIBS="$XINERAMA_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS"
+METACITY_LIBS="$SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS"
METACITY_MESSAGE_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_MESSAGE_LIBS"
METACITY_WINDOW_DEMO_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_WINDOW_DEMO_LIBS"
METACITY_PROPS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_PROPS_LIBS"