Ok, here is the patch:
diff -u milter-greylist.bak/config.h.in milter-greylist/config.h.in
--- milter-greylist.bak/config.h.in 2007-08-20 15:14:12.000000000 +0200
+++ milter-greylist/config.h.in 2008-09-26 13:23:30.000000000 +0200
@@ -90,6 +90,10 @@
/* we use libspf_alt */
#undef HAVE_SPF_ALT
+/* we use libdkim */
+#undef USE_DKIM
+
+
/* Define to 1 if `stat' has the bug that it succeeds when given the
zero-length file name argument. */
#undef HAVE_STAT_EMPTY_STRING_BUG
@@ -157,6 +161,9 @@
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
+/* Define to 1 if stdbool.h exists. */
+#undef HAVE_STDBOOL_H
+
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
Only in milter-greylist: config.status
diff -u milter-greylist.bak/configure.ac milter-greylist/configure.ac
--- milter-greylist.bak/configure.ac 2008-08-21 23:05:35.000000000 +0200
+++ milter-greylist/configure.ac 2008-09-26 13:48:51.000000000 +0200
@@ -91,11 +91,6 @@
AC_ARG_WITH(openssl,
[ --with-openssl=DIR Find OpenSSL in DIR],
[LDFLAGS=$LDFLAGS" -L$withval/lib -Wl,$rpath$withval/lib"])
-AC_ARG_WITH(libdkim,
- [ --with-libdkim=DIR Find Sendmail's libdkim in DIR],
- [CFLAGS=$CFLAGS" -I$withval/include -DUSE_DKIM"
- LIBS="-lcrypto -ldkim $LIBS"
- LDFLAGS=$LDFLAGS" -L$withval/lib -Wl,$rpath$withval/lib"])
AC_ARG_WITH(openldap,
[ --with-openldap=DIR Find OpenLDAP in DIR],
[CFLAGS=$CFLAGS" -I$withval/include -DUSE_LDAP -DLDAP_DEPRECATED"
@@ -119,7 +114,7 @@
# Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h
strings.h sys/socket.h sys/time.h syslog.h unistd.h sys/param.h netdb.h
getopt.h sys/cdefs.h arpa/nameser.h])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h
strings.h sys/socket.h sys/time.h syslog.h unistd.h sys/param.h netdb.h
getopt.h sys/cdefs.h arpa/nameser.h stdbool.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
@@ -263,6 +258,27 @@
LDFLAGS=$SAVEDLDFLAGS
CFLAGS=$SAVEDCFLAGS
+# Try to configure for libdkim
+SAVEDLDFLAGS=$LDFLAGS
+SAVEDCFLAGS=$CFLAGS
+AC_ARG_WITH(libdkim,
+ [ --with-libdkim=DIR Find Sendmail's libdkim in DIR],
+ [LDFLAGS=$LDFLAGS" -L$withval/lib -Wl,$rpath$withval/lib"
+ CFLAGS=$CFLAGS" -I$withval/include"
+ AC_CHECK_LIB([dkim -lsm -lcrypto], dkim_init, [
+ SAVEDLDFLAGS=$LDFLAGS
+ SAVEDCFLAGS=$CFLAGS
+ LIBS=$LIBS" -ldkim -lcrypto"
+ AC_DEFINE([USE_DKIM], [], [we use libdkim])
+ ], [echo "libdkim not found, check config.log for details"
+ echo "Remove --with-dkim to build without DKIM support"
+ exit 1;])
+])
+LDFLAGS=$SAVEDLDFLAGS
+CFLAGS=$SAVEDCFLAGS
+
+
+
AC_ARG_ENABLE(rpath,
[ --disable-rpath do not hardcode runtime library paths],
[if test x$enableval = xno; then
Common subdirectories: milter-greylist.bak/CVS and milter-greylist/CVS
diff -u milter-greylist.bak/dkimcheck.c milter-greylist/dkimcheck.c
--- milter-greylist.bak/dkimcheck.c 2008-08-21 23:05:35.000000000 +0200
+++ milter-greylist/dkimcheck.c 2008-09-26 13:46:01.000000000 +0200
@@ -40,6 +40,9 @@
#endif
#endif
#include <ctype.h>
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
#include <dkim.h>
#include <errno.h>
#include <err.h>
diff -u milter-greylist.bak/milter-greylist.h
milter-greylist/milter-greylist.h
--- milter-greylist.bak/milter-greylist.h 2008-08-21
23:05:35.000000000 +0200
+++ milter-greylist/milter-greylist.h 2008-09-26 13:57:43.000000000 +0200
@@ -38,6 +38,9 @@
#include <netdb.h>
#ifdef USE_DKIM
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
#include <dkim.h>
#endif
Ondrej Valousek wrote:
>
> I would like to, really, but unfortunately I am not very familiar with
> configure/configure.ac scripts.
> I would happily contribute C patch, but that's not what we need here....
> Anyone else?
>
> Emmanuel Dreyfus wrote:
> >
> > On Thu, Sep 25, 2008 at 04:31:10PM +0200, Ondrej Valousek wrote:
> > > Obviously, there is nothing like that in milter-greylist package so
> > > hence the compiler errors.
> > > Can we have it fixed please?
> >
> > Sure. Will you contribute the patch?
> >
> > --
> > Emmanuel Dreyfus
> > manu@... <mailto:manu%40netbsd.org> <mailto:manu%40netbsd.org>
> >
> >
>
>Message
Re: [milter-greylist] DKIM support
2008-09-26 by Ondrej Valousek
Attachments
- No local attachments were found for this message.