Updated version to 2.8.23
[asdcplib.git] / m4 / ax_lib_expat.m4
index 6df68a78c015f7e55b4b3def2889022a2c466fa9..1fcb0d248236d7bafe13dfe105146b70f065c211 100644 (file)
@@ -70,14 +70,17 @@ AC_DEFUN([AX_LIB_EXPAT],
         fi
         ],
         [
-        dnl Default behavior is implicit yes
-        if test -f /usr/local/include/expat.h ; then
-            expat_prefix=/usr/local
-        elif test -f /usr/include/expat.h ; then
-            expat_prefix=/usr
-        else
-            expat_prefix=""
-        fi
+#        dnl Default behavior is implicit yes
+#        if test -f /usr/local/include/expat.h ; then
+#            expat_prefix=/usr/local
+#        elif test -f /usr/include/expat.h ; then
+#            expat_prefix=/usr
+#        else
+#            expat_prefix=""
+#        fi
+        dnl Default behavior is implicit no
+        expat_prefix=""
+        expat_requested="no"
         ]
     )
 
@@ -107,7 +110,7 @@ AC_DEFUN([AX_LIB_EXPAT],
 
     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/lib64 -L$expat_prefix/lib -lexpat"
         run_expat_test="yes"
     elif test "$expat_requested" = "yes"; then
         if test -n "$expat_include_dir" -a -n "$expat_lib_flags"; then
@@ -271,4 +274,8 @@ p = NULL;
             AC_MSG_WARN([Expat XML Parser support requested but headers or library not found. Specify valid prefix of Expat using --with-expat=@<:@DIR@:>@ or provide include directory and linker flags using --with-expat-inc and --with-expat-lib])
         fi
     fi
+    if test "$HAVE_EXPAT" = "yes"; then
+        CPPFLAGS="$CPPFLAGS $EXPAT_CFLAGS -DHAVE_EXPAT=1"
+        LDFLAGS="$LDFLAGS $EXPAT_LDFLAGS"
+    fi
 ])