summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Oakley <aoakley@espial.com>2015-01-27 17:18:13 +0000
committerBryce Harrington <bryce@osg.samsung.com>2015-01-28 21:29:10 -0800
commita4afd90f9f0c27ed5f3f313b915c260673f8be34 (patch)
treecf74acf3b688a75dfed37be7b168156688f5b664
parentcd0cf5a106b0578da9706f9eb3ceac3ff07c26ee (diff)
downloadwayland-a4afd90f9f0c27ed5f3f313b915c260673f8be34.tar.gz
configure.ac: use pkg-config to find expat
This is now done in the same way as the libffi dependency and still allows the library to be installed in a non-standard location (with PKG_CONFIG_PATH).
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac11
2 files changed, 2 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am
index 43b741a..0fccf86 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -65,6 +65,7 @@ if ENABLE_SCANNER
wayland_scanner = $(top_builddir)/wayland-scanner
bin_PROGRAMS = wayland-scanner
wayland_scanner_SOURCES = src/scanner.c
+wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(AM_CFLAGS)
wayland_scanner_LDADD = $(EXPAT_LIBS) libwayland-util.la
$(BUILT_SOURCES) : wayland-scanner
pkgconfig_DATA += src/wayland-scanner.pc
diff --git a/configure.ac b/configure.ac
index b0a959a..6c3d611 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,17 +84,8 @@ AC_ARG_WITH(icondir, [ --with-icondir=<dir> Look for cursor icons here],
[ ICONDIR=${datadir}/icons])
AC_SUBST([ICONDIR])
-EXPAT_LIB=""
-AC_ARG_WITH(expat, [ --with-expat=<dir> Use expat from here],
- [ expat=$withval
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib" ] )
if test "x$enable_scanner" = "xyes"; then
- AC_CHECK_HEADERS(expat.h, [AC_DEFINE(HAVE_EXPAT_H)],
- [AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
- AC_CHECK_LIB(expat, XML_ParserCreate, [EXPAT_LIBS="-lexpat"],
- [AC_MSG_ERROR([Can't find expat library. Please install expat.])])
- AC_SUBST(EXPAT_LIBS)
+ PKG_CHECK_MODULES(EXPAT, [expat])
fi
AC_PATH_PROG(XSLTPROC, xsltproc)