bb11882 - set default ./configure library search for libxml2.

pull/81/head
Steven Morgan 8 years ago
parent 8fdc5bb262
commit 3f0ed8d460
  1. 81
      configure
  2. 2
      libclamav/c++/Makefile.in
  3. 55
      m4/reorganization/libs/xml.m4

81
configure vendored

@ -696,8 +696,6 @@ LIBPRELUDE_CFLAGS
LIBPRELUDE_CONFIG
ENABLE_LIBFRESHCLAM_FALSE
ENABLE_LIBFRESHCLAM_TRUE
ENABLE_CLAMSUBMIT_FALSE
ENABLE_CLAMSUBMIT_TRUE
SYSTEM_LFS_FTS_FALSE
SYSTEM_LFS_FTS_TRUE
HAVE_YARA
@ -17838,7 +17836,7 @@ fi
with_xml_val="yes"
want_xml="auto"
# Check whether --enable-xml was given.
if test "${enable_xml+set}" = set; then :
@ -17855,39 +17853,44 @@ $as_echo_n "checking for libxml2 installation... " >&6; }
# Check whether --with-xml was given.
if test "${with_xml+set}" = set; then :
withval=$with_xml;
if test "$withval"
then
XML_HOME="$withval"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $XML_HOME" >&5
$as_echo "using $XML_HOME" >&6; }
else
as_fn_error $? "cannot assign blank value to --with-xml" "$LINENO" 5
fi
withval=$with_xml; with_xml_val=$withval
fi
fi
if test "x$with_xml_val" = "xno"; then :
XML_HOME=""
elif test "x$with_xml_val" = "xyes"; then :
XML_HOME="/usr/local"
else
XML_HOME="$with_xml_val"
fi
XML_HOME=/usr/local
if test ! -x "$XML_HOME/bin/xml2-config"
then
XML_HOME=/usr
if test ! -x "$XML_HOME/bin/xml2-config"
then
XML_HOME=""
fi
fi
if test "x$XML_HOME" != "x"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_HOME" >&5
$as_echo "$XML_HOME" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
fi
if test "x$XML_HOME" != "x"; then :
if test ! -x "$XML_HOME/bin/xml2-config"; then :
XML_HOME=""
fi
fi
if test "x$XML_HOME" = "x" -a "x$with_xml_val" = "xyes"; then :
if test -x "/usr/bin/xml2-config"; then :
XML_HOME="/usr"
fi
fi
if test "x$XML_HOME" != "x"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_HOME" >&5
$as_echo "$XML_HOME" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
fi
found_xml="no"
XMLCONF_VERSION=""
XML_CPPFLAGS=""
@ -17902,6 +17905,8 @@ $as_echo "$XMLCONF_VERSION" >&6; }
found_xml="yes"
XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
$as_echo "$XML_CPPFLAGS"
$as_echo "$XML_LIBS"
else
as_fn_error $? "xml2-config failed" "$LINENO" 5
fi
@ -17924,6 +17929,9 @@ $as_echo "found" >&6; }
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $XML_LIBS"
$as_echo "CPPFLAGS: $CPPFLAGS"
$as_echo "LD_FLAGS: $LDFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlTextReaderRead in -lxml2" >&5
$as_echo_n "checking for xmlTextReaderRead in -lxml2... " >&6; }
if ${ac_cv_lib_xml2_xmlTextReaderRead+:} false; then :
@ -24341,15 +24349,6 @@ $as_echo "#define HAVE_SYSTEM_LFS_FTS 0" >>confdefs.h
lfs_fts_msg="internal, libc's is not LFS compatible"
fi
if test "$have_curl" = "yes"; then
ENABLE_CLAMSUBMIT_TRUE=
ENABLE_CLAMSUBMIT_FALSE='#'
else
ENABLE_CLAMSUBMIT_TRUE='#'
ENABLE_CLAMSUBMIT_FALSE=
fi
# Check whether --enable-libfreshclam was given.
if test "${enable_libfreshclam+set}" = set; then :
enableval=$enable_libfreshclam; enable_libfreshclam=$enableval
@ -25373,10 +25372,6 @@ if test -z "${SYSTEM_LFS_FTS_TRUE}" && test -z "${SYSTEM_LFS_FTS_FALSE}"; then
as_fn_error $? "conditional \"SYSTEM_LFS_FTS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_CLAMSUBMIT_TRUE}" && test -z "${ENABLE_CLAMSUBMIT_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_CLAMSUBMIT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_LIBFRESHCLAM_TRUE}" && test -z "${ENABLE_LIBFRESHCLAM_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_LIBFRESHCLAM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -27970,10 +27965,6 @@ if test -z "${SYSTEM_LFS_FTS_TRUE}" && test -z "${SYSTEM_LFS_FTS_FALSE}"; then
as_fn_error $? "conditional \"SYSTEM_LFS_FTS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_CLAMSUBMIT_TRUE}" && test -z "${ENABLE_CLAMSUBMIT_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_CLAMSUBMIT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_LIBFRESHCLAM_TRUE}" && test -z "${ENABLE_LIBFRESHCLAM_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_LIBFRESHCLAM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5

@ -5755,8 +5755,8 @@ maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
@BUILD_EXTERNAL_LLVM_TRUE@clean-local:
@BUILD_EXTERNAL_LLVM_TRUE@distclean-local:
@BUILD_EXTERNAL_LLVM_TRUE@clean-local:
clean: clean-am
clean-am: clean-generic clean-libtool clean-local \

@ -1,4 +1,4 @@
with_xml_val="yes"
want_xml="auto"
AC_ARG_ENABLE([xml],
[AS_HELP_STRING([--disable-xml], [do not include DMG and XAR support])],
@ -8,32 +8,28 @@ XML_HOME=""
if test "X$want_xml" != "Xno"; then
AC_MSG_CHECKING([for libxml2 installation])
AC_ARG_WITH([xml],
[AS_HELP_STRING([--with-xml@<:@=DIR@:>@], [path to directory containing libxml2 library
@<:@default=/usr/local or /usr if not found in /usr/local@:>@])],
[
if test "$withval"
then
XML_HOME="$withval"
AC_MSG_RESULT([using $XML_HOME])
else
AC_MSG_ERROR([cannot assign blank value to --with-xml])
fi
], [
XML_HOME=/usr/local
if test ! -x "$XML_HOME/bin/xml2-config"
then
XML_HOME=/usr
if test ! -x "$XML_HOME/bin/xml2-config"
then
XML_HOME=""
fi
fi
if test "x$XML_HOME" != "x"; then
AC_MSG_RESULT([$XML_HOME])
else
AC_MSG_RESULT([not found])
fi
])
AS_HELP_STRING([--with-xml@<:@=DIR@:>@], [path to directory containing libxml2 library
@<:@default=/usr/local or /usr if not found in /usr/local@:>@]),
[with_xml_val=$withval]
)
fi
AS_IF([test "x$with_xml_val" = "xno"], [XML_HOME=""],
[test "x$with_xml_val" = "xyes"], [XML_HOME="/usr/local"],
[XML_HOME="$with_xml_val"])
AS_IF([test "x$XML_HOME" != "x"], [
AS_IF([test ! -x "$XML_HOME/bin/xml2-config"], [XML_HOME=""])
])
AS_IF([test "x$XML_HOME" = "x" -a "x$with_xml_val" = "xyes"], [
AS_IF([test -x "/usr/bin/xml2-config"], [XML_HOME="/usr"])
])
if test "x$XML_HOME" != "x"; then
AC_MSG_RESULT([$XML_HOME])
else
AC_MSG_RESULT([not found])
fi
found_xml="no"
@ -48,6 +44,8 @@ if test "x$XML_HOME" != "x"; then
found_xml="yes"
XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
AS_ECHO("$XML_CPPFLAGS")
AS_ECHO("$XML_LIBS")
else
AC_MSG_ERROR([xml2-config failed])
fi
@ -67,6 +65,9 @@ if test "X$found_xml" != "Xno"; then
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $XML_LIBS"
AS_ECHO("CPPFLAGS: $CPPFLAGS")
AS_ECHO("LD_FLAGS: $LDFLAGS")
AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"], [$XML_LIBS])
CPPFLAGS="$save_CPPFLAGS"

Loading…
Cancel
Save