This patch fixes it so you must specify either --with-mysql or
--with-pgsql otherwise it will not build (since you must have a database
backend).  Patched against 11/21/2002 CVS.

Patch is attached and all my patches are available on
http://dbmail.adiis.net

automake was also re-run to update the Makefile.in's to the latest
automake version.


-- 
Ryan Butler <[EMAIL PROTECTED]>
ADI Internet Solutions
diff -ur dbmail/Makefile.in dbmail.working/Makefile.in
--- dbmail/Makefile.in	Fri Jul 26 16:34:15 2002
+++ dbmail.working/Makefile.in	Thu Nov 21 09:44:43 2002
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -177,7 +177,7 @@
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 DEP_FILES =  .deps/bounce.P .deps/dbmd5.P .deps/debug.P .deps/forward.P \
 .deps/imap4.P .deps/imapcommands.P .deps/imapd.P .deps/imaputil.P \
@@ -203,7 +203,7 @@
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in 
 	cd $(srcdir) && $(ACLOCAL)
 
-config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES)
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	$(SHELL) ./config.status --recheck
 $(srcdir)/configure: @[EMAIL PROTECTED](srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
 	cd $(srcdir) && $(AUTOCONF)
@@ -348,7 +348,7 @@
 	dot_seen=no; \
 	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
 	  rev="$$subdir $$rev"; \
-	  test "$$subdir" = "." && dot_seen=yes; \
+	  test "$$subdir" != "." || dot_seen=yes; \
 	done; \
 	test "$$dot_seen" = "no" && rev=". $$rev"; \
 	target=`echo $@ | sed s/-recursive//`; \
diff -ur dbmail/aclocal.m4 dbmail.working/aclocal.m4
--- dbmail/aclocal.m4	Fri Jul 26 16:17:05 2002
+++ dbmail.working/aclocal.m4	Thu Nov 21 09:44:39 2002
@@ -155,6 +155,26 @@
 
 WARN=0
 # Make sure we only select one, mysql or pgsql
+if test "${mysqlheadername-x}" = "x"
+then
+  if test "${pgsqlheadername-x}" = "x"
+  then
+    NEITHER=1
+    mysqlheadername=""
+    MYSQLINC=""
+    PGSQLINC=""
+  fi
+fi
+if test "$NEITHER" = 1
+  then
+     AC_MSG_ERROR([
+
+     You have to specify --with-mysql or --with-pgsql to build.
+])
+fi
+
+
+
 if test ! "${mysqlheadername-x}" = "x"
 then
   if test ! "${pgsqlheadername-x}" = "x"
diff -ur dbmail/configure dbmail.working/configure
--- dbmail/configure	Fri Sep 13 08:56:44 2002
+++ dbmail.working/configure	Thu Nov 21 09:44:41 2002
@@ -871,6 +871,26 @@
 
 WARN=0
 # Make sure we only select one, mysql or pgsql
+if test "${mysqlheadername-x}" = "x"
+then
+  if test "${pgsqlheadername-x}" = "x"
+  then
+    NEITHER=1
+    mysqlheadername=""
+    MYSQLINC=""
+    PGSQLINC=""
+  fi
+fi
+if test "$NEITHER" = 1
+  then
+     { echo "configure: error: 
+
+     You have to specify --with-mysql or --with-pgsql to build.
+" 1>&2; exit 1; }
+fi
+
+
+
 if test ! "${mysqlheadername-x}" = "x"
 then
   if test ! "${pgsqlheadername-x}" = "x"
@@ -897,7 +917,7 @@
   if test "$withval" != "yes"
   then
     echo $ac_n "checking for mysql.h (user supplied)""... $ac_c" 1>&6
-echo "configure:901: checking for mysql.h (user supplied)" >&5
+echo "configure:921: checking for mysql.h (user supplied)" >&5
     if test -r "$mysqlheadername/mysql.h"
       then
       # found
@@ -915,7 +935,7 @@
   else
     # Lets look in our standard paths
     echo $ac_n "checking for mysql.h""... $ac_c" 1>&6
-echo "configure:919: checking for mysql.h" >&5
+echo "configure:939: checking for mysql.h" >&5
     for mysqlpaths in $mysqlheaderpaths
     do
       if test -r "$mysqlpaths/mysql.h"
@@ -942,7 +962,7 @@
   if test "$withval" != "yes"
   then
     echo $ac_n "checking for libpq-fe.h (user supplied)""... $ac_c" 1>&6
-echo "configure:946: checking for libpq-fe.h (user supplied)" >&5
+echo "configure:966: checking for libpq-fe.h (user supplied)" >&5
     if test -r "$pgsqlheadername/libpq-fe.h"
       then
       # found
@@ -960,7 +980,7 @@
   else
     # Lets look in our standard paths
     echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
-echo "configure:964: checking for libpq-fe.h" >&5
+echo "configure:984: checking for libpq-fe.h" >&5
     for pgsqlpaths in $pgsqlheaderpaths
     do
       if test -r "$pgsqlpaths/libpq-fe.h"
@@ -984,7 +1004,7 @@
 if test ! "${mysqlheadername-x}" = "x"
 then
   echo $ac_n "checking for mysql_real_connect in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:988: checking for mysql_real_connect in -lmysqlclient" >&5
+echo "configure:1008: checking for mysql_real_connect in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_real_connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -992,7 +1012,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 996 "configure"
+#line 1016 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1003,7 +1023,7 @@
 mysql_real_connect()
 ; return 0; }
 EOF
-if { (eval echo configure:1007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1035,7 +1055,7 @@
   if test ! "${pgsqlheadername-x}" = "x"
   then
     echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
-echo "configure:1039: checking for PQconnectdb in -lpq" >&5
+echo "configure:1059: checking for PQconnectdb in -lpq" >&5
 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1043,7 +1063,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1047 "configure"
+#line 1067 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1054,7 +1074,7 @@
 PQconnectdb()
 ; return 0; }
 EOF
-if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1089,7 +1109,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1093: checking for $ac_word" >&5
+echo "configure:1113: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1119,7 +1139,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1123: checking for $ac_word" >&5
+echo "configure:1143: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1170,7 +1190,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1174: checking for $ac_word" >&5
+echo "configure:1194: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1202,7 +1222,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1206: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1226: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1213,12 +1233,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1217 "configure"
+#line 1237 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1244,12 +1264,12 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1248: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1268: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1253: checking whether we are using GNU C" >&5
+echo "configure:1273: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1258,7 +1278,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1277,7 +1297,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1281: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1301: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1309,12 +1329,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1313: checking for working const" >&5
+echo "configure:1333: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1318 "configure"
+#line 1338 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1363,7 +1383,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1384,21 +1404,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1388: checking for inline" >&5
+echo "configure:1408: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1395 "configure"
+#line 1415 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
diff -ur dbmail/mysql/Makefile.in dbmail.working/mysql/Makefile.in
--- dbmail/mysql/Makefile.in	Fri Jul 26 16:22:43 2002
+++ dbmail.working/mysql/Makefile.in	Thu Nov 21 09:44:44 2002
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -68,11 +68,12 @@
 SQLLIB = @SQLLIB@
 VERSION = @VERSION@
 
[EMAIL PROTECTED]@AM_CFLAGS = -I @MYSQLINC@
[EMAIL PROTECTED]@AM_CFLAGS = @[EMAIL PROTECTED] @MYSQLINC@
 
[EMAIL PROTECTED]@lib_LIBRARIES = libmysqldbmail.a
[EMAIL PROTECTED]@lib_LIBRARIES = @[EMAIL PROTECTED]
 
[EMAIL PROTECTED]@libmysqldbmail_a_SOURCES = dbauthmysql.c dbmysql.c dbmsgbufmysql.c                            dbsearchmysql.c
[EMAIL PROTECTED]@libmysqldbmail_a_SOURCES = @[EMAIL PROTECTED] dbmysql.c dbmsgbufmysql.c \
[EMAIL PROTECTED]@                           dbsearchmysql.c
 mkinstalldirs = $(SHELL) $(top_srcdir)/buildtools/mkinstalldirs
 CONFIG_CLEAN_FILES = 
 LIBRARIES =  $(lib_LIBRARIES)
@@ -95,7 +96,7 @@
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 DEP_FILES =  .deps/dbauthmysql.P .deps/dbmsgbufmysql.P .deps/dbmysql.P \
 .deps/dbsearchmysql.P
diff -ur dbmail/pgsql/Makefile.in dbmail.working/pgsql/Makefile.in
--- dbmail/pgsql/Makefile.in	Fri Jul 26 16:22:43 2002
+++ dbmail.working/pgsql/Makefile.in	Thu Nov 21 09:44:44 2002
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -68,9 +68,9 @@
 SQLLIB = @SQLLIB@
 VERSION = @VERSION@
 
[EMAIL PROTECTED]@AM_CFLAGS = -I @PGSQLINC@
[EMAIL PROTECTED]@lib_LIBRARIES = libpgsqldbmail.a
[EMAIL PROTECTED]@libpgsqldbmail_a_SOURCES = dbauthpgsql.c dbpgsql.c dbmsgbufpgsql.c dbsearchpgsql.c
[EMAIL PROTECTED]@AM_CFLAGS = @[EMAIL PROTECTED] @PGSQLINC@
[EMAIL PROTECTED]@lib_LIBRARIES = @[EMAIL PROTECTED]
[EMAIL PROTECTED]@libpgsqldbmail_a_SOURCES = @[EMAIL PROTECTED] dbpgsql.c dbmsgbufpgsql.c dbsearchpgsql.c
 mkinstalldirs = $(SHELL) $(top_srcdir)/buildtools/mkinstalldirs
 CONFIG_CLEAN_FILES = 
 LIBRARIES =  $(lib_LIBRARIES)
@@ -93,7 +93,7 @@
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 DEP_FILES =  .deps/dbauthpgsql.P .deps/dbmsgbufpgsql.P .deps/dbpgsql.P \
 .deps/dbsearchpgsql.P

Reply via email to