Browse code

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

Steven Morgan authored on 2017/11/29 08:05:44
Showing 3 changed files
... ...
@@ -696,8 +696,6 @@ LIBPRELUDE_CFLAGS
696 696
 LIBPRELUDE_CONFIG
697 697
 ENABLE_LIBFRESHCLAM_FALSE
698 698
 ENABLE_LIBFRESHCLAM_TRUE
699
-ENABLE_CLAMSUBMIT_FALSE
700
-ENABLE_CLAMSUBMIT_TRUE
701 699
 SYSTEM_LFS_FTS_FALSE
702 700
 SYSTEM_LFS_FTS_TRUE
703 701
 HAVE_YARA
... ...
@@ -17838,7 +17836,7 @@ fi
17838 17838
 
17839 17839
 
17840 17840
 
17841
-
17841
+with_xml_val="yes"
17842 17842
 want_xml="auto"
17843 17843
 # Check whether --enable-xml was given.
17844 17844
 if test "${enable_xml+set}" = set; then :
... ...
@@ -17855,39 +17853,44 @@ $as_echo_n "checking for libxml2 installation... " >&6; }
17855 17855
 
17856 17856
 # Check whether --with-xml was given.
17857 17857
 if test "${with_xml+set}" = set; then :
17858
-  withval=$with_xml;
17859
-  if test "$withval"
17860
-  then
17861
-    XML_HOME="$withval"
17862
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $XML_HOME" >&5
17863
-$as_echo "using $XML_HOME" >&6; }
17864
-  else
17865
-    as_fn_error $? "cannot assign blank value to --with-xml" "$LINENO" 5
17866
-  fi
17858
+  withval=$with_xml; with_xml_val=$withval
17859
+
17860
+fi
17861
+
17862
+fi
17867 17863
 
17864
+if test "x$with_xml_val" = "xno"; then :
17865
+  XML_HOME=""
17866
+elif test "x$with_xml_val" = "xyes"; then :
17867
+  XML_HOME="/usr/local"
17868 17868
 else
17869
+  XML_HOME="$with_xml_val"
17870
+fi
17869 17871
 
17870
-  XML_HOME=/usr/local
17871
-  if test ! -x "$XML_HOME/bin/xml2-config"
17872
-  then
17873
-    XML_HOME=/usr
17874
-    if test ! -x "$XML_HOME/bin/xml2-config"
17875
-    then
17876
-      XML_HOME=""
17877
-    fi
17878
-  fi
17879
-  if test "x$XML_HOME" != "x"; then
17880
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_HOME" >&5
17881
-$as_echo "$XML_HOME" >&6; }
17882
-  else
17883
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17884
-$as_echo "not found" >&6; }
17885
-  fi
17872
+if test "x$XML_HOME" != "x"; then :
17873
+
17874
+   if test ! -x "$XML_HOME/bin/xml2-config"; then :
17875
+  XML_HOME=""
17876
+fi
17877
+
17878
+fi
17879
+
17880
+if test "x$XML_HOME" = "x" -a "x$with_xml_val" = "xyes"; then :
17886 17881
 
17882
+   if test -x "/usr/bin/xml2-config"; then :
17883
+  XML_HOME="/usr"
17887 17884
 fi
17888 17885
 
17889 17886
 fi
17890 17887
 
17888
+if test "x$XML_HOME" != "x"; then
17889
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_HOME" >&5
17890
+$as_echo "$XML_HOME" >&6; }
17891
+else
17892
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17893
+$as_echo "not found" >&6; }
17894
+fi
17895
+
17891 17896
 found_xml="no"
17892 17897
 XMLCONF_VERSION=""
17893 17898
 XML_CPPFLAGS=""
... ...
@@ -17902,6 +17905,8 @@ $as_echo "$XMLCONF_VERSION" >&6; }
17902 17902
     found_xml="yes"
17903 17903
     XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
17904 17904
     XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
17905
+    $as_echo "$XML_CPPFLAGS"
17906
+    $as_echo "$XML_LIBS"
17905 17907
   else
17906 17908
     as_fn_error $? "xml2-config failed" "$LINENO" 5
17907 17909
   fi
... ...
@@ -17924,6 +17929,9 @@ $as_echo "found" >&6; }
17924 17924
     save_LDFLAGS="$LDFLAGS"
17925 17925
     LDFLAGS="$LDFLAGS $XML_LIBS"
17926 17926
 
17927
+    $as_echo "CPPFLAGS: $CPPFLAGS"
17928
+    $as_echo "LD_FLAGS: $LDFLAGS"
17929
+
17927 17930
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlTextReaderRead in -lxml2" >&5
17928 17931
 $as_echo_n "checking for xmlTextReaderRead in -lxml2... " >&6; }
17929 17932
 if ${ac_cv_lib_xml2_xmlTextReaderRead+:} false; then :
... ...
@@ -24341,15 +24349,6 @@ $as_echo "#define HAVE_SYSTEM_LFS_FTS 0" >>confdefs.h
24341 24341
 	lfs_fts_msg="internal, libc's is not LFS compatible"
24342 24342
 fi
24343 24343
 
24344
- if test "$have_curl" = "yes"; then
24345
-  ENABLE_CLAMSUBMIT_TRUE=
24346
-  ENABLE_CLAMSUBMIT_FALSE='#'
24347
-else
24348
-  ENABLE_CLAMSUBMIT_TRUE='#'
24349
-  ENABLE_CLAMSUBMIT_FALSE=
24350
-fi
24351
-
24352
-
24353 24344
 # Check whether --enable-libfreshclam was given.
24354 24345
 if test "${enable_libfreshclam+set}" = set; then :
24355 24346
   enableval=$enable_libfreshclam; enable_libfreshclam=$enableval
... ...
@@ -25373,10 +25372,6 @@ if test -z "${SYSTEM_LFS_FTS_TRUE}" && test -z "${SYSTEM_LFS_FTS_FALSE}"; then
25373 25373
   as_fn_error $? "conditional \"SYSTEM_LFS_FTS\" was never defined.
25374 25374
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25375 25375
 fi
25376
-if test -z "${ENABLE_CLAMSUBMIT_TRUE}" && test -z "${ENABLE_CLAMSUBMIT_FALSE}"; then
25377
-  as_fn_error $? "conditional \"ENABLE_CLAMSUBMIT\" was never defined.
25378
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
25379
-fi
25380 25376
 if test -z "${ENABLE_LIBFRESHCLAM_TRUE}" && test -z "${ENABLE_LIBFRESHCLAM_FALSE}"; then
25381 25377
   as_fn_error $? "conditional \"ENABLE_LIBFRESHCLAM\" was never defined.
25382 25378
 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
27970 27970
   as_fn_error $? "conditional \"SYSTEM_LFS_FTS\" was never defined.
27971 27971
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
27972 27972
 fi
27973
-if test -z "${ENABLE_CLAMSUBMIT_TRUE}" && test -z "${ENABLE_CLAMSUBMIT_FALSE}"; then
27974
-  as_fn_error $? "conditional \"ENABLE_CLAMSUBMIT\" was never defined.
27975
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
27976
-fi
27977 27973
 if test -z "${ENABLE_LIBFRESHCLAM_TRUE}" && test -z "${ENABLE_LIBFRESHCLAM_FALSE}"; then
27978 27974
   as_fn_error $? "conditional \"ENABLE_LIBFRESHCLAM\" was never defined.
27979 27975
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
... ...
@@ -5755,8 +5755,8 @@ maintainer-clean-generic:
5755 5755
 	@echo "This command is intended for maintainers to use"
5756 5756
 	@echo "it deletes files that may require special tools to rebuild."
5757 5757
 	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
5758
-@BUILD_EXTERNAL_LLVM_TRUE@clean-local:
5759 5758
 @BUILD_EXTERNAL_LLVM_TRUE@distclean-local:
5759
+@BUILD_EXTERNAL_LLVM_TRUE@clean-local:
5760 5760
 clean: clean-am
5761 5761
 
5762 5762
 clean-am: clean-generic clean-libtool clean-local \
... ...
@@ -1,4 +1,4 @@
1
-
1
+with_xml_val="yes"
2 2
 want_xml="auto"
3 3
 AC_ARG_ENABLE([xml],
4 4
 [AS_HELP_STRING([--disable-xml], [do not include DMG and XAR support])],
... ...
@@ -8,32 +8,28 @@ XML_HOME=""
8 8
 if test "X$want_xml" != "Xno"; then
9 9
   AC_MSG_CHECKING([for libxml2 installation])
10 10
   AC_ARG_WITH([xml],
11
-  [AS_HELP_STRING([--with-xml@<:@=DIR@:>@], [path to directory containing libxml2 library
12
-                  @<:@default=/usr/local or /usr if not found in /usr/local@:>@])],
13
-  [
14
-  if test "$withval"
15
-  then
16
-    XML_HOME="$withval"
17
-    AC_MSG_RESULT([using $XML_HOME])
18
-  else
19
-    AC_MSG_ERROR([cannot assign blank value to --with-xml])
20
-  fi
21
-  ], [
22
-  XML_HOME=/usr/local
23
-  if test ! -x "$XML_HOME/bin/xml2-config"
24
-  then
25
-    XML_HOME=/usr
26
-    if test ! -x "$XML_HOME/bin/xml2-config"
27
-    then
28
-      XML_HOME=""
29
-    fi
30
-  fi
31
-  if test "x$XML_HOME" != "x"; then
32
-    AC_MSG_RESULT([$XML_HOME])
33
-  else
34
-    AC_MSG_RESULT([not found])
35
-  fi
36
-  ])
11
+    AS_HELP_STRING([--with-xml@<:@=DIR@:>@], [path to directory containing libxml2 library
12
+                    @<:@default=/usr/local or /usr if not found in /usr/local@:>@]),
13
+    [with_xml_val=$withval]
14
+  )
15
+fi
16
+
17
+AS_IF([test "x$with_xml_val" = "xno"], [XML_HOME=""],
18
+  [test "x$with_xml_val" = "xyes"], [XML_HOME="/usr/local"],
19
+  [XML_HOME="$with_xml_val"])
20
+
21
+AS_IF([test "x$XML_HOME" != "x"], [
22
+   AS_IF([test ! -x "$XML_HOME/bin/xml2-config"], [XML_HOME=""])
23
+   ])
24
+
25
+AS_IF([test "x$XML_HOME" = "x" -a "x$with_xml_val" = "xyes"], [
26
+   AS_IF([test -x "/usr/bin/xml2-config"], [XML_HOME="/usr"])
27
+   ])
28
+
29
+if test "x$XML_HOME" != "x"; then
30
+  AC_MSG_RESULT([$XML_HOME])
31
+else
32
+  AC_MSG_RESULT([not found])
37 33
 fi
38 34
 
39 35
 found_xml="no"
... ...
@@ -48,6 +44,8 @@ if test "x$XML_HOME" != "x"; then
48 48
     found_xml="yes"
49 49
     XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
50 50
     XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
51
+    AS_ECHO("$XML_CPPFLAGS")
52
+    AS_ECHO("$XML_LIBS")
51 53
   else
52 54
     AC_MSG_ERROR([xml2-config failed])
53 55
   fi
... ...
@@ -67,6 +65,9 @@ if test "X$found_xml" != "Xno"; then
67 67
     save_LDFLAGS="$LDFLAGS"
68 68
     LDFLAGS="$LDFLAGS $XML_LIBS"
69 69
 
70
+    AS_ECHO("CPPFLAGS: $CPPFLAGS")
71
+    AS_ECHO("LD_FLAGS: $LDFLAGS")
72
+
70 73
     AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"], [$XML_LIBS])
71 74
 
72 75
     CPPFLAGS="$save_CPPFLAGS"