Commit 21e91667 authored by Alexandre Julliard's avatar Alexandre Julliard

Load libXrender at run-time with dlopen (based on a patch by Huw

Davies).
parent d15bf1c0
......@@ -6887,83 +6887,13 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
echo "$as_me:$LINENO: checking for XRenderQueryExtension in -lXrender" >&5
echo $ECHO_N "checking for XRenderQueryExtension in -lXrender... $ECHO_C" >&6
if test "${ac_cv_lib_Xrender_XRenderQueryExtension+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
#line $LINENO "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XRenderQueryExtension ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
XRenderQueryExtension ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xrender_XRenderQueryExtension=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Xrender_XRenderQueryExtension=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderQueryExtension" >&6
if test $ac_cv_lib_Xrender_XRenderQueryExtension = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBXRENDER 1
_ACEOF
X_PRE_LIBS="$X_PRE_LIBS -lXrender"
fi
else
{ echo "$as_me:$LINENO: WARNING: XRender extension not found, Wine will be built without it" >&5
echo "$as_me: WARNING: XRender extension not found, Wine will be built without it" >&2;}
fi
done
fi
done
......
......@@ -225,19 +225,8 @@ then
AC_MSG_WARN([[XVideo extension not found, Wine will be built without it]]),
[#include <X11/Xlib.h>])
dnl *** Check for XRender extension
AC_CHECK_HEADERS(X11/extensions/Xrender.h,
[ dnl *** If X11/extensions/Xrender.h exists...
AC_CHECK_LIB(Xrender, XRenderQueryExtension,
[ AC_DEFINE(HAVE_LIBXRENDER, 1, [Define if you have the XRender extension library])
X_PRE_LIBS="$X_PRE_LIBS -lXrender"
],,
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS
)
],
AC_MSG_WARN([[XRender extension not found, Wine will be built without it]]),
[#include <X11/Xlib.h>])
dnl *** Check for XRender include file
AC_CHECK_HEADERS(X11/extensions/Xrender.h,,,[#include <X11/Xlib.h>])
]
) dnl *** End of X11/Xlib.h check
......
......@@ -218,9 +218,6 @@
/* Define to 1 if you have the `xpg4' library (-lxpg4). */
#undef HAVE_LIBXPG4
/* Define if you have the XRender extension library */
#undef HAVE_LIBXRENDER
/* Define if you have the X Shape extension */
#undef HAVE_LIBXSHAPE
......
/*
* Thread safe wrappers around Xrender calls.
* Always include this file instead of <X11/Xrender.h>.
* This file was generated automatically by tools/make_X11wrappers
* DO NOT EDIT!
*/
#ifndef __WINE_TS_XRENDER_H
#define __WINE_TS_XRENDER_H
#ifndef __WINE_CONFIG_H
# error You must include config.h to use this header
#endif
#ifdef HAVE_LIBXRENDER
#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>
extern void (*wine_tsx11_lock)(void);
extern void (*wine_tsx11_unlock)(void);
extern void TSXRenderAddGlyphs(Display*,GlyphSet,Glyph*,XGlyphInfo*,int,char*,int);
extern void TSXRenderCompositeString8(Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,char*,int);
extern void TSXRenderCompositeString16(Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,unsigned short*,int);
extern void TSXRenderCompositeString32(Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,unsigned int*,int);
extern GlyphSet TSXRenderCreateGlyphSet(Display*,XRenderPictFormat*);
extern Picture TSXRenderCreatePicture(Display*,Drawable,XRenderPictFormat*,unsigned long,XRenderPictureAttributes*);
extern void TSXRenderFillRectangle(Display*,int,Picture,XRenderColor*,int,int,unsigned int, unsigned int);
extern XRenderPictFormat* TSXRenderFindFormat(Display*,unsigned long,XRenderPictFormat*,int);
extern XRenderPictFormat* TSXRenderFindVisualFormat(Display*,Visual*);
extern void TSXRenderFreeGlyphSet(Display*,GlyphSet);
extern void TSXRenderFreePicture(Display*,Picture);
extern void TSXRenderSetPictureClipRectangles(Display*,Picture,int,int,XRectangle*,int);
extern Bool TSXRenderQueryExtension(Display*,int*,int*);
#endif /* defined(HAVE_LIBXRENDER) */
#endif /* __WINE_TS_XRENDER_H */
......@@ -30,7 +30,7 @@
$X11_include_dir = "/usr/X11/include";
$outdir = "tsx11";
$wantfile = "$outdir/X11_calls";
@dolist = ("Xlib", "Xresource", "Xutil", "XShm", "xf86dga", "xf86dga2", "xf86vmode", "shape", "xvideo", "Xrender");
@dolist = ("Xlib", "Xresource", "Xutil", "XShm", "xf86dga", "xf86dga2", "xf86vmode", "shape", "xvideo");
# First read list of wanted function names.
......@@ -102,12 +102,6 @@ foreach $name (@dolist) {
$post_file = "#endif /* defined(HAVE_XVIDEO) */\n";
$inc_name = "Xvlib";
}
if($name eq "Xrender") {
$x11_incl = "#include <X11/Xlib.h>\n";
$extensions_dir = "extensions/";
$pre_file = "#ifdef HAVE_LIBXRENDER\n";
$post_file = "#endif /* defined(HAVE_LIBXRENDER) */\n";
}
print OUTH <<END;
......@@ -338,72 +332,6 @@ output_fn_short("XvImage *", "XvShmCreateImage", "Display*", "XvPortID", "int",
"Display*a0,int a1,int a2,int a3",
"a0,a1,a2,a3"
);
} elsif($name eq "Xrender") {
output_fn("XRenderAddGlyphs","void",
"Display*,GlyphSet,Glyph*,XGlyphInfo*,int,char*,int",
"Display*a0,GlyphSet a1,Glyph*a2,XGlyphInfo*a3,int a4,char*a5,int a6",
"a0,a1,a2,a3,a4,a5,a6"
);
output_fn("XRenderCompositeString8","void",
"Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,char*,int",
"Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,char*a10,int a11",
"a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11"
);
output_fn("XRenderCompositeString16","void",
"Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,unsigned short*,int",
"Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,unsigned short*a10,int a11",
"a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11"
);
output_fn("XRenderCompositeString32","void",
"Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,unsigned int*,int",
"Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,unsigned int*a10,int a11",
"a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11"
);
output_fn("XRenderCreateGlyphSet",GlyphSet,
"Display*,XRenderPictFormat*",
"Display*a0,XRenderPictFormat*a1",
"a0,a1"
);
output_fn("XRenderCreatePicture",Picture,
"Display*,Drawable,XRenderPictFormat*,unsigned long,XRenderPictureAttributes*",
"Display*a0,Drawable a1,XRenderPictFormat*a2,unsigned long a3,XRenderPictureAttributes*a4",
"a0,a1,a2,a3,a4"
);
output_fn("XRenderFillRectangle","void",
"Display*,int,Picture,XRenderColor*,int,int,unsigned int, unsigned int",
"Display*a0,int a1,Picture a2,XRenderColor*a3,int a4,int a5,unsigned int a6,unsigned int a7",
"a0,a1,a2,a3,a4,a5,a6,a7"
);
output_fn("XRenderFindFormat","XRenderPictFormat*",
"Display*,unsigned long,XRenderPictFormat*,int",
"Display*a0,unsigned long a1,XRenderPictFormat*a2,int a3",
"a0,a1,a2,a3"
);
output_fn("XRenderFindVisualFormat","XRenderPictFormat*",
"Display*,Visual*",
"Display*a0,Visual*a1",
"a0,a1"
);
output_fn("XRenderFreeGlyphSet","void",
"Display*,GlyphSet",
"Display*a0,GlyphSet a1",
"a0,a1"
);
output_fn("XRenderFreePicture","void",
"Display*,Picture",
"Display*a0,Picture a1",
"a0,a1"
);
output_fn("XRenderSetPictureClipRectangles","void",
"Display*,Picture,int,int,XRectangle*,int",
"Display*a0,Picture a1,int a2,int a3,XRectangle* a4,int a5",
"a0,a1,a2,a3,a4,a5"
);
output_fn("XRenderQueryExtension",Bool,
"Display*,int*,int*",
"Display*a0,int*a1,int*a2",
"a0,a1,a2"
);
} else {
open(IN,
......
......@@ -16,7 +16,6 @@ C_SRCS = \
ts_xf86vmode.c \
ts_xshm.c \
ts_xlib.c \
ts_xrender.c \
ts_xresource.c \
ts_xvideo.c \
ts_xutil.c \
......
......@@ -250,16 +250,3 @@ XvCreateImage
XvPutImage
XvShmPutImage
XvShmCreateImage
XRenderAddGlyphs
XRenderCompositeString16
XRenderCompositeString32
XRenderCompositeString8
XRenderCreateGlyphSet
XRenderCreatePicture
XRenderFillRectangle
XRenderFindFormat
XRenderFindVisualFormat
XRenderFreeGlyphSet
XRenderFreePicture
XRenderQueryExtension
XRenderSetPictureClipRectangles
/*
* Thread safe wrappers around Xrender calls.
* This file was generated automatically by tools/make_X11wrappers
* DO NOT EDIT!
*/
#include "config.h"
#ifdef HAVE_LIBXRENDER
#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>
#include "ts_xrender.h"
void TSXRenderAddGlyphs(Display*a0,GlyphSet a1,Glyph*a2,XGlyphInfo*a3,int a4,char*a5,int a6)
{
wine_tsx11_lock();
XRenderAddGlyphs(a0,a1,a2,a3,a4,a5,a6);
wine_tsx11_unlock();
}
void TSXRenderCompositeString8(Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,char*a10,int a11)
{
wine_tsx11_lock();
XRenderCompositeString8(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
wine_tsx11_unlock();
}
void TSXRenderCompositeString16(Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,unsigned short*a10,int a11)
{
wine_tsx11_lock();
XRenderCompositeString16(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
wine_tsx11_unlock();
}
void TSXRenderCompositeString32(Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,unsigned int*a10,int a11)
{
wine_tsx11_lock();
XRenderCompositeString32(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
wine_tsx11_unlock();
}
GlyphSet TSXRenderCreateGlyphSet(Display*a0,XRenderPictFormat*a1)
{
GlyphSet r;
wine_tsx11_lock();
r = XRenderCreateGlyphSet(a0,a1);
wine_tsx11_unlock();
return r;
}
Picture TSXRenderCreatePicture(Display*a0,Drawable a1,XRenderPictFormat*a2,unsigned long a3,XRenderPictureAttributes*a4)
{
Picture r;
wine_tsx11_lock();
r = XRenderCreatePicture(a0,a1,a2,a3,a4);
wine_tsx11_unlock();
return r;
}
void TSXRenderFillRectangle(Display*a0,int a1,Picture a2,XRenderColor*a3,int a4,int a5,unsigned int a6,unsigned int a7)
{
wine_tsx11_lock();
XRenderFillRectangle(a0,a1,a2,a3,a4,a5,a6,a7);
wine_tsx11_unlock();
}
XRenderPictFormat* TSXRenderFindFormat(Display*a0,unsigned long a1,XRenderPictFormat*a2,int a3)
{
XRenderPictFormat* r;
wine_tsx11_lock();
r = XRenderFindFormat(a0,a1,a2,a3);
wine_tsx11_unlock();
return r;
}
XRenderPictFormat* TSXRenderFindVisualFormat(Display*a0,Visual*a1)
{
XRenderPictFormat* r;
wine_tsx11_lock();
r = XRenderFindVisualFormat(a0,a1);
wine_tsx11_unlock();
return r;
}
void TSXRenderFreeGlyphSet(Display*a0,GlyphSet a1)
{
wine_tsx11_lock();
XRenderFreeGlyphSet(a0,a1);
wine_tsx11_unlock();
}
void TSXRenderFreePicture(Display*a0,Picture a1)
{
wine_tsx11_lock();
XRenderFreePicture(a0,a1);
wine_tsx11_unlock();
}
void TSXRenderSetPictureClipRectangles(Display*a0,Picture a1,int a2,int a3,XRectangle* a4,int a5)
{
wine_tsx11_lock();
XRenderSetPictureClipRectangles(a0,a1,a2,a3,a4,a5);
wine_tsx11_unlock();
}
Bool TSXRenderQueryExtension(Display*a0,int*a1,int*a2)
{
Bool r;
wine_tsx11_lock();
r = XRenderQueryExtension(a0,a1,a2);
wine_tsx11_unlock();
return r;
}
#endif /* defined(HAVE_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