From e6a0609f2efff83e58ddd7eb1d2c8e1ac47d9f6d Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 5 May 2008 15:16:22 -0700 Subject: 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. --- configure.ac | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'configure.ac') 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 -- cgit v1.2.3