Browse code

bb#842

git-svn: trunk@3640

aCaB authored on 2008/02/15 21:30:06
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+Fri Feb 15 13:15:42 CET 2008 (acab)
2
+-----------------------------------
3
+  * configure: provide a way to specify the version of sendmail
4
+  		patch from Steve Gran <steve*lobefin.net>
5
+
1 6
 Fri Feb 15 14:10:46 EET 2008 (edwin)
2 7
 ------------------------------------
3 8
   * libclamav/textnorm.c: need to include clamav-config.h (thanks Nigel)
... ...
@@ -1532,6 +1532,7 @@ Optional Packages:
1532 1532
   --with-libbz2-prefix[=DIR]  search for libbz2 in DIR/include and DIR/lib
1533 1533
   --without-libbz2-prefix     don't search for libbz2 in includedir and libdir
1534 1534
   --with-sendmail=PATH    specify location of Sendmail binary (default=auto find)
1535
+  --with-sendmail-version=VERSION    specify version of Sendmail (default=auto find)
1535 1536
   --with-libgmp-prefix[=DIR]  search for libgmp in DIR/include and DIR/lib
1536 1537
   --without-libgmp-prefix     don't search for libgmp in includedir and libdir
1537 1538
   --with-user=uid	  name of the clamav user (default=clamav)
... ...
@@ -4762,7 +4763,7 @@ ia64-*-hpux*)
4762 4762
   ;;
4763 4763
 *-*-irix6*)
4764 4764
   # Find out which ABI we are using.
4765
-  echo '#line 4765 "configure"' > conftest.$ac_ext
4765
+  echo '#line 4766 "configure"' > conftest.$ac_ext
4766 4766
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4767 4767
   (eval $ac_compile) 2>&5
4768 4768
   ac_status=$?
... ...
@@ -6852,11 +6853,11 @@ else
6852 6852
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6853 6853
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
6854 6854
    -e 's:$: $lt_compiler_flag:'`
6855
-   (eval echo "\"\$as_me:6855: $lt_compile\"" >&5)
6855
+   (eval echo "\"\$as_me:6856: $lt_compile\"" >&5)
6856 6856
    (eval "$lt_compile" 2>conftest.err)
6857 6857
    ac_status=$?
6858 6858
    cat conftest.err >&5
6859
-   echo "$as_me:6859: \$? = $ac_status" >&5
6859
+   echo "$as_me:6860: \$? = $ac_status" >&5
6860 6860
    if (exit $ac_status) && test -s "$ac_outfile"; then
6861 6861
      # The compiler can only warn and ignore the option if not recognized
6862 6862
      # So say no if there are warnings other than the usual output.
... ...
@@ -7142,11 +7143,11 @@ else
7142 7142
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7143 7143
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7144 7144
    -e 's:$: $lt_compiler_flag:'`
7145
-   (eval echo "\"\$as_me:7145: $lt_compile\"" >&5)
7145
+   (eval echo "\"\$as_me:7146: $lt_compile\"" >&5)
7146 7146
    (eval "$lt_compile" 2>conftest.err)
7147 7147
    ac_status=$?
7148 7148
    cat conftest.err >&5
7149
-   echo "$as_me:7149: \$? = $ac_status" >&5
7149
+   echo "$as_me:7150: \$? = $ac_status" >&5
7150 7150
    if (exit $ac_status) && test -s "$ac_outfile"; then
7151 7151
      # The compiler can only warn and ignore the option if not recognized
7152 7152
      # So say no if there are warnings other than the usual output.
... ...
@@ -7246,11 +7247,11 @@ else
7246 7246
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7247 7247
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7248 7248
    -e 's:$: $lt_compiler_flag:'`
7249
-   (eval echo "\"\$as_me:7249: $lt_compile\"" >&5)
7249
+   (eval echo "\"\$as_me:7250: $lt_compile\"" >&5)
7250 7250
    (eval "$lt_compile" 2>out/conftest.err)
7251 7251
    ac_status=$?
7252 7252
    cat out/conftest.err >&5
7253
-   echo "$as_me:7253: \$? = $ac_status" >&5
7253
+   echo "$as_me:7254: \$? = $ac_status" >&5
7254 7254
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
7255 7255
    then
7256 7256
      # The compiler can only warn and ignore the option if not recognized
... ...
@@ -9623,7 +9624,7 @@ else
9623 9623
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9624 9624
   lt_status=$lt_dlunknown
9625 9625
   cat > conftest.$ac_ext <<EOF
9626
-#line 9626 "configure"
9626
+#line 9627 "configure"
9627 9627
 #include "confdefs.h"
9628 9628
 
9629 9629
 #if HAVE_DLFCN_H
... ...
@@ -9723,7 +9724,7 @@ else
9723 9723
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9724 9724
   lt_status=$lt_dlunknown
9725 9725
   cat > conftest.$ac_ext <<EOF
9726
-#line 9726 "configure"
9726
+#line 9727 "configure"
9727 9727
 #include "confdefs.h"
9728 9728
 
9729 9729
 #if HAVE_DLFCN_H
... ...
@@ -14871,7 +14872,18 @@ cat >>confdefs.h <<_ACEOF
14871 14871
 _ACEOF
14872 14872
 
14873 14873
 
14874
-  sendmailver=`$sendmailprog -d0 < /dev/null | head -1 | awk '{print $2}'`
14874
+
14875
+# Check whether --with-sendmail-version was given.
14876
+if test "${with_sendmail_version+set}" = set; then
14877
+  withval=$with_sendmail_version; sendmailvers=$with_sendmail_version
14878
+else
14879
+  sendmailvers=no
14880
+fi
14881
+
14882
+
14883
+  if test "$sendmailvers" = "no" ; then
14884
+    sendmailver=`$sendmailprog -d0 < /dev/null | head -1 | awk '{print $2}'`
14885
+  fi
14875 14886
 
14876 14887
   if test -n "$sendmailver"; then
14877 14888
     sendmailver_a=`echo $sendmailver | awk -F. '{printf $1}'`
... ...
@@ -483,7 +483,13 @@ if test "$have_milter" = "yes"; then
483 483
 
484 484
   AC_DEFINE_UNQUOTED([SENDMAIL_BIN], "$sendmailprog", [location of Sendmail binary])
485 485
 
486
-  sendmailver=`$sendmailprog -d0 < /dev/null | head -1 | awk '{print $2}'`
486
+  AC_ARG_WITH(sendmail-version,
487
+  [  --with-sendmail-version=VERSION    specify version of Sendmail (default=auto find)],
488
+  sendmailvers=$with_sendmail_version, sendmailvers=no)
489
+
490
+  if test "$sendmailvers" = "no" ; then
491
+    sendmailver=`$sendmailprog -d0 < /dev/null | head -1 | awk '{print $2}'`
492
+  fi
487 493
 
488 494
   if test -n "$sendmailver"; then
489 495
     sendmailver_a=`echo $sendmailver | awk -F. '{printf $1}'`