configure: Check for the Xinerama extension.

This commit is contained in:
Alexandre Julliard 2006-10-23 13:46:34 +02:00
parent 94523a85d2
commit 7d00b0504e
3 changed files with 182 additions and 0 deletions

162
configure vendored
View File

@ -8659,12 +8659,14 @@ then
for ac_header in X11/Xlib.h \
X11/XKBlib.h \
X11/Xutil.h \
X11/extensions/shape.h \
X11/extensions/XInput.h \
X11/extensions/XShm.h \
X11/extensions/Xinerama.h \
X11/extensions/Xrandr.h \
X11/extensions/Xrender.h \
X11/extensions/xf86vmode.h
@ -9261,6 +9263,74 @@ fi
fi
if test "$ac_cv_header_X11_extensions_Xinerama_h" = "yes"
then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <X11/Xlib.h>
#include <X11/extensions/Xinerama.h>
int
main ()
{
static typeof(XineramaQueryScreens) * func;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBXINERAMA 1
_ACEOF
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test "x$with_opengl" != "xno"
then
@ -16612,6 +16682,98 @@ cat >>confdefs.h <<_ACEOF
#define SONAME_LIBXI "$ac_cv_lib_soname_Xi"
_ACEOF
fi
{ echo "$as_me:$LINENO: checking for -lXinerama soname" >&5
echo $ECHO_N "checking for -lXinerama soname... $ECHO_C" >&6; }
if test "${ac_cv_lib_soname_Xinerama+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_get_soname_save_LIBS=$LIBS
LIBS="-lXinerama $X_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char XineramaQueryScreens ();
int
main ()
{
return XineramaQueryScreens ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
case "$LIBEXT" in
dylib) ac_cv_lib_soname_Xinerama=`otool -L conftest$ac_exeext | grep libXinerama\\.[0-9A-Za-z.]*dylib | sed -e "s/^.*\/\(libXinerama\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
so) ac_cv_lib_soname_Xinerama=`$ac_cv_path_LDD conftest$ac_exeext | grep libXinerama\\.so | sed -e "s/^.*\(libXinerama\.so[^ ]*\).*$/\1/"';2,$d'` ;;
esac
if test "x$ac_cv_lib_soname_Xinerama" = "x"
then
ac_cv_lib_soname_Xinerama="libXinerama.$LIBEXT"
fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_soname_Xinerama="libXinerama.$LIBEXT"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_get_soname_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_soname_Xinerama" >&5
echo "${ECHO_T}$ac_cv_lib_soname_Xinerama" >&6; }
if test "${ac_cv_lib_soname_Xinerama+set}" = set; then
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBXINERAMA "$ac_cv_lib_soname_Xinerama"
_ACEOF
fi
{ echo "$as_me:$LINENO: checking for -lXrender soname" >&5

View File

@ -328,6 +328,7 @@ then
X11/extensions/shape.h \
X11/extensions/XInput.h \
X11/extensions/XShm.h \
X11/extensions/Xinerama.h \
X11/extensions/Xrandr.h \
X11/extensions/Xrender.h \
X11/extensions/xf86vmode.h],,,
@ -388,6 +389,15 @@ then
[Define if Xrender has the XRenderSetPictureTransform function])],,
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
fi
dnl *** Check for Xinerama extension
if test "$ac_cv_header_X11_extensions_Xinerama_h" = "yes"
then
AC_TRY_COMPILE([#include <X11/Xlib.h>
#include <X11/extensions/Xinerama.h>],[static typeof(XineramaQueryScreens) * func;],
[AC_DEFINE(HAVE_LIBXINERAMA, 1, [Define if you have the Xinerama library])])
fi
dnl *** End of X11/Xlib.h check
dnl Check for the presence of OpenGL
@ -1133,6 +1143,7 @@ then
WINE_GET_SONAME(X11,XCreateWindow,[$X_LIBS $X_EXTRA_LIBS])
WINE_GET_SONAME(Xext,XextCreateExtension,[$X_LIBS -lX11 $X_EXTRA_LIBS])
WINE_GET_SONAME(Xi,XOpenDevice,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
WINE_GET_SONAME(Xinerama,XineramaQueryScreens,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
WINE_GET_SONAME(Xrender,XRenderQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
WINE_GET_SONAME(Xrandr,XRRQueryExtension,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
WINE_GET_SONAME(freetype,FT_Init_FreeType,[$X_LIBS])

View File

@ -320,6 +320,9 @@
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define if you have the Xinerama library */
#undef HAVE_LIBXINERAMA
/* Define if you have the libxml2 library */
#undef HAVE_LIBXML2
@ -896,6 +899,9 @@
/* Define to 1 if you have the <X11/extensions/xf86vmode.h> header file. */
#undef HAVE_X11_EXTENSIONS_XF86VMODE_H
/* Define to 1 if you have the <X11/extensions/Xinerama.h> header file. */
#undef HAVE_X11_EXTENSIONS_XINERAMA_H
/* Define to 1 if you have the <X11/extensions/XInput.h> header file. */
#undef HAVE_X11_EXTENSIONS_XINPUT_H
@ -1013,6 +1019,9 @@
/* Define to the soname of the libXi library. */
#undef SONAME_LIBXI
/* Define to the soname of the libXinerama library. */
#undef SONAME_LIBXINERAMA
/* Define to the soname of the libXrandr library. */
#undef SONAME_LIBXRANDR