Browse code

improve --disable-dns behaviour

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

Tomasz Kojm authored on 2004/10/07 04:41:25
Showing 4 changed files
... ...
@@ -1,3 +1,8 @@
1
+Wed Oct  6 21:36:59 CEST 2004 (tk)
2
+----------------------------------
3
+  * configure: improve --disable-dns behaviour (patch by Tom G. Christensen
4
+	       <tgc*statsbiblioteket.dk>)
5
+
1 6
 Wed Oct  6 20:48:17 CEST 2004 (tk)
2 7
 ----------------------------------
3 8
   * freshclam/manager.c: fix download problems with some proxy servers
... ...
@@ -46,7 +46,7 @@ while test $# -gt 0; do
46 46
 	;;
47 47
 
48 48
     --version)
49
-	echo devel-20041003
49
+	echo devel-20041006
50 50
 	exit 0
51 51
 	;;
52 52
 
... ...
@@ -1016,7 +1016,8 @@ Optional Features:
1016 1016
   --enable-fast-install=PKGS  optimize for fast installation default=yes
1017 1017
   --disable-libtool-lock  avoid locking (might break parallel builds)
1018 1018
   --disable-bzip2	  disable bzip2 support
1019
-  --disable-dns	          disable support for database verification through DNS
1019
+  --disable-dns           disable support for database verification through
1020
+                          DNS
1020 1021
   --disable-clamuko	  disable clamuko support (Linux and FreeBSD only)
1021 1022
   --enable-milter	  build clamav-milter
1022 1023
   --disable-dsig	  disable support for digital signatures
... ...
@@ -5017,7 +5018,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5017 5017
 case $host in
5018 5018
 *-*-irix6*)
5019 5019
   # Find out which ABI we are using.
5020
-  echo '#line 5020 "configure"' > conftest.$ac_ext
5020
+  echo '#line 5021 "configure"' > conftest.$ac_ext
5021 5021
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5022 5022
   (eval $ac_compile) 2>&5
5023 5023
   ac_status=$?
... ...
@@ -5590,7 +5591,7 @@ chmod -w .
5590 5590
 save_CFLAGS="$CFLAGS"
5591 5591
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5592 5592
 compiler_c_o=no
5593
-if { (eval echo configure:5593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5593
+if { (eval echo configure:5594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5594 5594
   # The compiler can only warn and ignore the option if not recognized
5595 5595
   # So say no if there are warnings
5596 5596
   if test -s out/conftest.err; then
... ...
@@ -7517,7 +7518,7 @@ else
7517 7517
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7518 7518
   lt_status=$lt_dlunknown
7519 7519
   cat > conftest.$ac_ext <<EOF
7520
-#line 7520 "configure"
7520
+#line 7521 "configure"
7521 7521
 #include "confdefs.h"
7522 7522
 
7523 7523
 #if HAVE_DLFCN_H
... ...
@@ -7615,7 +7616,7 @@ else
7615 7615
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7616 7616
   lt_status=$lt_dlunknown
7617 7617
   cat > conftest.$ac_ext <<EOF
7618
-#line 7618 "configure"
7618
+#line 7619 "configure"
7619 7619
 #include "confdefs.h"
7620 7620
 
7621 7621
 #if HAVE_DLFCN_H
... ...
@@ -10538,84 +10539,16 @@ fi
10538 10538
 
10539 10539
 fi
10540 10540
 
10541
-want_dns="yes"
10542 10541
 # Check whether --enable-dns or --disable-dns was given.
10543 10542
 if test "${enable_dns+set}" = set; then
10544 10543
   enableval="$enable_dns"
10545
-  want_dns="no"
10546
-fi;
10547
-
10548
-if test "$want_dns" = "yes"
10549
-then
10550
-    echo "$as_me:$LINENO: checking for __dn_expand in -lresolv" >&5
10551
-echo $ECHO_N "checking for __dn_expand in -lresolv... $ECHO_C" >&6
10552
-if test "${ac_cv_lib_resolv___dn_expand+set}" = set; then
10553
-  echo $ECHO_N "(cached) $ECHO_C" >&6
10554
-else
10555
-  ac_check_lib_save_LIBS=$LIBS
10556
-LIBS="-lresolv  $LIBS"
10557
-cat >conftest.$ac_ext <<_ACEOF
10558
-/* confdefs.h.  */
10559
-_ACEOF
10560
-cat confdefs.h >>conftest.$ac_ext
10561
-cat >>conftest.$ac_ext <<_ACEOF
10562
-/* end confdefs.h.  */
10563
-
10564
-/* Override any gcc2 internal prototype to avoid an error.  */
10565
-#ifdef __cplusplus
10566
-extern "C"
10567
-#endif
10568
-/* We use char because int might match the return type of a gcc2
10569
-   builtin and then its argument prototype would still apply.  */
10570
-char __dn_expand ();
10571
-int
10572
-main ()
10573
-{
10574
-__dn_expand ();
10575
-  ;
10576
-  return 0;
10577
-}
10578
-_ACEOF
10579
-rm -f conftest.$ac_objext conftest$ac_exeext
10580
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10581
-  (eval $ac_link) 2>conftest.er1
10582
-  ac_status=$?
10583
-  grep -v '^ *+' conftest.er1 >conftest.err
10584
-  rm -f conftest.er1
10585
-  cat conftest.err >&5
10586
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10587
-  (exit $ac_status); } &&
10588
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
10589
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10590
-  (eval $ac_try) 2>&5
10591
-  ac_status=$?
10592
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10593
-  (exit $ac_status); }; } &&
10594
-	 { ac_try='test -s conftest$ac_exeext'
10595
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10596
-  (eval $ac_try) 2>&5
10597
-  ac_status=$?
10598
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10599
-  (exit $ac_status); }; }; then
10600
-  ac_cv_lib_resolv___dn_expand=yes
10544
+  want_dns=$enableval
10601 10545
 else
10602
-  echo "$as_me: failed program was:" >&5
10603
-sed 's/^/| /' conftest.$ac_ext >&5
10546
+  want_dns=yes
10604 10547
 
10605
-ac_cv_lib_resolv___dn_expand=no
10606
-fi
10607
-rm -f conftest.err conftest.$ac_objext \
10608
-      conftest$ac_exeext conftest.$ac_ext
10609
-LIBS=$ac_check_lib_save_LIBS
10610
-fi
10611
-echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___dn_expand" >&5
10612
-echo "${ECHO_T}$ac_cv_lib_resolv___dn_expand" >&6
10613
-if test $ac_cv_lib_resolv___dn_expand = yes; then
10614
-  resolv_lib="-lresolv"
10615
-fi
10616
-
10617
-    if test -z "$resolv_lib"; then
10618
-      echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
10548
+fi;
10549
+if test $want_dns = yes; then
10550
+    echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
10619 10551
 echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
10620 10552
 if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
10621 10553
   echo $ECHO_N "(cached) $ECHO_C" >&6
... ...
@@ -10682,7 +10615,6 @@ if test $ac_cv_lib_resolv_dn_expand = yes; then
10682 10682
   resolv_lib="-lresolv"
10683 10683
 fi
10684 10684
 
10685
-    fi
10686 10685
     if test "${ac_cv_header_resolv_h+set}" = set; then
10687 10686
   echo "$as_me:$LINENO: checking for resolv.h" >&5
10688 10687
 echo $ECHO_N "checking for resolv.h... $ECHO_C" >&6
... ...
@@ -86,17 +86,12 @@ then
86 86
     AC_CHECK_HEADER(bzlib.h,[LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lbz2"; AC_DEFINE(HAVE_BZLIB_H,1,have bzip2)], AC_MSG_WARN([****** bzip2 support disabled]))
87 87
 fi
88 88
 
89
-want_dns="yes"
90 89
 AC_ARG_ENABLE(dns,
91
-[  --disable-dns	          disable support for database verification through DNS],
92
-want_dns="no",)
93
-
94
-if test "$want_dns" = "yes"
95
-then
96
-    AC_CHECK_LIB(resolv, __dn_expand, resolv_lib="-lresolv",)
97
-    if test -z "$resolv_lib"; then
98
-      AC_CHECK_LIB(resolv, dn_expand, resolv_lib="-lresolv",)
99
-    fi
90
+    AC_HELP_STRING([--disable-dns], [disable support for database verification through DNS]),
91
+    [want_dns=$enableval], [want_dns=yes]
92
+)
93
+if test $want_dns = yes; then
94
+    AC_CHECK_LIB(resolv, dn_expand, resolv_lib="-lresolv")
100 95
     AC_CHECK_HEADER(resolv.h,[FRESHCLAM_LIBS="$FRESHCLAM_LIBS $resolv_lib"; AC_DEFINE(HAVE_RESOLV_H,1,have resolv.h)], AC_MSG_WARN([****** DNS support disabled]))
101 96
 fi
102 97