This paritally reverts commit a4afd90f9f0c27ed5f3f313b915c260673f8be34.

On older expat versions (ie the one on Ubuntu 12.04) there is no pkg-config
file, so fall back to a test for the header and library.

The restored test has been updated to use AC_SEARCH_LIBS.
---
 configure.ac |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 0426b53..402de84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,14 @@ AC_ARG_WITH(icondir, [  --with-icondir=<dir>    Look for 
cursor icons here],
 AC_SUBST([ICONDIR])
 
 if test "x$enable_scanner" = "xyes"; then
-       PKG_CHECK_MODULES(EXPAT, [expat])
+       PKG_CHECK_MODULES(EXPAT, [expat],,
+               [AC_CHECK_HEADERS(expat.h,,
+                       [AC_MSG_ERROR([Can't find expat.h. Please install 
expat.])])
+               SAVE_LIBS="$LIBS"
+               AC_SEARCH_LIBS(XML_ParserCreate, expat, [EXPAT_LIBS="$LIBS"],
+                       [AC_MSG_ERROR([Can't find expat library. Please install 
expat.])])
+               LIBS="$SAVE_LIBS"
+               ])
 fi
 
 AC_PATH_PROG(XSLTPROC, xsltproc)
-- 
1.7.9.5

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to