X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fautoconf%2Fbacula-macros%2Fdb.m4;h=f3cc016021680109d0e1e7a784c9ec4924854aaf;hb=refs%2Ftags%2FRelease-1.38.11;hp=8428ab8a8887c8400d1044709392caeabc72c099;hpb=d96e3d4b7a67d43be92cc420fb059cb13077b89a;p=bacula%2Fbacula diff --git a/bacula/autoconf/bacula-macros/db.m4 b/bacula/autoconf/bacula-macros/db.m4 index 8428ab8a88..f3cc016021 100644 --- a/bacula/autoconf/bacula-macros/db.m4 +++ b/bacula/autoconf/bacula-macros/db.m4 @@ -288,7 +288,12 @@ AC_ARG_WITH(postgresql, AC_MSG_ERROR("You can configure for only one database."); fi if test "$withval" = "yes"; then - if test -f /usr/local/include/libpq-fe.h; then + PG_CONFIG=`which pg_config` + if test -n "$PG_CONFIG";then + POSTGRESQL_INCDIR=`"$PG_CONFIG" --includedir` + POSTGRESQL_LIBDIR=`"$PG_CONFIG" --libdir` + POSTGRESQL_BINDIR=`"$PG_CONFIG" --bindir` + elif test -f /usr/local/include/libpq-fe.h; then POSTGRESQL_INCDIR=/usr/local/include POSTGRESQL_LIBDIR=/usr/local/lib POSTGRESQL_BINDIR=/usr/local/bin