summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-11-04 03:15:03 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-11-04 03:15:03 +0000
commitd0a336320946b91cfb0841159e0a3731e5d17087 (patch)
tree1d7d60ed1c61088c6e5a5a318f7f7b9cfc3da387
parent8469c9d29a7b55f5f1e4cd3a46868a2aaf8a2da6 (diff)
downloadxine-lib-d0a336320946b91cfb0841159e0a3731e5d17087.tar.gz
xine-lib-d0a336320946b91cfb0841159e0a3731e5d17087.tar.bz2
Try to make use of Xorg7's pkg-config data, so that the link tests are skipped if present.
This fixes issues when using XCB with FreeBSD, and also makes the configure faster, without need for complex codepaths to tst for features. The old link-based tests are still present as fallback in the case the pkg-config data is not found (because it's an old Xorg or it's a non-Xorg X implementation). CVS patchset: 8355 CVS date: 2006/11/04 03:15:03
-rw-r--r--configure.ac33
1 files changed, 20 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 60855e20b..5010a7d79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -451,7 +451,26 @@ dnl ---------------------------------------------
dnl Checks for X11
dnl ---------------------------------------------
-AC_PATH_XTRA
+if test "x$with_x" != "xno"; then
+ PKG_CHECK_MODULES([X11], [x11], , [
+ AC_PATH_XTRA
+
+ dnl ----------------------------------------------
+ dnl Check for XShm support (required with X)
+ dnl ----------------------------------------------
+
+ if test x"$no_x" != "xyes"; then
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ AC_CHECK_HEADERS([X11/extensions/XShm.h], [],
+ [AC_MSG_ERROR([XShm extension is required])])
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+ ])
+else
+ no_x="yes"
+fi
+
if test x"$no_x" != "xyes"; then
AC_DEFINE(HAVE_X11,1,[Define this if you have X11R6 installed])
fi
@@ -592,18 +611,6 @@ fi
AM_CONDITIONAL(HAVE_V4L, [test x"$have_v4l" = "xyes"])
dnl ----------------------------------------------
-dnl Check for XShm support (required with X)
-dnl ----------------------------------------------
-
-if test x"$no_x" != "xyes"; then
- ac_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $X_CFLAGS"
- AC_CHECK_HEADERS([X11/extensions/XShm.h], [],
- [AC_MSG_ERROR([XShm extension is required])])
- CPPFLAGS="$ac_save_CPPFLAGS"
-fi
-
-dnl ----------------------------------------------
dnl Check for Xv and XvMC support
dnl ----------------------------------------------