--- config/m4/ax_lib_expat.m4.ori 2011-12-08 01:59:42.000000000 +0100 +++ config/m4/ax_lib_expat.m4 2011-12-08 02:00:08.000000000 +0100 @@ -108,7 +108,8 @@ if test -n "$expat_prefix"; then expat_include_dir="$expat_prefix/include" - expat_lib_flags="-L$expat_prefix/lib -lexpat" + expat_lib_flags="-L$expat_prefix/lib" + expat_libs="-lexpat" run_expat_test="yes" elif test "$expat_requested" = "yes"; then if test -n "$expat_include_dir" -a -n "$expat_lib_flags"; then @@ -129,6 +130,8 @@ saved_LDFLAGS="$LDFLAGS" LIBS="$LDFLAGS $expat_lib_flags" + saved_LIBS="$LIBS" + LIBS="$LIBS $expat_libs" dnl dnl Check Expat headers dnl @@ -188,6 +191,7 @@ CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" + LIBS="$saved_LIBS" fi AC_MSG_CHECKING([for Expat XML Parser])