summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2015-02-03 14:26:58 -0800
committerBryce Harrington <bryce@osg.samsung.com>2015-02-06 15:52:50 -0800
commit371a9e0aefcc2bdef9c044a59d613ce6c175ed73 (patch)
treefd49a71a50ecd5ffaa63450a32bbb6246aa6d618
parent76fe89ed535be7ff20e39d5d2ec3b26cb3fae37e (diff)
downloadwayland-371a9e0aefcc2bdef9c044a59d613ce6c175ed73.tar.gz
configure.ac: Fallback to older detection code if pkg-config can't find expat
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. In addition the source for expat does not seem to be in a git repository but in cvs instead and it seems preferrable to not require cvs to build wayland. The restored test has been updated to use AC_SEARCH_LIBS. This version uses empty square brackets for the unused branches, similar to many other if statements in configure.ac. Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Andrew Oakley <aoakley@espial.com>
-rw-r--r--configure.ac11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 0426b53..5a8e915 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,16 @@ 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, [],
+ [AC_MSG_ERROR([Can't find expat library. Please install expat.])])
+ EXPAT_LIBS="$LIBS"
+ LIBS="$SAVE_LIBS"
+ AC_SUBST(EXPAT_LIBS)
+ ])
fi
AC_PATH_PROG(XSLTPROC, xsltproc)