summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2006-08-18 17:17:28 -0400
committerBehdad Esfahbod <behdad@behdad.org>2006-08-18 17:17:28 -0400
commit0e78e7144353703cbd28aae6a67cd9ca261f1d68 (patch)
treea7d05d4ae564fb708effa8ef8a03b7030449ced8 /configure.in
parent0c6c0a9e0b3e8cd1caa25a2ee65b8384840295b3 (diff)
[configure] Check for x11 pkg-config module before using AC_PATH_XTRA
Fixes bug 7491.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
1 files changed, 11 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index ca0a096cd..a691bcc7f 100644
--- a/configure.in
+++ b/configure.in
@@ -94,7 +94,7 @@ dnl cairo_cache_version should be increased every time that the backend
dnl detection stuff changes in a way that removing the config.cache file may be
dnl needed for correct operation.
dnl
-m4_define(cairo_cache_version, 2)
+m4_define(cairo_cache_version, 3)
dnl ===========================================================================
dnl
@@ -220,13 +220,16 @@ CAIRO_LIBS=$CAIRO_NONPKGCONFIG_LIBS
dnl ===========================================================================
CAIRO_BACKEND_ENABLE(xlib, Xlib, xlib, XLIB_SURFACE, auto, [
- AC_PATH_XTRA
- if test "x$no_x" = xyes; then
- use_xlib="no (requires Xlib)"
- else
- xlib_NONPKGCONFIG_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
- xlib_NONPKGCONFIG_CFLAGS=$X_CFLAGS
- fi
+ xlib_REQUIRES="x11"
+ PKG_CHECK_MODULES(xlib, $xlib_REQUIRES, ,
+ [xlib_REQUIRES=""
+ AC_PATH_XTRA
+ if test "x$no_x" = xyes; then
+ use_xlib="no (requires X development libraries)"
+ else
+ xlib_NONPKGCONFIG_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+ xlib_NONPKGCONFIG_CFLAGS=$X_CFLAGS
+ fi])
])
if test "x$use_xlib" = xyes; then