summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac41
1 files changed, 37 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 90d684dd..b4892f68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -262,7 +262,7 @@ fi
-# SQL support
+# MySQL support
AC_ARG_ENABLE(mysql,
[AS_HELP_STRING([--enable-mysql],[Enable MySql database support @<:@default=no@:>@])],
[case "${enableval}" in
@@ -299,10 +299,42 @@ AM_CONDITIONAL(ENABLE_MYSQL, test x$enable_mysql = xyes)
AC_SUBST(mysql_cflags)
AC_SUBST(mysql_libs)
+# PostgreSQL support
+AC_ARG_ENABLE(pgsql,
+ [AS_HELP_STRING([--enable-pgsql],[Enable PostgreSQL database support @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_pgsql="yes" ;;
+ no) enable_pgsql="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-pgsql) ;;
+ esac],
+ [enable_pgsql=no]
+)
+if test "x$enable_pgsql" = "xyes"; then
+ AC_CHECK_PROG(
+ [HAVE_PGSQL_CONFIG],
+ [pg_config],
+ [yes],,,
+ )
+ if test "x${HAVE_PGSQL_CONFIG}" != "xyes"; then
+ AC_MSG_FAILURE([pg_config not found in PATH])
+ fi
+ AC_CHECK_LIB(
+ [pq],
+ [PQconnectdb],
+ [pgsql_cflags="-I`pg_config --includedir`"
+ pgsql_libs="`pg_config --libdir` -lpq"
+ ],
+ [AC_MSG_FAILURE([PgSQL library is missing])],
+ [-L`pg_config --libdir`]
+ )
+fi
+AM_CONDITIONAL(ENABLE_PGSQL, test x$enable_pgsql = xyes)
+AC_SUBST(pgsql_cflags)
+AC_SUBST(pgsql_libs)
-AC_CONFIG_FILES([Makefile doc/Makefile plugins/ommysql/Makefile])
+AC_CONFIG_FILES([Makefile doc/Makefile plugins/ommysql/Makefile plugins/ompgsql/Makefile])
AC_OUTPUT
echo "****************************************************"
@@ -311,10 +343,11 @@ echo
echo "Multithreading support enabled: $enable_pthreads"
echo "Klogd functionality enabled: $enable_klogd"
echo "Regular expressions support enabled: $enable_regexp"
-echo "Zlib compression support enabled: $enable_zlib"
+echo "Zlib compression support enabled: $enable_zlib"
echo "MySql support enabled: $enable_mysql"
+echo "PostgreSQL support enabled: $enable_pgsql"
echo "Large file support enabled: $enable_largefile"
echo "Networking support enabled: $enable_inet"
-echo "Enable GSSAPI Kerberos 5 support: $want_gssapi_krb5"
+echo "Enable GSSAPI Kerberos 5 support: $want_gssapi_krb5"
echo "Debug mode enabled: $enable_debug"