configure: Merge the libXrender existence check with the soname check.
This commit is contained in:
parent
af928ecbfa
commit
629639ee60
|
@ -9324,7 +9324,158 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes"
|
||||
if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
|
||||
then
|
||||
{ echo "$as_me:$LINENO: checking for -lXrender" >&5
|
||||
echo $ECHO_N "checking for -lXrender... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_soname_Xrender+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_soname_save_LIBS=$LIBS
|
||||
LIBS="-lXrender $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 XRenderQueryExtension ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return XRenderQueryExtension ();
|
||||
;
|
||||
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); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext &&
|
||||
$as_test_x conftest$ac_exeext; then
|
||||
case "$LIBEXT" in
|
||||
dll) ;;
|
||||
dylib) ac_cv_lib_soname_Xrender=`otool -L conftest$ac_exeext | grep "libXrender\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libXrender\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
|
||||
*) ac_cv_lib_soname_Xrender=`$ac_cv_path_LDD conftest$ac_exeext | grep "libXrender\\.$LIBEXT" | sed -e "s/^.*\(libXrender\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;;
|
||||
esac
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_soname_save_LIBS
|
||||
fi
|
||||
if test "x$ac_cv_lib_soname_Xrender" = "x"; then
|
||||
{ echo "$as_me:$LINENO: result: not found" >&5
|
||||
echo "${ECHO_T}not found" >&6; }
|
||||
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_lib_soname_Xrender" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_soname_Xrender" >&6; }
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SONAME_LIBXRENDER "$ac_cv_lib_soname_Xrender"
|
||||
_ACEOF
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for XRenderSetPictureTransform in -lXrender" >&5
|
||||
echo $ECHO_N "checking for XRenderSetPictureTransform in -lXrender... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_Xrender_XRenderSetPictureTransform+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lXrender $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 XRenderSetPictureTransform ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return XRenderSetPictureTransform ();
|
||||
;
|
||||
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); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext &&
|
||||
$as_test_x conftest$ac_exeext; then
|
||||
ac_cv_lib_Xrender_XRenderSetPictureTransform=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_Xrender_XRenderSetPictureTransform=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetPictureTransform" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetPictureTransform" >&6; }
|
||||
if test $ac_cv_lib_Xrender_XRenderSetPictureTransform = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_XRENDERSETPICTURETRANSFORM 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes" -a "x$ac_cv_lib_soname_Xrender" != "x"
|
||||
then
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
|
@ -9445,79 +9596,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
|
|||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
|
||||
then
|
||||
{ echo "$as_me:$LINENO: checking for XRenderSetPictureTransform in -lXrender" >&5
|
||||
echo $ECHO_N "checking for XRenderSetPictureTransform in -lXrender... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_Xrender_XRenderSetPictureTransform+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lXrender $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 XRenderSetPictureTransform ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return XRenderSetPictureTransform ();
|
||||
;
|
||||
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); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext &&
|
||||
$as_test_x conftest$ac_exeext; then
|
||||
ac_cv_lib_Xrender_XRenderSetPictureTransform=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_Xrender_XRenderSetPictureTransform=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetPictureTransform" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetPictureTransform" >&6; }
|
||||
if test $ac_cv_lib_Xrender_XRenderSetPictureTransform = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_XRENDERSETPICTURETRANSFORM 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test "$ac_cv_header_X11_extensions_Xinerama_h" = "yes"
|
||||
|
@ -15260,84 +15338,6 @@ cat >>confdefs.h <<_ACEOF
|
|||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for -lXrender" >&5
|
||||
echo $ECHO_N "checking for -lXrender... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_soname_Xrender+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_soname_save_LIBS=$LIBS
|
||||
LIBS="-lXrender $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 XRenderQueryExtension ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return XRenderQueryExtension ();
|
||||
;
|
||||
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); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext &&
|
||||
$as_test_x conftest$ac_exeext; then
|
||||
case "$LIBEXT" in
|
||||
dll) ;;
|
||||
dylib) ac_cv_lib_soname_Xrender=`otool -L conftest$ac_exeext | grep "libXrender\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libXrender\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
|
||||
*) ac_cv_lib_soname_Xrender=`$ac_cv_path_LDD conftest$ac_exeext | grep "libXrender\\.$LIBEXT" | sed -e "s/^.*\(libXrender\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'` ;;
|
||||
esac
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_soname_save_LIBS
|
||||
fi
|
||||
if test "x$ac_cv_lib_soname_Xrender" = "x"; then
|
||||
{ echo "$as_me:$LINENO: result: not found" >&5
|
||||
echo "${ECHO_T}not found" >&6; }
|
||||
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_lib_soname_Xrender" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_soname_Xrender" >&6; }
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SONAME_LIBXRENDER "$ac_cv_lib_soname_Xrender"
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for -lXcursor" >&5
|
||||
|
|
23
configure.ac
23
configure.ac
|
@ -534,23 +534,25 @@ then
|
|||
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
|
||||
fi
|
||||
|
||||
dnl *** Check for Transform functions in Xrender
|
||||
if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
|
||||
then
|
||||
WINE_CHECK_SONAME(Xrender,XRenderQueryExtension,
|
||||
[AC_CHECK_LIB(Xrender,XRenderSetPictureTransform,
|
||||
[AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1,
|
||||
[Define if Xrender has the XRenderSetPictureTransform function])],,
|
||||
[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])],,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
|
||||
fi
|
||||
|
||||
dnl *** Check for X RandR extension
|
||||
if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes"
|
||||
if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes" -a "x$ac_cv_lib_soname_Xrender" != "x"
|
||||
then
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrandr.h>]], [[static typeof(XRRSetScreenConfigAndRate) * func;]])],
|
||||
[WINE_CHECK_SONAME(Xrandr,XRRQueryExtension,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])])
|
||||
fi
|
||||
|
||||
dnl *** Check for Transform functions in Xrender
|
||||
if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
|
||||
then
|
||||
AC_CHECK_LIB(Xrender, XRenderSetPictureTransform,
|
||||
[AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1,
|
||||
[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
|
||||
|
@ -1147,7 +1149,6 @@ WINE_CHECK_SONAME(X11,XCreateWindow,,,[$X_LIBS $X_EXTRA_LIBS])
|
|||
WINE_CHECK_SONAME(Xext,XextCreateExtension,,,[$X_LIBS -lX11 $X_EXTRA_LIBS])
|
||||
WINE_CHECK_SONAME(Xi,XOpenDevice,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
WINE_CHECK_SONAME(Xinerama,XineramaQueryScreens,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
WINE_CHECK_SONAME(Xrender,XRenderQueryExtension,,,[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
WINE_CHECK_SONAME(Xcursor,XcursorImageLoadCursor,,,[$X_LIBS -lX11 $X_EXTRA_LIBS])
|
||||
WINE_CHECK_SONAME(freetype,FT_Init_FreeType,,,[$X_LIBS])
|
||||
WINE_CHECK_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1)
|
||||
|
|
|
@ -49,9 +49,6 @@ static void *xrandr_handle;
|
|||
#ifndef SONAME_LIBXEXT
|
||||
#define SONAME_LIBXEXT "libXext" SONAME_EXT
|
||||
#endif
|
||||
#ifndef SONAME_LIBXRENDER
|
||||
#define SONAME_LIBXRENDER "libXrender" SONAME_EXT
|
||||
#endif
|
||||
|
||||
#define MAKE_FUNCPTR(f) static typeof(f) * p##f;
|
||||
MAKE_FUNCPTR(XRRConfigCurrentConfiguration)
|
||||
|
|
|
@ -41,7 +41,7 @@ int using_client_side_fonts = FALSE;
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(xrender);
|
||||
|
||||
#ifdef HAVE_X11_EXTENSIONS_XRENDER_H
|
||||
#ifdef SONAME_LIBXRENDER
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
|
@ -103,9 +103,6 @@ static int antialias = 1;
|
|||
#ifndef SONAME_LIBXEXT
|
||||
#define SONAME_LIBXEXT "libXext" SONAME_EXT
|
||||
#endif
|
||||
#ifndef SONAME_LIBXRENDER
|
||||
#define SONAME_LIBXRENDER "libXrender" SONAME_EXT
|
||||
#endif
|
||||
|
||||
static void *xrender_handle;
|
||||
|
||||
|
@ -1678,7 +1675,7 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#else /* HAVE_X11_EXTENSIONS_XRENDER_H */
|
||||
#else /* SONAME_LIBXRENDER */
|
||||
|
||||
void X11DRV_XRender_Init(void)
|
||||
{
|
||||
|
@ -1727,4 +1724,4 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#endif /* HAVE_X11_EXTENSIONS_XRENDER_H */
|
||||
#endif /* SONAME_LIBXRENDER */
|
||||
|
|
Loading…
Reference in New Issue