[build] PGSQL_CFLAGS with pkg-config for postgres (#2965)

x-ref:
  "pg_config is deprecated to build postgres client applications"
  https://redmine.lighttpd.net/issues/2965
This commit is contained in:
Glenn Strauss 2019-09-11 02:04:44 -04:00
parent 0e749c1c84
commit e790203a75
1 changed files with 4 additions and 4 deletions

View File

@ -298,7 +298,7 @@ AC_ARG_WITH([pgsql],
)
AC_MSG_RESULT([$WITH_PGSQL])
PGSQL_INCLUDE=
PGSQL_CFLAGS=
PGSQL_LIBS=
if test "$WITH_PGSQL" != no; then
@ -320,12 +320,12 @@ if test "$WITH_PGSQL" != no; then
AC_MSG_ERROR([pg_config not exists or not executable, use --with-pgsql=path-to-pg_config])
fi
PGSQL_INCLUDE="-I`"$PGSQL_CONFIG" --includedir`"
PGSQL_CFLAGS="-I`"$PGSQL_CONFIG" --includedir`"
PGSQL_LIBS="-L`"$PGSQL_CONFIG" --libdir` -lpq"
fi
AC_MSG_CHECKING([for PgSQL includes at])
AC_MSG_RESULT([$PGSQL_INCLUDE])
AC_MSG_RESULT([$PGSQL_CFLAGS])
AC_MSG_CHECKING([for PgSQL libraries at])
AC_MSG_RESULT([$PGSQL_LIBS])
@ -335,7 +335,7 @@ fi
AM_CONDITIONAL([BUILD_WITH_PGSQL], [test "$WITH_PGSQL" != no])
AC_SUBST([PGSQL_LIBS])
AC_SUBST([PGSQL_INCLUDE])
AC_SUBST([PGSQL_CFLAGS])
dnl Checks for libdbi library
AC_MSG_NOTICE([----------------------------------------])