aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2004-04-22 13:59:24 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2004-04-22 13:59:24 +0000
commitb6c1517702dfa975f06c3e473dba828b6b5e653f (patch)
tree98e88a093242d5f5338b00851af141cd4413a88a /configure.ac
parentae267a4ce9e37b191f4e0cfb745e355fb3b5880d (diff)
downloadanubis-b6c1517702dfa975f06c3e473dba828b6b5e653f.tar.gz
anubis-b6c1517702dfa975f06c3e473dba828b6b5e653f.tar.bz2
Added check for Postgres libraries
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 29 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 6891f48..e479c19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -195,7 +195,8 @@ MU_CHECK_GSASL(0.0.2, [
AC_HELP_STRING([--with-mysql],
[Configure to work with MySQL]),
[case $withval in
- yes) ANUBIS_CHECK_LIB(mysqlclient,
+ yes) USE_SQL=0
+ ANUBIS_CHECK_LIB(mysqlclient,
mysql_real_connect,
[-lm],
[ USE_SQL=1
@@ -207,12 +208,39 @@ MU_CHECK_GSASL(0.0.2, [
[AC_MSG_FAILURE([The requested library libmysqlclient is not found or is unusable])],
[/usr/local/lib/mysql /usr/lib/mysql])
if test "$USE_SQL" = "1" ;then
+ WITH_SQL=1
LIBS="$LIBS $anubis_cv_lib_mysqlclient"
fi
;;
no) ;;
esac])
+ AC_ARG_WITH(postgres,
+ AC_HELP_STRING([--with-postgres],
+ [Configure to work with Postgres]),
+ [case $withval in
+ yes) USE_SQL=0
+ ANUBIS_CHECK_LIB(pq,
+ PQconnectStart,
+ [],
+ [ USE_SQL=1
+ AC_DEFINE(WITH_PGSQL,1,
+ [Define to 1 to enable PostgreSQL interface])
+ ],
+ [AC_MSG_FAILURE([The requested library libpq is not found or is unusable])],
+ [/usr/local/pgsql/lib /usr/pgsql/lib])
+ if test "$USE_SQL" = "1" ;then
+ WITH_SQL=1
+ LIBS="$LIBS $anubis_cv_lib_pq"
+ fi
+ ;;
+ no) ;;
+ esac])
+
+ if test "$WITH_SQL" = "1"; then
+ AC_DEFINE(WITH_SQL, 1, [Define this if you use an SQL interface])
+ fi
+
AC_LIBOBJ(lbuf)])
dnl Use option --without-gnutls to NOT compile GnuTLS library support.

Return to:

Send suggestions and report system problems to the System administrator.