Check if the specified MySQL database exists,
if yes set your environment variable to that database name
else unset your environment variable
Example:
AC_CHECK_MYSQL_DB(DBNAME, [fishmarket])
if test x$DBNAME = xfishmarket; then
bla..bla..bla..
else
bla..bla..bla..
fi