From 21ce0f2bab1743ed15474ba1468286d6782bf781 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 14 Feb 2006 16:33:38 +0000 Subject: Split detection of Xrender and Xft. Add detection of MIT-SHM. Clean up CFLAGS in Makefile.am --- ChangeLog | 9 +++++++++ Makefile.am | 4 ++-- configure.ac | 40 ++++++++++++++++++++++++++++++++++------ x11perf.h | 2 +- 4 files changed, 46 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2121a4c..30e9130 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-02-14 Keith Packard + + * Makefile.am: + * configure.ac: + * x11perf.h: + Split detection of Xrender and Xft. + Add detection of MIT-SHM. + Clean up CFLAGS in Makefile.am + 2006-02-13 Eric Anholt * configure.ac: diff --git a/Makefile.am b/Makefile.am index 921816a..d635909 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,8 +28,8 @@ LIBPATH = $(libdir)/X11/x11perfcomp x11perfcompdir = $(LIBPATH) dist_x11perfcomp_SCRIPTS = fillblnk perfboth perfratio Xmark -x11perf_CFLAGS = $(X11PERF_CFLAGS) -x11perf_LDADD = $(X11PERF_LIBS) -lm +AM_CFLAGS = $(XEXT_CFLAGS) $(XFT_CFLAGS) $(XRENDER_CFLAGS) $(X11PERF_CFLAGS) +x11perf_LDADD = $(XEXT_LIBS) $(XFT_LIBS) $(XRENDER_LIBS) $(X11PERF_LIBS) -lm x11perf_SOURCES = \ bitmaps.c \ diff --git a/configure.ac b/configure.ac index a6c2b97..d6b1a16 100644 --- a/configure.ac +++ b/configure.ac @@ -42,12 +42,40 @@ AC_TYPE_SIGNAL PKG_CHECK_MODULES(X11PERF, x11 xmuu) AC_SUBST(X11PERF_CFLAGS) AC_SUBST(X11PERF_LIBS) -PKG_CHECK_MODULES(XRENDER, xrender xft, have_xrender=yes, have_xrender=no) -if test "x$have_xrender" = "xyes"; then - AC_DEFINE(XRENDER, 1, [Define to 1 if you have xrender and xft]) - X11PERF_CFLAGS="$X11PERF_CFLAGS $XRENDER_CFLAGS" - X11PERF_LIBS="$X11PERF_LIBS $XRENDER_LIBS" -fi + +# Check for Xrender library +PKG_CHECK_MODULES(XRENDER, xrender, [xrender_found=yes], [xrender_found=no]) +AC_SUBST(XRENDER_CFLAGS) +AC_SUBST(XRENDER_LIBS) +case "$xrender_found" in +yes) + AC_DEFINE(XRENDER,1,[Xrender library available]) + ;; +esac + +# Check for Xft library +PKG_CHECK_MODULES(XFT, xft, [xft_found=yes], [xft_found=no]) +AC_SUBST(XFT_CFLAGS) +AC_SUBST(XFT_LIBS) +case "$xft_found" in +yes) + AC_DEFINE(XFT,1,[Xft library available]) + ;; +esac + +# Check for MIT-SHM extension +PKG_CHECK_MODULES(XEXT, xext, [xext_found=yes], [xext_found=no]) +AC_SUBST(XEXT_CFLAGS) +AC_SUBST(XEXT_LIBS) +case "$xext_found" in +yes) + save_LIBS="$LIBS" + LIBS="$XEXT_LIBS $LIBS" + AC_CHECK_FUNCS([XShmQueryExtension], + AC_DEFINE(MITSHM, 1, [MIT-SHM extension available])) + LIBS="$save_LIBS" + ;; +esac XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION diff --git a/x11perf.h b/x11perf.h index a2fa075..da98463 100644 --- a/x11perf.h +++ b/x11perf.h @@ -23,7 +23,7 @@ SOFTWARE. ******************************************************************************/ /* $XFree86: xc/programs/x11perf/x11perf.h,v 3.4 2001/07/25 15:05:16 dawes Exp $ */ -#ifdef HAVE_CONFIG_H +#if HAVE_CONFIG_H #include "config.h" #endif -- cgit v1.2.3