Hello all,

the tests in configure.in (and finally configure) do the wrong thing for
the SENDMAIL_VERSION* macros if sendmail isn't found.  Currently they
define SENDMAIL_VERSION_A and so forth, but give them a null value, like
#define SENDMAIL_VERSION_A 

the following patch corrects this,a nd results in
/* #undef SENDMAIL_VERSION_A */
which is correct if sendmail is not installed

--- configure.in.old    2005-06-18 14:16:23.345795850 -0400
+++ configure.in        2005-06-18 14:12:20.830173318 -0400
@@ -172,14 +172,15 @@
   AC_DEFINE_UNQUOTED(SENDMAIL_BIN, "$sendmailprog", [location of Sendmail 
binary])

   sendmailver=`$sendmailprog -d0 < /dev/null | head -1 | awk '{print $2}'`
-  sendmailver_a=`echo $sendmailver | awk -F. '{printf $1}'`
-  sendmailver_b=`echo $sendmailver | awk -F. '{printf $2}'`
-  sendmailver_c=`echo $sendmailver | awk -F. '{printf $3}'`
-
-  AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_A, $sendmailver_a, [major version of 
Sendmail])
-  AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_B, $sendmailver_b, [minor version of 
Sendmail])
-  AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_C, $sendmailver_c, [subversion of 
Sendmail])
-
+  if test -n "$sendmailver"; then
+    sendmailver_a=`echo $sendmailver | awk -F. '{printf $1}'`
+    sendmailver_b=`echo $sendmailver | awk -F. '{printf $2}'`
+    sendmailver_c=`echo $sendmailver | awk -F. '{printf $3}'`
+
+    AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_A, $sendmailver_a, [major version of 
Sendmail])
+    AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_B, $sendmailver_b, [minor version of 
Sendmail])
+    AC_DEFINE_UNQUOTED(SENDMAIL_VERSION_C, $sendmailver_c, [subversion of 
Sendmail])
+  fi
 fi

 AC_ARG_ENABLE(dsig,

Thanks,
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | A woman can look both moral and         |
|  [EMAIL PROTECTED]             | exciting -- if she also looks as if it  |
|  http://www.lobefin.net/~steve | were quite a struggle.   -- Edna Ferber |
 --------------------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html

Reply via email to