Fix build with render but without composite.

SVN revision: 41859
This commit is contained in:
Kim Woelders 2009-08-18 17:27:08 +00:00
parent 2b75b624de
commit 53e593fd6e
6 changed files with 24 additions and 12 deletions

View File

@ -253,20 +253,33 @@ if test "x$enable_xrandr" = "xyes"; then
AC_CHECK_HEADERS(X11/extensions/Xrandr.h,,,[#include <X11/Xlib.h>])
fi
AC_ARG_ENABLE(xrender,
[ --enable-render compile with Render support @<:@default=yes@:>@],,
enable_xrender=yes)
if test "x$enable_xrender" = "xyes"; then
AC_CHECK_LIB(Xrender, XRenderQueryExtension,
AC_DEFINE(USE_XRENDER, 1, [Render support])
E_X_LIBS="-lXrender $E_X_LIBS",
enable_xrender=no
AC_MSG_WARN([Render support was requested but not found]),
-lX11)
AC_CHECK_HEADERS(X11/extensions/Xrender.h,,,[#include <X11/Xlib.h>])
fi
# FIXME - Do this properly
AC_ARG_ENABLE(composite,
[ --enable-composite compile with Composite support @<:@default=yes@:>@],,
enable_composite=yes)
if test "x$enable_xrender" != "xyes"; then enable_composite=no; fi
if test "x$enable_composite" = "xyes"; then
AC_CHECK_LIB(Xcomposite, XCompositeQueryExtension,
AC_DEFINE(USE_COMPOSITE, 1, [Composite support])
E_X_LIBS="-lXcomposite -lXdamage -lXfixes -lXrender $E_X_LIBS",
E_X_LIBS="-lXcomposite -lXdamage -lXfixes $E_X_LIBS",
enable_composite=no,
-lXext -lX11)
AC_CHECK_HEADERS(X11/extensions/Xcomposite.h ,, enable_composite=no, [#include <X11/Xlib.h>])
AC_CHECK_HEADERS(X11/extensions/Xdamage.h ,, enable_composite=no, [#include <X11/Xlib.h>])
AC_CHECK_HEADERS(X11/extensions/Xfixes.h ,, enable_composite=no, [#include <X11/Xlib.h>])
AC_CHECK_HEADERS(X11/extensions/Xrender.h ,, enable_composite=no, [#include <X11/Xlib.h>])
if test "x$enable_composite" != "xyes"; then
AC_MSG_WARN([Composite support was requested but required component was not found])
fi
@ -408,6 +421,7 @@ echo " Pango ........................ $enable_pango"
echo " Xft .......................... $enable_xft"
echo " Xinerama ..................... $enable_xinerama"
echo " RandR ........................ $enable_xrandr"
echo " Render ....................... $enable_xrender"
echo " Sync ......................... $enable_xsync"
echo " Composite .................... $enable_composite"
echo " Modules ...................... $enable_modules"

View File

@ -28,7 +28,7 @@
#include "emodule.h"
#include "xwin.h"
#include <X11/cursorfont.h>
#if HAVE_X11_EXTENSIONS_XRENDER_H
#if USE_XRENDER
#include <X11/extensions/Xrender.h>
#endif
@ -48,7 +48,7 @@ ECreatePixmapCursor(Pixmap cpmap, Pixmap cmask, unsigned int w, unsigned int h,
{
Cursor curs;
#if HAVE_X11_EXTENSIONS_XRENDER_H
#if USE_XRENDER
/* Assuming we have XRenderCreateCursor (render >= 0.5) */
Pixmap pmap;
XGCValues gcv;

View File

@ -24,7 +24,7 @@
#include "eimage.h"
#include "xwin.h"
#include <Imlib2.h>
#if HAVE_X11_EXTENSIONS_XRENDER_H
#if USE_XRENDER
#include <X11/extensions/Xrender.h>
#endif
@ -485,7 +485,7 @@ ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst,
int sx, int sy, int sw, int sh,
int dx, int dy, int dw, int dh, int flags)
{
#if HAVE_X11_EXTENSIONS_XRENDER_H
#if USE_XRENDER
if (Conf.testing.use_render_for_scaling)
{
XRenderPictFormat *pictfmt;

View File

@ -27,7 +27,7 @@
#include "xwin.h"
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
#if HAVE_X11_EXTENSIONS_XRENDER_H
#if USE_XRENDER
#include <X11/extensions/Xrender.h>
#endif
@ -38,7 +38,7 @@ typedef struct {
char argb;
} EiwData;
#if HAVE_X11_EXTENSIONS_XRENDER_H
#if USE_XRENDER
#include <Imlib2.h>
static void

View File

@ -35,7 +35,7 @@
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#include <X11/extensions/shape.h>
#if USE_COMPOSITE
#if USE_XRENDER
#include <X11/extensions/Xrender.h>
#endif
#if USE_GLX
@ -1860,7 +1860,7 @@ ESync(unsigned int mask)
* Visuals
*/
#if USE_COMPOSITE
#if USE_XRENDER
Visual *
EVisualFindARGB(void)

View File

@ -72,10 +72,8 @@ void EFlush(void);
#define ESYNC_STARTUP 0x0100
void ESync(unsigned int mask);
#if USE_COMPOSITE
int EVisualIsARGB(Visual * vis);
Visual *EVisualFindARGB(void);
#endif
Time EGetTimestamp(void);