--- mimedefang.spec	2006-11-19 17:22:04.000000000 -0700
+++ mimedefang2.spec	2006-11-19 19:00:14.000000000 -0700
@@ -132,21 +132,22 @@
 %{?_without_antivirus: %{expand: %%define with_antivirus 0}}
 
 Summary:       Email filtering application using sendmail's milter interface
 Name:          mimedefang
 Version:       2.58
-Release:       1
+Release:       2
 License:       GPL
 Group:         Networking/Mail
 Source0:       http://www.roaringpenguin.com/%{name}/%{name}-%{version}.tar.gz
 Url:           http://www.roaringpenguin.com/%{name}
 Vendor:        Roaring Penguin Software Inc.
 Buildroot:     %{_tmppath}/%{name}-root
 Requires:      sendmail > 8.12.0
 Requires:      perl-Digest-SHA1 perl-MIME-tools perl-IO-stringy perl-MailTools
 BuildRequires: sendmail-devel > 8.12.0
-BuildRequires: perl-Digest-SHA1 perl-MIME-tools perl-IO-stringy perl-MailTools
+BuildRequires: autoconf > 2.55
+Patch99: mimedefang-libmilter64.patch
 
 %description
 MIMEDefang is an e-mail filter program which works with Sendmail 8.11
 and later.  MIMEDefang filters all e-mail messages sent via SMTP.
 MIMEDefang splits multi-part MIME messages into their components and
@@ -165,13 +166,17 @@
 willingness of your e-mail users to commit to security, or they will
 complain loudly about MIMEDefang.
 
 %prep
 %setup -q -n %{name}-%{version}
-./configure --prefix=%{_prefix} \
+%patch99 -p0 -b .libmilter64
+autoconf
+%configure --prefix=%{_prefix} \
             --mandir=%{_mandir} \
+	    --enable-debug \
 	    --sysconfdir=/etc   \
+	    --disable-check-perl-modules \
             --with-spooldir=%{dir_spool} \
             --with-quarantinedir=%{dir_quarantine} \
 %if %{with_antivirus}
 	    --with-user=%{user}
 %else
--- /dev/null	2006-10-20 13:24:12.475602750 -0600
+++ ../SOURCES/mimedefang-libmilter64.patch	2006-11-19 17:17:55.000000000 -0700
@@ -0,0 +1,19 @@
+*** configure.in.bak	2006-11-06 08:01:23.000000000 -0700
+--- configure.in	2006-11-19 17:17:06.000000000 -0700
+***************
+*** 625,631 ****
+  
+  dnl find libmilter.a and libsm.a
+  SMPATH=`echo ../sendmail-*/obj.*/libmilter`
+! AC_PATH_PROG(LIBMILTER, libmilter.a, no, $MILTERLIB:$SMPATH:/usr/local/lib:/lib:/usr/lib:/usr/lib/libmilter)
+  SMPATH=`echo ../sendmail-*/obj.*/libsm`
+  AC_PATH_PROG(LIBSM, libsm.a, no, $SMPATH:/usr/local/lib:/lib:/usr/lib:/usr/lib/libmilter)
+  
+--- 625,631 ----
+  
+  dnl find libmilter.a and libsm.a
+  SMPATH=`echo ../sendmail-*/obj.*/libmilter`
+! AC_PATH_PROG(LIBMILTER, libmilter.a, no, $MILTERLIB:$SMPATH:/usr/local/lib:/lib64:/lib:/usr/lib64:/usr/lib:/usr/lib/libmilter)
+  SMPATH=`echo ../sendmail-*/obj.*/libsm`
+  AC_PATH_PROG(LIBSM, libsm.a, no, $SMPATH:/usr/local/lib:/lib:/usr/lib:/usr/lib/libmilter)
+  
