1dnl Checks for mysql 2MYSQL_LIBS= 3AC_ARG_WITH([mysql], 4 AC_HELP_STRING([--with-mysql], 5 [enable mysql support (default no)]), 6 [use_mysql=${withval}],,) 7AH_TEMPLATE(HAVE_MYSQL,[Define if you have libmysql]) 8 9if test x"$use_mysql" = x"yes"; then 10 AC_MSG_CHECKING(for MySql support) 11 have_mysql=no 12 AC_TRY_COMPILE([ 13 #include <mysql/mysql.h> 14 ],[ 15 ],[ 16 have_mysql=yes 17 ]) 18 AC_MSG_RESULT($have_mysql) 19 20 if test x$have_mysql != xyes; then 21 AC_MSG_ERROR([*** Can't find the MySql library Try: http://www.mysql.com]) 22 else 23 MYSQL_CFLAGS=`mysql_config --cflags` 24 MYSQL_CFLAGS="$MYSQL_CFLAGS -DHAVE_MYSQL=1" 25 MYSQL_LIBS=`mysql_config --libs` 26 fi 27fi 28AC_SUBST(MYSQL_LIBS) 29AC_SUBST(MYSQL_CFLAGS) 30 31dnl Checks for pgsql 32PGSQL_LIBS= 33AC_ARG_WITH([pgsql], 34 AC_HELP_STRING([--with-pgsql], 35 [enable pgsql support (default no)]), 36 [use_pgsql=${withval}],,) 37AH_TEMPLATE(HAVE_PGSQL,[Define if you have libpq]) 38 39if test x"$use_pgsql" = x"yes"; then 40 AC_MSG_CHECKING(for PGSql support) 41 have_pgsql=no 42 AC_TRY_COMPILE([ 43 #include <pgsql/libpq-fe.h> 44 ],[ 45 ],[ 46 have_pgsql=yes 47 ]) 48 AC_MSG_RESULT($have_pgsql) 49 50 if test x$have_pgsql != xyes; then 51 AC_MSG_ERROR([*** Can't find the PGSql library Try: http://www.postgresql.org]) 52 else 53 AC_DEFINE(HAVE_PGSQL) 54 PGSQL_LIBS="-lpq" 55 fi 56fi 57AC_SUBST(PGSQL_LIBS) 58 59