-improve postgres check

This commit is contained in:
Christian Grothoff 2022-12-08 14:20:22 +01:00
parent 87198f124c
commit 329b7692ea
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -246,9 +246,18 @@ LIBS=$LIBS_SAVE
# test for postgres # test for postgres
AX_LIB_POSTGRESQL([13.0]) AX_LIB_POSTGRESQL([13.0])
AS_IF([test "x$found_postgresql" = "xyes"],[postgres=true]) AS_IF([test "x$found_postgresql" = "xyes"],
[SAVE_CPPFLAGS="$CPPFLAGS"
AM_CONDITIONAL(HAVE_POSTGRESQL, test x$postgres = xtrue) CPPFLAGS="$POSTGRES_CPPFLAGS $CPPFLAGS"
AC_CHECK_HEADERS([libpq-fe.h], [postgres=1], [postgres=0])])
AS_IF([test "x$postgres" != "x1"],
[AC_MSG_ERROR([[
***
*** You need libpq(-dev) >= 13.0 to build this program.
*** ]])])
AM_CONDITIONAL([HAVE_POSTGRESQL], [test "x$postgres" = "x1"])
AC_DEFINE_UNQUOTED([HAVE_POSTGRESQL], [$postgres],
[Define to 1 if Postgres is available])
# Check for GNUnet's libgnunetpq. # Check for GNUnet's libgnunetpq.
libgnunetpq=0 libgnunetpq=0