[PATCH 1/1] configure.ac: use pkg-config to find expat
sardemff7+wayland at sardemff7.net
sardemff7+wayland at sardemff7.net
Tue Jan 27 08:32:33 PST 2015
Once the two things below are fixed:
Reviewed-by: Quentin Glidic <sardemff7+wayland at sardemff7.net>
On 2015-01-26 15:32, Andrew Oakley wrote:
> 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).
>
> We also now enable the normal GCC options when building the scanner.
They were used. AM_CFLAGS is appended for any target which doesn’t have
a _CFLAGS variable. So this part of the commit message should be removed.
> ---
> Makefile.am | 1 +
> configure.ac | 11 +----------
> 2 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 1551762..a2c2d79 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) $(GCC_CFLAGS)
Use $(AM_CFLAGS) (which contains $(GCC_CFLAGS)) as defining a _CFLAGS
variable will opt it out.
> 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 0249002..b518ce1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -71,17 +71,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)
>
--
Quentin “Sardem FF7” Glidic
More information about the wayland-devel
mailing list