diff --git a/postfix.changes b/postfix.changes index 056da22..255d63e 100644 --- a/postfix.changes +++ b/postfix.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Mar 1 16:23:13 UTC 2019 - Reinhard Max + +- PostrgeSQL's pg_config is meant for linking server extensions, + use libpq's pkg-config instead, if available. + This is needed to fix build with PostgreSQL 11. + ------------------------------------------------------------------- Thu Feb 7 18:22:14 UTC 2019 - chris@computersalat.de diff --git a/postfix.spec b/postfix.spec index b6504f6..6721ed0 100644 --- a/postfix.spec +++ b/postfix.spec @@ -207,11 +207,17 @@ else export AUXLIBS="$AUXLIBS -lsasl2" fi # +set -x export CCARGS="${CCARGS} -DHAS_MYSQL $(mysql_config --cflags)" export AUXLIBS_MYSQL="$(mysql_config --libs)" # -export CCARGS="${CCARGS} -DHAS_PGSQL -I$(pg_config --includedir)" -export AUXLIBS_PGSQL="-lpq" +if pkg-config libpq ; then + export CCARGS="${CCARGS} -DHAS_PGSQL $(pkg-config libpq --cflags)" + export AUXLIBS_PGSQL="$(pkg-config libpq --libs)" +else + export CCARGS="${CCARGS} -DHAS_PGSQL -I$(pg_config --includedir)" + export AUXLIBS_PGSQL="-lpq" +fi # %if %{with lmdb} export CCARGS="${CCARGS} -DHAS_LMDB -I/usr/local/include" \