diff --git a/auxdir/x_ac_databases.m4 b/auxdir/x_ac_databases.m4
index b5c99bde769a0687da086ee432599f117537f238..66e4fc43d8df9bcdfb8da7022ac6c16b87164408 100644
--- a/auxdir/x_ac_databases.m4
+++ b/auxdir/x_ac_databases.m4
@@ -49,7 +49,9 @@ AC_DEFUN([X_AC_DATABASES],
 			AC_SUBST(MYSQL_CFLAGS)
 			AC_DEFINE(HAVE_MYSQL, 1, [Define to 1 if using MySQL libaries])
 	        else
-        		AC_MSG_WARN([*** MySQL test program execution failed.])
+ 			MYSQL_CFLAGS=""
+			MYSQL_LIBS=""
+       			AC_MSG_WARN([*** MySQL test program execution failed.])
 		fi        	
       	fi
 
@@ -88,6 +90,8 @@ AC_DEFUN([X_AC_DATABASES],
 			AC_SUBST(PGSQL_CFLAGS)
 			AC_DEFINE(HAVE_PGSQL, 1, [Define to 1 if using PostgreSQL libaries])
 		else	
+			PGSQL_CFLAGS=""
+			PGSQL_LIBS=""
        			AC_MSG_WARN([*** PostgreSQL test program execution failed.])
 		fi        	
       	fi
diff --git a/configure b/configure
index d4740dbf19484275909f8ff0260b64606742777a..0deef2946b48e4cf99f569023ecda36364832bbf 100755
--- a/configure
+++ b/configure
@@ -25059,7 +25059,9 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 	        else
-        		{ echo "$as_me:$LINENO: WARNING: *** MySQL test program execution failed." >&5
+ 			MYSQL_CFLAGS=""
+			MYSQL_LIBS=""
+       			{ echo "$as_me:$LINENO: WARNING: *** MySQL test program execution failed." >&5
 echo "$as_me: WARNING: *** MySQL test program execution failed." >&2;}
 		fi
       	fi
@@ -25185,6 +25187,8 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 		else
+			PGSQL_CFLAGS=""
+			PGSQL_LIBS=""
        			{ echo "$as_me:$LINENO: WARNING: *** PostgreSQL test program execution failed." >&5
 echo "$as_me: WARNING: *** PostgreSQL test program execution failed." >&2;}
 		fi