Browse code

Test for libcurl. Define foo "inline" if needed.

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@760 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/08/18 04:07:28
Showing 5 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Aug 17 21:02:06 CEST 2004 (tk)
2
+----------------------------------
3
+  * configure: Test for libcurl. Define foo "inline" if needed.
4
+
1 5
 Tue Aug 17 09:30:15 BST 2004 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/mbox.c:	Scan fax-messages sent as e-mail (RFC3458)
... ...
@@ -46,7 +46,7 @@ while test $# -gt 0; do
46 46
 	;;
47 47
 
48 48
     --version)
49
-	echo devel-20040814
49
+	echo devel-20040817
50 50
 	exit 0
51 51
 	;;
52 52
 
... ...
@@ -59,7 +59,7 @@ while test $# -gt 0; do
59 59
        	;;
60 60
 
61 61
     --libs)
62
-       	echo -L${exec_prefix}/lib  -lz -lbz2 -lgmp -lpthread
62
+       	echo -L${exec_prefix}/lib  -lz -lbz2 -lgmp -L/usr/lib -lcurl -lssl -lcrypto -ldl -lssl -lcrypto -ldl -lz -lpthread
63 63
        	;;
64 64
 
65 65
     *)
... ...
@@ -255,6 +255,9 @@
255 255
 /* Version number of package */
256 256
 #undef VERSION
257 257
 
258
+/* use libcurl in mbox code */
259
+#undef WITH_CURL
260
+
258 261
 /* tcpwrappers support */
259 262
 #undef WITH_TCPWRAP
260 263
 
... ...
@@ -270,5 +273,11 @@
270 270
 /* Define to empty if `const' does not conform to ANSI C. */
271 271
 #undef const
272 272
 
273
+/* Define to `__inline__' or `__inline' if that's what the C compiler
274
+   calls it, or to nothing if 'inline' is not supported under any name.  */
275
+#ifndef __cplusplus
276
+#undef inline
277
+#endif
278
+
273 279
 /* Define to `long' if <sys/types.h> does not define. */
274 280
 #undef off_t
... ...
@@ -1033,6 +1033,7 @@ Optional Packages:
1033 1033
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1034 1034
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1035 1035
   --with-pic              try to use only PIC/non-PIC objects default=use both
1036
+  --with-libcurl	    Support URLs downloading with libcurl (default=auto)
1036 1037
   --with-user=uid	  name of the clamav user (default=clamav).
1037 1038
   --with-group=gid	  name of the clamav group (default=clamav).
1038 1039
   --with-dbdir=path	  Path to virus database directory.
... ...
@@ -5014,7 +5015,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5014 5014
 case $host in
5015 5015
 *-*-irix6*)
5016 5016
   # Find out which ABI we are using.
5017
-  echo '#line 5017 "configure"' > conftest.$ac_ext
5017
+  echo '#line 5018 "configure"' > conftest.$ac_ext
5018 5018
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5019 5019
   (eval $ac_compile) 2>&5
5020 5020
   ac_status=$?
... ...
@@ -5587,7 +5588,7 @@ chmod -w .
5587 5587
 save_CFLAGS="$CFLAGS"
5588 5588
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5589 5589
 compiler_c_o=no
5590
-if { (eval echo configure:5590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5590
+if { (eval echo configure:5591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5591 5591
   # The compiler can only warn and ignore the option if not recognized
5592 5592
   # So say no if there are warnings
5593 5593
   if test -s out/conftest.err; then
... ...
@@ -7514,7 +7515,7 @@ else
7514 7514
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7515 7515
   lt_status=$lt_dlunknown
7516 7516
   cat > conftest.$ac_ext <<EOF
7517
-#line 7517 "configure"
7517
+#line 7518 "configure"
7518 7518
 #include "confdefs.h"
7519 7519
 
7520 7520
 #if HAVE_DLFCN_H
... ...
@@ -7612,7 +7613,7 @@ else
7612 7612
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7613 7613
   lt_status=$lt_dlunknown
7614 7614
   cat > conftest.$ac_ext <<EOF
7615
-#line 7615 "configure"
7615
+#line 7616 "configure"
7616 7616
 #include "confdefs.h"
7617 7617
 
7618 7618
 #if HAVE_DLFCN_H
... ...
@@ -8688,6 +8689,152 @@ fi
8688 8688
 
8689 8689
 done
8690 8690
 
8691
+if test "${ac_cv_header_syslog_h+set}" = set; then
8692
+  echo "$as_me:$LINENO: checking for syslog.h" >&5
8693
+echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
8694
+if test "${ac_cv_header_syslog_h+set}" = set; then
8695
+  echo $ECHO_N "(cached) $ECHO_C" >&6
8696
+fi
8697
+echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
8698
+echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
8699
+else
8700
+  # Is the header compilable?
8701
+echo "$as_me:$LINENO: checking syslog.h usability" >&5
8702
+echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
8703
+cat >conftest.$ac_ext <<_ACEOF
8704
+/* confdefs.h.  */
8705
+_ACEOF
8706
+cat confdefs.h >>conftest.$ac_ext
8707
+cat >>conftest.$ac_ext <<_ACEOF
8708
+/* end confdefs.h.  */
8709
+$ac_includes_default
8710
+#include <syslog.h>
8711
+_ACEOF
8712
+rm -f conftest.$ac_objext
8713
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8714
+  (eval $ac_compile) 2>conftest.er1
8715
+  ac_status=$?
8716
+  grep -v '^ *+' conftest.er1 >conftest.err
8717
+  rm -f conftest.er1
8718
+  cat conftest.err >&5
8719
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8720
+  (exit $ac_status); } &&
8721
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
8722
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8723
+  (eval $ac_try) 2>&5
8724
+  ac_status=$?
8725
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8726
+  (exit $ac_status); }; } &&
8727
+	 { ac_try='test -s conftest.$ac_objext'
8728
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8729
+  (eval $ac_try) 2>&5
8730
+  ac_status=$?
8731
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8732
+  (exit $ac_status); }; }; then
8733
+  ac_header_compiler=yes
8734
+else
8735
+  echo "$as_me: failed program was:" >&5
8736
+sed 's/^/| /' conftest.$ac_ext >&5
8737
+
8738
+ac_header_compiler=no
8739
+fi
8740
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8741
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8742
+echo "${ECHO_T}$ac_header_compiler" >&6
8743
+
8744
+# Is the header present?
8745
+echo "$as_me:$LINENO: checking syslog.h presence" >&5
8746
+echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
8747
+cat >conftest.$ac_ext <<_ACEOF
8748
+/* confdefs.h.  */
8749
+_ACEOF
8750
+cat confdefs.h >>conftest.$ac_ext
8751
+cat >>conftest.$ac_ext <<_ACEOF
8752
+/* end confdefs.h.  */
8753
+#include <syslog.h>
8754
+_ACEOF
8755
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8756
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8757
+  ac_status=$?
8758
+  grep -v '^ *+' conftest.er1 >conftest.err
8759
+  rm -f conftest.er1
8760
+  cat conftest.err >&5
8761
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8762
+  (exit $ac_status); } >/dev/null; then
8763
+  if test -s conftest.err; then
8764
+    ac_cpp_err=$ac_c_preproc_warn_flag
8765
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8766
+  else
8767
+    ac_cpp_err=
8768
+  fi
8769
+else
8770
+  ac_cpp_err=yes
8771
+fi
8772
+if test -z "$ac_cpp_err"; then
8773
+  ac_header_preproc=yes
8774
+else
8775
+  echo "$as_me: failed program was:" >&5
8776
+sed 's/^/| /' conftest.$ac_ext >&5
8777
+
8778
+  ac_header_preproc=no
8779
+fi
8780
+rm -f conftest.err conftest.$ac_ext
8781
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8782
+echo "${ECHO_T}$ac_header_preproc" >&6
8783
+
8784
+# So?  What about this header?
8785
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8786
+  yes:no: )
8787
+    { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
8788
+echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8789
+    { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
8790
+echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
8791
+    ac_header_preproc=yes
8792
+    ;;
8793
+  no:yes:* )
8794
+    { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
8795
+echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
8796
+    { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
8797
+echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
8798
+    { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
8799
+echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
8800
+    { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
8801
+echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
8802
+    { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
8803
+echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
8804
+    { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
8805
+echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
8806
+    (
8807
+      cat <<\_ASBOX
8808
+## ------------------------------------------ ##
8809
+## Report this to the AC_PACKAGE_NAME lists.  ##
8810
+## ------------------------------------------ ##
8811
+_ASBOX
8812
+    ) |
8813
+      sed "s/^/$as_me: WARNING:     /" >&2
8814
+    ;;
8815
+esac
8816
+echo "$as_me:$LINENO: checking for syslog.h" >&5
8817
+echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
8818
+if test "${ac_cv_header_syslog_h+set}" = set; then
8819
+  echo $ECHO_N "(cached) $ECHO_C" >&6
8820
+else
8821
+  ac_cv_header_syslog_h=$ac_header_preproc
8822
+fi
8823
+echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
8824
+echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
8825
+
8826
+fi
8827
+if test $ac_cv_header_syslog_h = yes; then
8828
+
8829
+cat >>confdefs.h <<\_ACEOF
8830
+#define USE_SYSLOG 1
8831
+_ACEOF
8832
+
8833
+fi
8834
+
8835
+
8836
+
8691 8837
 echo "$as_me:$LINENO: checking for off_t" >&5
8692 8838
 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
8693 8839
 if test "${ac_cv_type_off_t+set}" = set; then
... ...
@@ -10626,152 +10773,40 @@ fi
10626 10626
 
10627 10627
 fi
10628 10628
 
10629
-if test "${ac_cv_header_syslog_h+set}" = set; then
10630
-  echo "$as_me:$LINENO: checking for syslog.h" >&5
10631
-echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
10632
-if test "${ac_cv_header_syslog_h+set}" = set; then
10633
-  echo $ECHO_N "(cached) $ECHO_C" >&6
10634
-fi
10635
-echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
10636
-echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
10637
-else
10638
-  # Is the header compilable?
10639
-echo "$as_me:$LINENO: checking syslog.h usability" >&5
10640
-echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
10641
-cat >conftest.$ac_ext <<_ACEOF
10642
-/* confdefs.h.  */
10643
-_ACEOF
10644
-cat confdefs.h >>conftest.$ac_ext
10645
-cat >>conftest.$ac_ext <<_ACEOF
10646
-/* end confdefs.h.  */
10647
-$ac_includes_default
10648
-#include <syslog.h>
10649
-_ACEOF
10650
-rm -f conftest.$ac_objext
10651
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10652
-  (eval $ac_compile) 2>conftest.er1
10653
-  ac_status=$?
10654
-  grep -v '^ *+' conftest.er1 >conftest.err
10655
-  rm -f conftest.er1
10656
-  cat conftest.err >&5
10657
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658
-  (exit $ac_status); } &&
10659
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
10660
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10661
-  (eval $ac_try) 2>&5
10662
-  ac_status=$?
10663
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10664
-  (exit $ac_status); }; } &&
10665
-	 { ac_try='test -s conftest.$ac_objext'
10666
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10667
-  (eval $ac_try) 2>&5
10668
-  ac_status=$?
10669
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10670
-  (exit $ac_status); }; }; then
10671
-  ac_header_compiler=yes
10672
-else
10673
-  echo "$as_me: failed program was:" >&5
10674
-sed 's/^/| /' conftest.$ac_ext >&5
10675
-
10676
-ac_header_compiler=no
10677
-fi
10678
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10679
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10680
-echo "${ECHO_T}$ac_header_compiler" >&6
10681
-
10682
-# Is the header present?
10683
-echo "$as_me:$LINENO: checking syslog.h presence" >&5
10684
-echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
10685
-cat >conftest.$ac_ext <<_ACEOF
10686
-/* confdefs.h.  */
10687
-_ACEOF
10688
-cat confdefs.h >>conftest.$ac_ext
10689
-cat >>conftest.$ac_ext <<_ACEOF
10690
-/* end confdefs.h.  */
10691
-#include <syslog.h>
10692
-_ACEOF
10693
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10694
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10695
-  ac_status=$?
10696
-  grep -v '^ *+' conftest.er1 >conftest.err
10697
-  rm -f conftest.er1
10698
-  cat conftest.err >&5
10699
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10700
-  (exit $ac_status); } >/dev/null; then
10701
-  if test -s conftest.err; then
10702
-    ac_cpp_err=$ac_c_preproc_warn_flag
10703
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10704
-  else
10705
-    ac_cpp_err=
10706
-  fi
10707
-else
10708
-  ac_cpp_err=yes
10709
-fi
10710
-if test -z "$ac_cpp_err"; then
10711
-  ac_header_preproc=yes
10712
-else
10713
-  echo "$as_me: failed program was:" >&5
10714
-sed 's/^/| /' conftest.$ac_ext >&5
10715
-
10716
-  ac_header_preproc=no
10717
-fi
10718
-rm -f conftest.err conftest.$ac_ext
10719
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10720
-echo "${ECHO_T}$ac_header_preproc" >&6
10721 10629
 
10722
-# So?  What about this header?
10723
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10724
-  yes:no: )
10725
-    { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
10726
-echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10727
-    { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
10728
-echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
10729
-    ac_header_preproc=yes
10730
-    ;;
10731
-  no:yes:* )
10732
-    { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
10733
-echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
10734
-    { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
10735
-echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
10736
-    { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
10737
-echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
10738
-    { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
10739
-echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10740
-    { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
10741
-echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
10742
-    { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
10743
-echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
10744
-    (
10745
-      cat <<\_ASBOX
10746
-## ------------------------------------------ ##
10747
-## Report this to the AC_PACKAGE_NAME lists.  ##
10748
-## ------------------------------------------ ##
10749
-_ASBOX
10750
-    ) |
10751
-      sed "s/^/$as_me: WARNING:     /" >&2
10752
-    ;;
10753
-esac
10754
-echo "$as_me:$LINENO: checking for syslog.h" >&5
10755
-echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
10756
-if test "${ac_cv_header_syslog_h+set}" = set; then
10757
-  echo $ECHO_N "(cached) $ECHO_C" >&6
10630
+# Check whether --with-libcurl or --without-libcurl was given.
10631
+if test "${with_libcurl+set}" = set; then
10632
+  withval="$with_libcurl"
10633
+   case "$withval" in
10634
+  yes|no) lcurl="$withval" ;;
10635
+  *)      { { echo "$as_me:$LINENO: error: --with-libcurl does not take an argument" >&5
10636
+echo "$as_me: error: --with-libcurl does not take an argument" >&2;}
10637
+   { (exit 1); exit 1; }; } ;;
10638
+  esac
10758 10639
 else
10759
-  ac_cv_header_syslog_h=$ac_header_preproc
10760
-fi
10761
-echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
10762
-echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
10640
+   lcurl=auto
10641
+fi;
10763 10642
 
10764
-fi
10765
-if test $ac_cv_header_syslog_h = yes; then
10643
+if test "$lcurl" != "no"
10644
+then
10645
+    echo "$as_me:$LINENO: checking for libcurl" >&5
10646
+echo $ECHO_N "checking for libcurl... $ECHO_C" >&6
10647
+    if eval curl-config --version 2>/dev/null >/dev/null; then
10766 10648
 
10767 10649
 cat >>confdefs.h <<\_ACEOF
10768
-#define USE_SYSLOG 1
10650
+#define WITH_CURL 1
10769 10651
 _ACEOF
10770 10652
 
10653
+	curl_libs=`curl-config --libs`
10654
+	LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $curl_libs"
10655
+	echo "$as_me:$LINENO: result: yes" >&5
10656
+echo "${ECHO_T}yes" >&6
10657
+    else
10658
+	echo "$as_me:$LINENO: result: no" >&5
10659
+echo "${ECHO_T}no" >&6
10660
+    fi
10771 10661
 fi
10772 10662
 
10773
-
10774
-
10775 10663
 # Check whether --enable-pthreads or --disable-pthreads was given.
10776 10664
 if test "${enable_pthreads+set}" = set; then
10777 10665
   enableval="$enable_pthreads"
... ...
@@ -12553,6 +12588,76 @@ _ACEOF
12553 12553
 
12554 12554
 fi
12555 12555
 
12556
+echo "$as_me:$LINENO: checking for inline" >&5
12557
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
12558
+if test "${ac_cv_c_inline+set}" = set; then
12559
+  echo $ECHO_N "(cached) $ECHO_C" >&6
12560
+else
12561
+  ac_cv_c_inline=no
12562
+for ac_kw in inline __inline__ __inline; do
12563
+  cat >conftest.$ac_ext <<_ACEOF
12564
+/* confdefs.h.  */
12565
+_ACEOF
12566
+cat confdefs.h >>conftest.$ac_ext
12567
+cat >>conftest.$ac_ext <<_ACEOF
12568
+/* end confdefs.h.  */
12569
+#ifndef __cplusplus
12570
+typedef int foo_t;
12571
+static $ac_kw foo_t static_foo () {return 0; }
12572
+$ac_kw foo_t foo () {return 0; }
12573
+#endif
12574
+
12575
+_ACEOF
12576
+rm -f conftest.$ac_objext
12577
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12578
+  (eval $ac_compile) 2>conftest.er1
12579
+  ac_status=$?
12580
+  grep -v '^ *+' conftest.er1 >conftest.err
12581
+  rm -f conftest.er1
12582
+  cat conftest.err >&5
12583
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12584
+  (exit $ac_status); } &&
12585
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
12586
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12587
+  (eval $ac_try) 2>&5
12588
+  ac_status=$?
12589
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12590
+  (exit $ac_status); }; } &&
12591
+	 { ac_try='test -s conftest.$ac_objext'
12592
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12593
+  (eval $ac_try) 2>&5
12594
+  ac_status=$?
12595
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12596
+  (exit $ac_status); }; }; then
12597
+  ac_cv_c_inline=$ac_kw; break
12598
+else
12599
+  echo "$as_me: failed program was:" >&5
12600
+sed 's/^/| /' conftest.$ac_ext >&5
12601
+
12602
+fi
12603
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12604
+done
12605
+
12606
+fi
12607
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
12608
+echo "${ECHO_T}$ac_cv_c_inline" >&6
12609
+
12610
+
12611
+case $ac_cv_c_inline in
12612
+  inline | yes) ;;
12613
+  *)
12614
+    case $ac_cv_c_inline in
12615
+      no) ac_val=;;
12616
+      *) ac_val=$ac_cv_c_inline;;
12617
+    esac
12618
+    cat >>confdefs.h <<_ACEOF
12619
+#ifndef __cplusplus
12620
+#define inline $ac_val
12621
+#endif
12622
+_ACEOF
12623
+    ;;
12624
+esac
12625
+
12556 12626
 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
12557 12627
 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
12558 12628
 if test "${ac_cv_c_bigendian+set}" = set; then
... ...
@@ -38,6 +38,8 @@ AC_DEFINE(FILEBUFF, 8192,   [file i/o buffer size])
38 38
 
39 39
 AC_HEADER_STDC
40 40
 AC_CHECK_HEADERS(stdint.h unistd.h sys/int_types.h dlfcn.h inttypes.h sys/inttypes.h memory.h ndir.h stdlib.h strings.h string.h sys/mman.h sys/param.h sys/stat.h sys/types.h malloc.h poll.h regex.h limits.h)
41
+AC_CHECK_HEADER(syslog.h,AC_DEFINE(USE_SYSLOG,1,[use syslog]),)
42
+
41 43
 AC_TYPE_OFF_T
42 44
 AC_COMPILE_CHECK_SIZEOF(short)
43 45
 AC_COMPILE_CHECK_SIZEOF(int)
... ...
@@ -104,7 +106,27 @@ then
104 104
     AC_CHECK_LIB(gmp, __gmpz_init, [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lgmp"; AC_DEFINE(HAVE_GMP,1,have gmp installed)], [AC_CHECK_LIB(gmp, mpz_init, [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lgmp"; AC_DEFINE(HAVE_GMP,1,have gmp installed)], AC_MSG_WARN([****** GNU MP 2 or newer NOT FOUND - digital signature support will be disabled !]); want_dsig="no")])
105 105
 fi
106 106
 
107
-AC_CHECK_HEADER(syslog.h,AC_DEFINE(USE_SYSLOG,1,[use syslog]),)
107
+dnl libcurl
108
+AC_ARG_WITH(libcurl,
109
+[  --with-libcurl	    Support URLs downloading with libcurl (default=auto)],
110
+[ case "$withval" in
111
+  yes|no) lcurl="$withval" ;;
112
+  *)      AC_MSG_ERROR([--with-libcurl does not take an argument]) ;;
113
+  esac],
114
+[ lcurl=auto ])
115
+
116
+if test "$lcurl" != "no"
117
+then
118
+    AC_MSG_CHECKING([for libcurl])
119
+    if eval curl-config --version 2>/dev/null >/dev/null; then
120
+	AC_DEFINE(WITH_CURL,1,use libcurl in mbox code)
121
+	curl_libs=`curl-config --libs`
122
+	LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $curl_libs"
123
+	AC_MSG_RESULT(yes)
124
+    else
125
+	AC_MSG_RESULT(no, curl-config not found)
126
+    fi
127
+fi
108 128
 
109 129
 AC_ARG_ENABLE(pthreads,
110 130
 [  --disable-pthreads      Disable POSIX threads support],
... ...
@@ -587,6 +609,7 @@ then
587 587
 fi
588 588
 
589 589
 AC_C_CONST
590
+AC_C_INLINE
590 591
 AC_C_BIGENDIAN
591 592
 if test $ac_cv_c_bigendian = yes; then
592 593
   AC_DEFINE(WORDS_BIGENDIAN,1,endianess)