httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1196955 - /httpd/httpd/trunk/modules/filters/config.m4
Date Thu, 03 Nov 2011 06:19:01 GMT
Author: sf
Date: Thu Nov  3 06:19:01 2011
New Revision: 1196955

URL: http://svn.apache.org/viewvc?rev=1196955&view=rev
Log:
Improve detection of libxml2

Modified:
    httpd/httpd/trunk/modules/filters/config.m4

Modified: httpd/httpd/trunk/modules/filters/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/config.m4?rev=1196955&r1=1196954&r2=1196955&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/config.m4 (original)
+++ httpd/httpd/trunk/modules/filters/config.m4 Thu Nov  3 06:19:01 2011
@@ -90,28 +90,46 @@ APACHE_MODULE(deflate, Deflate transfer 
 ])
 
 AC_DEFUN(FIND_LIBXML2, [
-  AC_ARG_WITH(libxml2, 
-    [APACHE_HELP_STRING(--with-libxml2,location for libxml2)],
-    [test_paths="${with_libxml2}"],
-    [test_paths="/usr/include/libxml2 /usr/local/include/libxml2 /usr/include /usr/local/include"]
-  )
-  AC_MSG_CHECKING(Checking for libxml2)
-  xml2_path=""
-  for x in ${test_paths}; do
-      if test -e "${x}/libxml/parser.h"; then
-        xml2_path="${x}"
-        break
-      fi
-  done
-  if test -n ${xml2_path}; then
-    APR_ADDTO(CFLAGS, [-I${xml2_path}])
+  AC_CACHE_CHECK([for libxml2], [ac_cv_libxml2], [
+    AC_ARG_WITH(libxml2,
+      [APACHE_HELP_STRING(--with-libxml2,location for libxml2)],
+      [test_paths="${with_libxml2}"],
+      [test_paths="/usr/include/libxml2 /usr/local/include/libxml2 /usr/include /usr/local/include"]
+    )
+    AC_MSG_CHECKING(for libxml2)
+    xml2_path=""
+    for x in ${test_paths}; do
+        if test -e "${x}/libxml/parser.h"; then
+          xml2_path="${x}"
+          break
+        fi
+    done
+    if test -n "${xml2_path}" ; then
+      ac_cv_libxml2=yes
+      XML2_INCLUDES="${xml2_path}"
+    else
+      ac_cv_libxml2=no
+    fi
+  ])
+])
+
+APACHE_MODULE(xml2enc, i18n support for markup filters, , , , [
+  FIND_LIBXML2
+  if test "$ac_cv_libxml2" = "yes" ; then
+    APR_ADDTO(CFLAGS, [-I${XML2_INCLUDES}])
   else
-    AC_MSG_ERROR([libxml2 headers not found!])
+    enable_xml2enc=no
   fi
 ])
-
-APACHE_MODULE(xml2enc, i18n support for markup filters, , , , FIND_LIBXML2)
-APACHE_MODULE(proxy_html, Fix HTML Links in a Reverse Proxy, , , , FIND_LIBXML2)
+APACHE_MODULE(proxy_html, Fix HTML Links in a Reverse Proxy, , , , [
+  FIND_LIBXML2
+  if test "$ac_cv_libxml2" = "yes" ; then
+    APR_ADDTO(CFLAGS, [-I${XML2_INCLUDES}])
+  else
+    enable_proxy_html=no
+  fi
+]
+)
 
 APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
 



Mime
View raw message