forked from AuroraMiddleware/gtk
Improve Solaris Xinerama configure detection
The latest releases of Solaris now ship with the X.org Xserver, so it is better to use the Xfree Xinerama interfaces if available. This commit fixes the configure script so that it first tries to use the Xfree interfaces and only falls back to the Solaris-specific interfaces if they are not available. This way, older releases of Solaris which do not use X.org also will work. (Bug 580079)
This commit is contained in:
parent
961ab2e5c1
commit
3302114358
93
configure.in
93
configure.in
@ -1492,54 +1492,55 @@ if test "x$gdktarget" = "xx11"; then
|
|||||||
gtk_save_cppflags="$CPPFLAGS"
|
gtk_save_cppflags="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS $x_cflags"
|
CPPFLAGS="$CPPFLAGS $x_cflags"
|
||||||
|
|
||||||
case "$host" in
|
# Check for XFree
|
||||||
*-*-solaris*)
|
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
||||||
# Check for solaris
|
|
||||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
|
||||||
|
|
||||||
have_solaris_xinerama=false
|
have_xfree_xinerama=false
|
||||||
AC_CHECK_FUNC(XineramaGetInfo,
|
if $PKG_CONFIG --exists xinerama ; then
|
||||||
[AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
have_xfree_xinerama=true
|
||||||
[have_solaris_xinerama=true], :,
|
X_PACKAGES="$X_PACKAGES xinerama"
|
||||||
[#include <X11/Xlib.h>])])
|
else
|
||||||
|
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
||||||
if $have_solaris_xinerama ; then
|
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
|
[GTK_ADD_LIB(x_extra_libs,Xinerama)
|
||||||
[Define to 1 if solaris xinerama is available])
|
have_xfree_xinerama=true], :,
|
||||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
[#include <X11/Xlib.h>])])
|
||||||
[Define to 1 if xinerama is available])
|
fi
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Check for XFree
|
|
||||||
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
|
||||||
|
|
||||||
have_xfree_xinerama=false
|
|
||||||
if $PKG_CONFIG --exists xinerama ; then
|
|
||||||
have_xfree_xinerama=true
|
|
||||||
X_PACKAGES="$X_PACKAGES xinerama"
|
|
||||||
else
|
|
||||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
|
||||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
|
||||||
[GTK_ADD_LIB(x_extra_libs,Xinerama)
|
|
||||||
have_xfree_xinerama=true], :,
|
|
||||||
[#include <X11/Xlib.h>])])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if $have_xfree_xinerama ; then
|
if $have_xfree_xinerama ; then
|
||||||
AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
|
AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
|
||||||
[Define to 1 if XFree Xinerama is available])
|
[Define to 1 if XFree Xinerama is available])
|
||||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||||
[Define to 1 is Xinerama is available])
|
[Define to 1 is Xinerama is available])
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
|
||||||
;;
|
case "$host" in
|
||||||
esac
|
*-*-solaris*)
|
||||||
|
# Check for solaris
|
||||||
|
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||||
|
|
||||||
|
have_solaris_xinerama=false
|
||||||
|
AC_CHECK_FUNC(XineramaGetInfo,
|
||||||
|
[AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
||||||
|
[have_solaris_xinerama=true], :,
|
||||||
|
[#include <X11/Xlib.h>])])
|
||||||
|
|
||||||
|
if $have_solaris_xinerama ; then
|
||||||
|
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
|
||||||
|
[Define to 1 if solaris xinerama is available])
|
||||||
|
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||||
|
[Define to 1 if xinerama is available])
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set up things for XInput
|
# set up things for XInput
|
||||||
|
Loading…
Reference in New Issue
Block a user