summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Messier <mmessier@grapetv.org>2007-05-12 23:09:25 -0400
committerMatt Messier <mmessier@grapetv.org>2007-05-12 23:09:25 -0400
commitc1481489a453faec6d08a58416edce6ec0cf06da (patch)
tree74be910714e5953d2c5a0cfc179331c8ce39e147
parentcf7fe6007ee6008037e63c8d9fc7ad9af8bc8d23 (diff)
downloadxine-lib-c1481489a453faec6d08a58416edce6ec0cf06da.tar.gz
xine-lib-c1481489a453faec6d08a58416edce6ec0cf06da.tar.bz2
Fix X checks to do AC_PATH_XTRA before PKG_CHECK_MODULES
It seems that even embedded in a shell if-statement, AC_PATH_XTRA still runs before PKG_CHECK_MODULES, even if PKG_CHECK_MODULES comes first. There's something funky going on inside autoconf wrt AC_PATH_XTRA. I know that the intended behavior is to do the PKG_CHECK_MODULES first, but no matter what I do, it never actually works that way. I give up, and so here's the code written to reflect what _actually_ happens in that order that it happens.
-rw-r--r--configure.ac38
1 files changed, 17 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index 78f857581..156b1c741 100644
--- a/configure.ac
+++ b/configure.ac
@@ -833,28 +833,24 @@ dnl --------------------------
dnl checks for system services
dnl --------------------------
-if test x"$with_x" != x"no"; then
- dnl Do a package check first, falling back to autoconf's built in checks if
- dnl no package is found.
- PKG_CHECK_MODULES([X], [x11 xext], [have_x=yes; no_x=no], [
- dnl Even as of 2.61, autoconf is not smart enough to find the X include
- dnl and library paths on Mac OS X, so seed them automatically if they're
- dnl not specified on the configure command-line.
- case "$host_os" in
- darwin*)
- test x"$x_includes" = x"NONE" && x_includes="/usr/X11R6/include"
- test x"$x_libraries" = x"NONE" && x_libraries="/usr/X11R6/lib"
- ;;
- esac
+dnl Even as of 2.61, autoconf is not smart enough to find the X include
+dnl and library paths on Mac OS X, so seed them automatically if they're
+dnl not specified on the configure command-line.
+case "$host_os" in
+ darwin*)
+ test x"$x_includes" = x"NONE" && x_includes="/usr/X11R6/include"
+ test x"$x_libraries" = x"NONE" && x_libraries="/usr/X11R6/lib"
+ ;;
+esac
- dnl Check for Xwindows using the autoconf AC_PATH_XTRA macro, which is an
- dnl extension of AC_PATH_X that sets X_CFLAGS and X_LIBS. It will also set
- dnl X_EXTRA_LIBS and X_PRE_LIBS.
- AC_PATH_XTRA
- if test x"$no_x" != x"yes"; then
- X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
- fi
- ])
+dnl Check for Xwindows using the autoconf AC_PATH_XTRA macro, which is an
+dnl extension of AC_PATH_X that sets X_CFLAGS and X_LIBS. It will also set
+dnl X_EXTRA_LIBS and X_PRE_LIBS.
+AC_PATH_XTRA
+if test x"$no_x" != x"yes"; then
+ X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+elif test x"$have_x" = x"no"; then
+ PKG_CHECK_MODULES([X], [x11 xext], [have_x=yes; no_x=no], [have_x=no; no_x=yes])
fi
dnl Check for XShm support (required for xine X support)