Skip to content

Commit

Permalink
autotools: check for expat.h if pkg-config failed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pasis committed Aug 8, 2014
1 parent 46f371b commit d693cc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d693cc6

Please sign in to comment.