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:
@@ -31,7 +31,8 @@ if test "x$with_libxml2" != xno; then
|
|||||||
CFLAGS=$old_CFLAGS
|
CFLAGS=$old_CFLAGS
|
||||||
fi
|
fi
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
if test "x$with_libxml2" = xyes; then
|
if test "x$with_libxml2" = xyes; then
|
||||||
|
|||||||
Reference in New Issue
Block a user