From: Amos Jeffries Date: Mon, 6 Dec 2010 13:04:00 +0000 (-0700) Subject: FreeBSD: search /usr/local/include/libxml2 for libxml2 headers X-Git-Tag: take1~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=94ea9adcef0f4e565bcc75e7a460c80e41a9de16;p=thirdparty%2Fsquid.git FreeBSD: search /usr/local/include/libxml2 for libxml2 headers --- diff --git a/configure.ac b/configure.ac index a3f94cbebf..564b80c8cd 100644 --- a/configure.ac +++ b/configure.ac @@ -826,16 +826,26 @@ AC_ARG_WITH(libxml2, AS_HELP_STRING([--without-libxml2],[Do not use libxml2 for if test "x$squid_opt_use_esi" = "xyes" -a "x$with_libxml2" != "xno" ; then AC_CHECK_LIB([xml2], [main], [XMLLIB="-lxml2"; HAVE_LIBXML2=1]) dnl Find the main header and include path... + ac_cv_libxml2_include='no' AC_CHECK_HEADERS([libxml/parser.h], [], [ + AC_MSG_NOTICE([Testing in /usr/include/libxml2]) SAVED_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS" unset ac_cv_header_libxml_parser_h - AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include=yes], []) + AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include="/usr/include/libxml2"], []) CPPFLAGS="$SAVED_CPPFLAGS" + if test "x$ac_cv_libxml2_include" = "xno"; then + AC_MSG_NOTICE([Testing in /usr/local/include/libxml2]) + SAVED_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I/usr/local/include/libxml2 $CPPFLAGS" + unset ac_cv_header_libxml_parser_h + AC_CHECK_HEADERS([libxml/parser.h], [ac_cv_libxml2_include="/usr/local/include/libxml2"], []) + CPPFLAGS="$SAVED_CPPFLAGS" + fi ]) - if test "x$ac_cv_libxml2_include" = "xyes"; then - SQUID_CXXFLAGS="-I/usr/include/libxml2 $SQUID_CXXFLAGS" - CPPFLAGS="-I/usr/include/libxml2 $CPPFLAGS" + if test "x$ac_cv_libxml2_include" != "xno"; then + SQUID_CXXFLAGS="-I$ac_cv_libxml2_include $SQUID_CXXFLAGS" + CPPFLAGS="-I$ac_cv_libxml2_include $CPPFLAGS" fi dnl Now that we know where to look find the other headers... AC_CHECK_HEADERS(libxml/HTMLparser.h libxml/HTMLtree.h)