autotools: check for expat.h if pkg-config failed

Some distros provides libexpat without expat.pc. So PKG_CHECK_MODULES
fails even if libexpat is installed. To fix this AC_CHECK_HEADER added
back.
This commit is contained in:
Dmitry Podgorny
2014-08-08 19:49:46 +03:00
parent 46f371b311
commit d693cc6d15

View File

@@ -31,7 +31,8 @@ if test "x$with_libxml2" != xno; then
CFLAGS=$old_CFLAGS
fi
else
PKG_CHECK_MODULES([expat], [expat >= 2.0.0], [], [AC_MSG_ERROR([expat not found; expat required.])])
PKG_CHECK_MODULES([expat], [expat >= 2.0.0], [],
[AC_CHECK_HEADER(expat.h, [expat_LIBS="-lexpat"], [AC_MSG_ERROR([expat not found; expat required.])])])
fi
if test "x$with_libxml2" = xyes; then