From: Radosław Korzeniewski Date: Tue, 2 Feb 2021 12:51:30 +0000 (+0100) Subject: Add PGSQL detection for macOS and MacPorts. X-Git-Tag: Release-11.0.1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6594b94f82f2db22cff374503637e6573986a86;p=thirdparty%2Fbacula.git Add PGSQL detection for macOS and MacPorts. --- diff --git a/bacula/autoconf/bacula-macros/db.m4 b/bacula/autoconf/bacula-macros/db.m4 index 4e0661dfc..1a94b45f5 100644 --- a/bacula/autoconf/bacula-macros/db.m4 +++ b/bacula/autoconf/bacula-macros/db.m4 @@ -919,8 +919,17 @@ AC_HELP_STRING([--with-postgresql@<:@=DIR@:>@], [Include PostgreSQL support. DIR fi POSTGRESQL_BINDIR=$withval/bin else - AC_MSG_RESULT(no) - AC_MSG_ERROR(Invalid PostgreSQL directory $withval - unable to find libpq-fe.h under $withval) + localloc=`find $withval/include/postgresql* -name libpq-fe.h | head -1` + if test "x$localloc" != "x"; then + inclocaldir=`ls -d $withval/include/postgresql* | head -1` + liblocaldir=`ls -d $withval/lib/postgresql* | head -1` + POSTGRESQL_INCDIR=$inclocaldir + POSTGRESQL_LIBDIR=$liblocaldir + POSTGRESQL_BINDIR=$withval/bin + else + AC_MSG_RESULT(no) + AC_MSG_ERROR(Invalid PostgreSQL directory $withval - unable to find libpq-fe.h under $withval) + fi fi AC_DEFINE(HAVE_POSTGRESQL, 1, [Set if you have an PostgreSQL Database]) AC_MSG_RESULT(yes)