revert jeff's last commit since it breaks the build
[moon.git] / m4 / expat.m4
blob455ece420c62f0e723457276df4192f7255879f5
1 AC_DEFUN([MOONLIGHT_CHECK_EXPAT],
3         AC_CHECK_HEADER(expat.h)
5         AC_MSG_CHECKING(for libexpat)
6         
7         LDFLAGS_save="$LDFLAGS"
8         LIBS_save="$LIBS"
9         
10         LDFLAGS="$LDFLAGS -lexpat"
11         LIBS="$LIBS -lexpat"
13         AC_TRY_LINK_FUNC(XML_ParserCreateNS, have_expat_libs="yes", have_expat_libs="no")
14         
15         LDFLAGS="$LDFLAGS_save"
16         LIBS="$LIBS_save"
18         if test "$have_expat_libs" = "no"; then
19                 AC_MSG_RESULT([no])
20                 AC_MSG_ERROR([Failed to find suitable libexpat libraries. Please make sure that libexpat-2.0.x is installed.])
21         else
22                 AC_MSG_RESULT([yes])
23                 EXPAT_LIBS="-lexpat"
24         fi