Commit 629639ee authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Merge the libXrender existence check with the soname check.

parent af928ecb
...@@ -534,21 +534,23 @@ then ...@@ -534,21 +534,23 @@ then
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS) $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
fi fi
dnl *** Check for X RandR extension
if test "$ac_cv_header_X11_extensions_Xrandr_h" = "yes"
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 dnl *** Check for Transform functions in Xrender
if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes" if test "$ac_cv_header_X11_extensions_Xrender_h" = "yes"
then then
AC_CHECK_LIB(Xrender, XRenderSetPictureTransform, WINE_CHECK_SONAME(Xrender,XRenderQueryExtension,
[AC_CHECK_LIB(Xrender,XRenderSetPictureTransform,
[AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1, [AC_DEFINE(HAVE_XRENDERSETPICTURETRANSFORM, 1,
[Define if Xrender has the XRenderSetPictureTransform function])],, [Define if Xrender has the XRenderSetPictureTransform function])],,
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS) [$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" -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 fi
dnl *** Check for Xinerama extension dnl *** Check for Xinerama extension
...@@ -1147,7 +1149,6 @@ WINE_CHECK_SONAME(X11,XCreateWindow,,,[$X_LIBS $X_EXTRA_LIBS]) ...@@ -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(Xext,XextCreateExtension,,,[$X_LIBS -lX11 $X_EXTRA_LIBS])
WINE_CHECK_SONAME(Xi,XOpenDevice,,,[$X_LIBS -lXext -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(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(Xcursor,XcursorImageLoadCursor,,,[$X_LIBS -lX11 $X_EXTRA_LIBS])
WINE_CHECK_SONAME(freetype,FT_Init_FreeType,,,[$X_LIBS]) WINE_CHECK_SONAME(freetype,FT_Init_FreeType,,,[$X_LIBS])
WINE_CHECK_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1) WINE_CHECK_SONAME(txc_dxtn,fetch_2d_texel_rgba_dxt1)
......
...@@ -49,9 +49,6 @@ static void *xrandr_handle; ...@@ -49,9 +49,6 @@ static void *xrandr_handle;
#ifndef SONAME_LIBXEXT #ifndef SONAME_LIBXEXT
#define SONAME_LIBXEXT "libXext" SONAME_EXT #define SONAME_LIBXEXT "libXext" SONAME_EXT
#endif #endif
#ifndef SONAME_LIBXRENDER
#define SONAME_LIBXRENDER "libXrender" SONAME_EXT
#endif
#define MAKE_FUNCPTR(f) static typeof(f) * p##f; #define MAKE_FUNCPTR(f) static typeof(f) * p##f;
MAKE_FUNCPTR(XRRConfigCurrentConfiguration) MAKE_FUNCPTR(XRRConfigCurrentConfiguration)
......
...@@ -41,7 +41,7 @@ int using_client_side_fonts = FALSE; ...@@ -41,7 +41,7 @@ int using_client_side_fonts = FALSE;
WINE_DEFAULT_DEBUG_CHANNEL(xrender); WINE_DEFAULT_DEBUG_CHANNEL(xrender);
#ifdef HAVE_X11_EXTENSIONS_XRENDER_H #ifdef SONAME_LIBXRENDER
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/extensions/Xrender.h> #include <X11/extensions/Xrender.h>
...@@ -103,9 +103,6 @@ static int antialias = 1; ...@@ -103,9 +103,6 @@ static int antialias = 1;
#ifndef SONAME_LIBXEXT #ifndef SONAME_LIBXEXT
#define SONAME_LIBXEXT "libXext" SONAME_EXT #define SONAME_LIBXEXT "libXext" SONAME_EXT
#endif #endif
#ifndef SONAME_LIBXRENDER
#define SONAME_LIBXRENDER "libXrender" SONAME_EXT
#endif
static void *xrender_handle; static void *xrender_handle;
...@@ -1678,7 +1675,7 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst, ...@@ -1678,7 +1675,7 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst,
return TRUE; return TRUE;
} }
#else /* HAVE_X11_EXTENSIONS_XRENDER_H */ #else /* SONAME_LIBXRENDER */
void X11DRV_XRender_Init(void) void X11DRV_XRender_Init(void)
{ {
...@@ -1727,4 +1724,4 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst, ...@@ -1727,4 +1724,4 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst,
return FALSE; return FALSE;
} }
#endif /* HAVE_X11_EXTENSIONS_XRENDER_H */ #endif /* SONAME_LIBXRENDER */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment