Revert "winex11: Remove some leftover X Shm code."

This reverts commit 515329d58c.
We'll want to use XShm again for window surfaces.
This commit is contained in:
Alexandre Julliard 2012-10-03 15:30:37 +02:00
parent 70a511739e
commit 85b34be52f
3 changed files with 82 additions and 0 deletions

63
configure vendored
View File

@ -838,6 +838,7 @@ with_xml
with_xrandr with_xrandr
with_xrender with_xrender
with_xshape with_xshape
with_xshm
with_xslt with_xslt
with_xxf86vm with_xxf86vm
with_zlib with_zlib
@ -1527,6 +1528,7 @@ Optional Packages:
--without-xrandr do not use Xrandr (resolution changes) --without-xrandr do not use Xrandr (resolution changes)
--without-xrender do not use the Xrender extension --without-xrender do not use the Xrender extension
--without-xshape do not use the Xshape extension --without-xshape do not use the Xshape extension
--without-xshm do not use XShm (shared memory extension)
--without-xslt do not use XSLT --without-xslt do not use XSLT
--without-xxf86vm do not use XFree video mode extension --without-xxf86vm do not use XFree video mode extension
--without-zlib do not use Zlib (data compression) --without-zlib do not use Zlib (data compression)
@ -2777,6 +2779,12 @@ if test "${with_xshape+set}" = set; then :
fi fi
# Check whether --with-xshm was given.
if test "${with_xshm+set}" = set; then :
withval=$with_xshm; if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_XShm_h=no; fi
fi
# Check whether --with-xslt was given. # Check whether --with-xslt was given.
if test "${with_xslt+set}" = set; then : if test "${with_xslt+set}" = set; then :
withval=$with_xslt; withval=$with_xslt;
@ -8085,6 +8093,7 @@ fi
X11/extensions/shape.h \ X11/extensions/shape.h \
X11/extensions/XInput.h \ X11/extensions/XInput.h \
X11/extensions/XInput2.h \ X11/extensions/XInput2.h \
X11/extensions/XShm.h \
X11/extensions/Xcomposite.h \ X11/extensions/Xcomposite.h \
X11/extensions/Xinerama.h \ X11/extensions/Xinerama.h \
X11/extensions/Xrandr.h \ X11/extensions/Xrandr.h \
@ -8290,6 +8299,60 @@ fi
This is an error since --with-xinput2 was requested." "$LINENO" 5 ;; This is an error since --with-xinput2 was requested." "$LINENO" 5 ;;
esac esac
fi fi
fi
if test "$ac_cv_header_X11_extensions_XShm_h" = "yes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXext" >&5
$as_echo_n "checking for XShmQueryExtension in -lXext... " >&6; }
if ${ac_cv_lib_Xext_XShmQueryExtension+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXext $X_LIBS $XLIB $X_EXTRA_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 XShmQueryExtension ();
int
main ()
{
return XShmQueryExtension ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Xext_XShmQueryExtension=yes
else
ac_cv_lib_Xext_XShmQueryExtension=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShmQueryExtension" >&5
$as_echo "$ac_cv_lib_Xext_XShmQueryExtension" >&6; }
if test "x$ac_cv_lib_Xext_XShmQueryExtension" = xyes; then :
$as_echo "#define HAVE_LIBXXSHM 1" >>confdefs.h
fi
fi
if test "$ac_cv_lib_Xext_XShmQueryExtension" != "yes"; then :
case "x$with_xshm" in
x) as_fn_append wine_notices "|XShm ${notice_platform}development files not found, X Shared Memory won't be supported." ;;
xno) ;;
*) as_fn_error $? "XShm ${notice_platform}development files not found, X Shared Memory won't be supported.
This is an error since --with-xshm was requested." "$LINENO" 5 ;;
esac
fi fi
if test "$ac_cv_header_X11_extensions_shape_h" = "yes" if test "$ac_cv_header_X11_extensions_shape_h" = "yes"

View File

@ -97,6 +97,8 @@ AC_ARG_WITH(xrender, AS_HELP_STRING([--without-xrender],[do not use the Xrende
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xrender_h=no; fi]) [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xrender_h=no; fi])
AC_ARG_WITH(xshape, AS_HELP_STRING([--without-xshape],[do not use the Xshape extension]), AC_ARG_WITH(xshape, AS_HELP_STRING([--without-xshape],[do not use the Xshape extension]),
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_shape_h=no; fi]) [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_shape_h=no; fi])
AC_ARG_WITH(xshm, AS_HELP_STRING([--without-xshm],[do not use XShm (shared memory extension)]),
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_XShm_h=no; fi])
AC_ARG_WITH(xslt, AS_HELP_STRING([--without-xslt],[do not use XSLT])) AC_ARG_WITH(xslt, AS_HELP_STRING([--without-xslt],[do not use XSLT]))
AC_ARG_WITH(xxf86vm, AS_HELP_STRING([--without-xxf86vm],[do not use XFree video mode extension]), AC_ARG_WITH(xxf86vm, AS_HELP_STRING([--without-xxf86vm],[do not use XFree video mode extension]),
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_xf86vmode_h=no; ac_cv_header_X11_extensions_xf86vmproto_h=no; fi]) [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_xf86vmode_h=no; ac_cv_header_X11_extensions_xf86vmproto_h=no; fi])
@ -972,6 +974,7 @@ then
X11/extensions/shape.h \ X11/extensions/shape.h \
X11/extensions/XInput.h \ X11/extensions/XInput.h \
X11/extensions/XInput2.h \ X11/extensions/XInput2.h \
X11/extensions/XShm.h \
X11/extensions/Xcomposite.h \ X11/extensions/Xcomposite.h \
X11/extensions/Xinerama.h \ X11/extensions/Xinerama.h \
X11/extensions/Xrandr.h \ X11/extensions/Xrandr.h \
@ -1016,6 +1019,16 @@ then
[XInput2 headers not found, the XInput 2 extension won't be supported.]) [XInput2 headers not found, the XInput 2 extension won't be supported.])
fi fi
dnl *** Check for X Shm extension
if test "$ac_cv_header_X11_extensions_XShm_h" = "yes"
then
AC_CHECK_LIB(Xext, XShmQueryExtension,
AC_DEFINE(HAVE_LIBXXSHM, 1, [Define if you have the X Shm extension]),,
$X_LIBS $XLIB $X_EXTRA_LIBS)
fi
WINE_NOTICE_WITH(xshm,[test "$ac_cv_lib_Xext_XShmQueryExtension" != "yes"],
[XShm ${notice_platform}development files not found, X Shared Memory won't be supported.])
dnl *** Check for X shape extension dnl *** Check for X shape extension
if test "$ac_cv_header_X11_extensions_shape_h" = "yes" if test "$ac_cv_header_X11_extensions_shape_h" = "yes"
then then

View File

@ -377,6 +377,9 @@
/* Define to 1 if you have the <libxslt/transform.h> header file. */ /* Define to 1 if you have the <libxslt/transform.h> header file. */
#undef HAVE_LIBXSLT_TRANSFORM_H #undef HAVE_LIBXSLT_TRANSFORM_H
/* Define if you have the X Shm extension */
#undef HAVE_LIBXXSHM
/* Define to 1 if you have the <link.h> header file. */ /* Define to 1 if you have the <link.h> header file. */
#undef HAVE_LINK_H #undef HAVE_LINK_H
@ -1106,6 +1109,9 @@
/* Define to 1 if you have the <X11/extensions/Xrender.h> header file. */ /* Define to 1 if you have the <X11/extensions/Xrender.h> header file. */
#undef HAVE_X11_EXTENSIONS_XRENDER_H #undef HAVE_X11_EXTENSIONS_XRENDER_H
/* Define to 1 if you have the <X11/extensions/XShm.h> header file. */
#undef HAVE_X11_EXTENSIONS_XSHM_H
/* Define to 1 if you have the <X11/Xcursor/Xcursor.h> header file. */ /* Define to 1 if you have the <X11/Xcursor/Xcursor.h> header file. */
#undef HAVE_X11_XCURSOR_XCURSOR_H #undef HAVE_X11_XCURSOR_XCURSOR_H