mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
configure: rework detection of Xrender
This commit is contained in:
parent
1f5ec7f034
commit
894ad07e10
1 changed files with 16 additions and 35 deletions
|
@ -266,6 +266,12 @@ AC_ARG_ENABLE([docs],
|
|||
)
|
||||
AM_CONDITIONAL([BUILD_DOCS], [test -z "$disable_docs"])
|
||||
|
||||
dnl Xrender usage
|
||||
AC_ARG_ENABLE([xrender],
|
||||
AS_HELP_STRING([--disable-xrender], [Disable use of the Xrender extension (default=auto)]),
|
||||
[disable_xrender="yes"], [disable_xrender=""]
|
||||
)
|
||||
|
||||
dnl hmmm...
|
||||
RM="rm -f"
|
||||
AC_SUBST(RM)
|
||||
|
@ -428,6 +434,10 @@ AC_CHECK_PROGS(TIC, tic, :)
|
|||
dnl headers
|
||||
AC_CHECK_HEADERS([locale.h security/pam_appl.h utempter.h])
|
||||
|
||||
dnl Xrender header
|
||||
AC_CHECK_HEADERS([X11/extensions/Xrender.h], [],
|
||||
[ disable_xrender="yes"], [#include <X11/Xlib.h>])
|
||||
|
||||
dnl libraries
|
||||
AC_CHECK_LIB(m, cosf)
|
||||
AC_CHECK_LIB(crypt, crypt)
|
||||
|
@ -436,41 +446,6 @@ AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
|
|||
[SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DUSE_XINERAMA"],
|
||||
[AC_MSG_ERROR([libXinerama not found])], $X_LIBS)
|
||||
|
||||
############################################################################
|
||||
# Check if support for the XRENDER extension was requested and available.
|
||||
############################################################################
|
||||
AC_ARG_ENABLE(xrender,
|
||||
AC_HELP_STRING([--disable-xrender], [disable XRender]) )
|
||||
if test "$enable_xrender" != "no"; then
|
||||
|
||||
# if test "$use_pkgconfig_xrender" = "yes" ; then
|
||||
# XRENDER_CFLAGS=`$PKGCONFIG --cflags xrender`
|
||||
# XRENDER_LDFLAGS=`$PKGCONFIG --libs xrender`
|
||||
# else
|
||||
XRENDER_LDFLAGS="-lXrender"
|
||||
# fi
|
||||
|
||||
AC_CHECK_HEADERS([X11/extensions/Xrender.h], [],
|
||||
[
|
||||
enable_xrender="no";
|
||||
AC_MSG_WARN([unable to use X11/extensions/Xrender.h])
|
||||
], [
|
||||
#include <X11/Xlib.h>
|
||||
])
|
||||
|
||||
fi
|
||||
if test "$enable_xrender" != "no" ; then
|
||||
AC_CHECK_LIB(Xrender, XRenderComposite,
|
||||
[ LDFLAGS="$LDFLAGS $XRENDER_LDFLAGS"
|
||||
CFLAGS="$CFLAGS $XRENDER_CFLAGS"
|
||||
SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DUSE_XRENDER"
|
||||
enable_xrender="yes"
|
||||
AC_DEFINE(USE_XRENDER, 1, [Define to enable the XRender extension]) ],
|
||||
[ enable_xrender="no"
|
||||
AC_MSG_WARN([unable to use the XRender extension]) ],
|
||||
[ $XRENDER_LDFLAGS ])
|
||||
fi
|
||||
|
||||
dnl Special check for tirpc...
|
||||
AC_CHECK_LIB(tirpc, svc_register,
|
||||
[CFLAGS="${CFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
|
||||
|
@ -512,6 +487,12 @@ AC_CHECK_LIB(X11, XOpenDisplay, [XTOOLLIB="-lX11"], ,
|
|||
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||
AC_CHECK_LIB(Xext, XextFindDisplay, [XTOOLLIB="-lXext ${XTOOLLIB}"], ,
|
||||
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||
if test "x$disable_xrender" != "xyes" ; then
|
||||
AC_CHECK_LIB(Xrender, XRenderComposite,
|
||||
[XTOOLLIB="-lXrender ${XTOOLLIB}";
|
||||
SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DUSE_XRENDER"], ,
|
||||
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||
fi
|
||||
AC_CHECK_LIB(Xau, XauReadAuth, [XTOOLLIB="-lXau ${XTOOLLIB}"], ,
|
||||
[${EXTRA_INCS} ${EXTRA_LIBS}])
|
||||
AC_CHECK_LIB(Xpm, XpmLibraryVersion, [XTOOLLIB="-lXpm ${XTOOLLIB}"], ,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue