From: Timo Sirainen Date: Fri, 7 Mar 2003 00:40:33 +0000 (+0200) Subject: pgsql check fixes X-Git-Tag: 1.1.alpha1~4819 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=337ad29db9cd6fb99a17685050924b6f1a16fd6f;p=thirdparty%2Fdovecot%2Fcore.git pgsql check fixes --HG-- branch : HEAD --- diff --git a/configure.in b/configure.in index a086310db4..efbb45a2a4 100644 --- a/configure.in +++ b/configure.in @@ -794,17 +794,29 @@ if test $want_pgsql = yes; then done old_LIBS=$LIBS - LIBS="$LIBS -L$PGSQL_LIBDIR" + if test "$PGSQL_LIBDIR" != ""; then + LIBS="$LIBS -L$PGSQL_LIBDIR" + fi AC_CHECK_LIB(pq, PQconnectdb, [ - AC_CHECK_HEADER($PGSQL_INCLUDE/libpq-fe.h, [ - AUTH_CFLAGS="$AUTH_CFLAGS -I$PGSQL_INCLUDE" - AUTH_LIBS="$AUTH_LIBS -L$PGSQL_LIBDIR -lpq" + old_CPPFLAGS=$CPPFLAGS + if test "$PGSQL_INCLUDE" != ""; then + CPPFLAGS="$CPPFLAGS -I $PGSQL_INCLUDE" + fi + AC_CHECK_HEADER(libpq-fe.h, [ + if test "$PGSQL_INCLUDE" != ""; then + AUTH_CFLAGS="$AUTH_CFLAGS -I$PGSQL_INCLUDE" + fi + if test "$PGSQL_LIBDIR" != ""; then + AUTH_LIBS="$AUTH_LIBS -L$PGSQL_LIBDIR" + fi + AUTH_LIBS="$AUTH_LIBS -lpq" AC_DEFINE(USERDB_PGSQL,, Build with PostgreSQL support) AC_DEFINE(PASSDB_PGSQL,, Build with PostgreSQL support) userdb="$userdb pgsql" passdb="$passdb pgsql" ]) + CPPFLAGS=$old_CPPFLAGS ]) LIBS=$old_LIBS fi