summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2008-05-05 15:16:22 -0700
committerDan Nicholson <dbn.lists@gmail.com>2008-05-05 15:16:22 -0700
commite6a0609f2efff83e58ddd7eb1d2c8e1ac47d9f6d (patch)
tree03ecc1c809aeb543ef79261217882f52aedf2e87
parent00994ac08cb84937ca1e35b7a556d8924229bacb (diff)
autoconf: Allow non-pkg-config builds to succeed
The variable no_x was being set to yes when libX11 was not found through pkg-config. This causes AC_PATH_XTRA to skip its search for the X11 libraries, which was not the intended effect. Also switched to using the PKG_CHECK_EXISTS autoconf macro.
-rw-r--r--configure.ac14
1 files changed, 6 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index fc8c346138..980089364e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -330,20 +330,18 @@ yes)
esac
dnl
-dnl Find out if X is available. The variables have_x or no_x will be
-dnl set and used later in the driver setups
+dnl Find out if X is available. The variable have_x is set if libX11 is
+dnl to mimic AC_PATH_XTRA.
dnl
if test -n "$PKG_CONFIG"; then
AC_MSG_CHECKING([pkg-config files for X11 are available])
- if $PKG_CONFIG --exists x11; then
+ PKG_CHECK_EXISTS([x11],[
x11_pkgconfig=yes
have_x=yes
- AC_MSG_RESULT(yes)
- else
+ ],[
x11_pkgconfig=no
- no_x=yes
- AC_MSG_RESULT(no)
- fi
+ ])
+ AC_MSG_RESULT([$x11_pkgconfig])
else
x11_pkgconfig=no
fi