Paul J Stevens wrote:

Hi all,

Since we've been talking about using glib I decided to make a small patch to enable glib-2.0 support in dbmail.

I'm green at autoconf stuff, but it does the trick.

Please run autoconf and automake to regenerate configure and stuff, of course.

Its always safer to run 'autoreconf -f'. It will run the whole chain of commands.





------------------------------------------------------------------------

#! /bin/sh -e
## 05_glib.dpatch by  <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

if [ $# -lt 1 ]; then
   echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
   exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
   -patch) patch -p1 ${patch_opts} < $0;;
   -unpatch) patch -R -p1 ${patch_opts} < $0;;
   *)
       echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
       exit 1;;
esac

exit 0

@DPATCH@
diff -urNad /usr/src/dbmail2/dbmail-2.0/acinclude.m4 dbmail-2.0/acinclude.m4
--- /usr/src/dbmail2/dbmail-2.0/acinclude.m4    2004-05-16 23:05:15.000000000 
+0200
+++ dbmail-2.0/acinclude.m4     2004-05-16 23:09:29.000000000 +0200
@@ -403,4 +403,24 @@
unset ac_compile_warnings_opt
])

-                                                       
+dnl DBMAIL_CHECK_GLIB
+dnl
+AC_DEFUN(DBMAIL_CHECK_GLIB, [dnl
+#Look for include files and libs needed to link
+#use the configuration utilities (pkg-config for this)
+AC_PATH_PROG(glibconfig,pkg-config)
+if test [ -z "$glibconfig" ]
+then
+       AC_MSG_ERROR([pkg-config executable not found. Make sure pkg-config is 
in your path])
+else
+       AC_MSG_CHECKING([GLib headers])
+       ac_glib_cflags=`${glibconfig} --cflags glib-2.0`
+       CFLAGS="$CFLAGS $ac_glib_cflags"
+       AC_MSG_RESULT([$ac_glib_cflags])
+        AC_MSG_CHECKING([Glib libraries])
+       ac_glib_libs=`${glibconfig} --libs glib-2.0`
+       LDFLAGS="$LDFLAGS $ac_glib_libs"
+        AC_MSG_RESULT([$ac_glib_libs])
+fi
+])
+
diff -urNad /usr/src/dbmail2/dbmail-2.0/aclocal.m4 dbmail-2.0/aclocal.m4
--- /usr/src/dbmail2/dbmail-2.0/aclocal.m4      2004-05-16 23:05:15.000000000 
+0200
+++ dbmail-2.0/aclocal.m4       2004-05-16 23:09:29.000000000 +0200
@@ -440,3 +440,24 @@
done<<>>dnl>>)
changequote([,]))])

+dnl DBMAIL_CHECK_GLIB
+dnl
+AC_DEFUN(DBMAIL_CHECK_GLIB, [dnl
+#Look for include files and libs needed to link
+#use the configuration utilities (pkg-config for this)
+AC_PATH_PROG(glibconfig,pkg-config)
+if test [ -z "$glibconfig" ]
+then
+       AC_MSG_ERROR([pkg-config executable not found. Make sure pkg-config is 
in your path])
+else
+       AC_MSG_CHECKING([glib headers])
+       ac_glib_cflags=`${glibconfig} --cflags glib-2.0`
+       CFLAGS="$CFLAGS $ac_glib_cflags"
+       AC_MSG_RESULT([$ac_glib_cflags])
+        AC_MSG_CHECKING([glib libraries])
+       ac_glib_libs=`${glibconfig} --libs glib-2.0`
+       LDFLAGS="$LDFLAGS $ac_glib_libs"
+        AC_MSG_RESULT([$ac_glib_libs])
+fi
+])
+
diff -urNad /usr/src/dbmail2/dbmail-2.0/configure.in dbmail-2.0/configure.in
--- /usr/src/dbmail2/dbmail-2.0/configure.in    2004-05-16 23:05:15.000000000 
+0200
+++ dbmail-2.0/configure.in     2004-05-16 23:09:29.000000000 +0200
@@ -41,6 +41,7 @@
DBMAIL_CHECK_LDAP_LIBS
DBMAIL_SIEVE_CONF
DBMAIL_CHECK_SIEVE_LIBS
+DBMAIL_CHECK_GLIB

AC_PROG_CC
AC_COMPILE_WARNINGS
------------------------------------------------------------------------

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to