[dovecot-cvs] dovecot AUTHORS,1.5,1.6 configure.in,1.159,1.160

cras at procontrol.fi cras at procontrol.fi
Mon May 10 04:47:10 EEST 2004


Update of /home/cvs/dovecot
In directory talvi:/tmp/cvs-serv31516

Modified Files:
	AUTHORS configure.in 
Log Message:
MySQL authentication patch by Matther Reimer



Index: AUTHORS
===================================================================
RCS file: /home/cvs/dovecot/AUTHORS,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- AUTHORS	27 Apr 2003 01:05:34 -0000	1.5
+++ AUTHORS	10 May 2004 01:47:08 -0000	1.6
@@ -6,6 +6,8 @@
 
 Alex Howansky <alex at wankwood.com> (src/auth/*-pgsql.c)
 
+Matthew Reimer <mreimer at vpop.net> (src/auth/*-mysql.c)
+
 This product includes software developed by Computing Services
 at Carnegie Mellon University (http://www.cmu.edu/computing/).
 (src/lib/base64.c, src/lib/mkgmtime.c)

Index: configure.in
===================================================================
RCS file: /home/cvs/dovecot/configure.in,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -d -r1.159 -r1.160
--- configure.in	10 May 2004 00:45:45 -0000	1.159
+++ configure.in	10 May 2004 01:47:08 -0000	1.160
@@ -134,6 +134,15 @@
 	fi,
 	want_pgsql=no)
 
+AC_ARG_WITH(mysql,
+[  --with-mysql            Build with MySQL support],
+	if test x$withval = xno; then
+		want_mysql=no
+	else
+		want_mysql=yes
+	fi,
+	want_mysql=no)
+
 AC_ARG_WITH(cyrus-sasl2,
 [  --with-cyrus-sasl2      Build with Cyrus SASL 2 library support],
 	if test x$withval = xno; then
@@ -1016,6 +1025,25 @@
 	LIBS=$old_LIBS
 fi
 
+if test $want_mysql = yes; then
+	AC_CHECK_LIB(mysqlclient, mysql_init, [
+		AC_CHECK_HEADER(mysql.h,, [
+			AC_CHECK_HEADER(mysql/mysql.h, [
+				AUTH_CFLAGS="$AUTH_CFLAGS -DHAVE_MYSQL_MYSQL_H"
+			], want_mysql = no)
+		])
+	], want_mysql = no)
+
+	if test $want_mysql = yes; then
+		AUTH_LIBS="$AUTH_LIBS -lmysqlclient"
+
+        	AC_DEFINE(USERDB_MYSQL,, Build with MySQL support)
+		AC_DEFINE(PASSDB_MYSQL,, Build with MySQL support)
+		userdb="$userdb mysql"
+		passdb="$passdb mysql"
+	fi
+fi
+
 if test $want_vpopmail = yes; then
 	vpopmail_home="`echo ~vpopmail`"
 	vpop_libdeps="$vpopmail_home/etc/lib_deps"



More information about the dovecot-cvs mailing list