From: Jeremy Sowden Date: Tue, 13 Dec 2022 11:19:51 +0000 (+0000) Subject: build: fix pgsql fall-back configuration of CFLAGS X-Git-Tag: ulogd-2.0.9~37 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=9fa2184c303a237917b76da74f7271dca70d0d90;p=thirdparty%2Fulogd2.git build: fix pgsql fall-back configuration of CFLAGS When using mysql_config and pcap_config to configure `CFLAGS`, one requests the actual flags: $mysql_config --cflags $pcap_config --cflags By constrast, when using pg_config, one requests the include-directory: $pg_config --includedir Therefore, the `-I` option has to be explicitly added. Fixes: 20727ab8b9fc ("build: use pkg-config or pg_config for libpq") Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso --- diff --git a/configure.ac b/configure.ac index 6ee29ce..70eed9d 100644 --- a/configure.ac +++ b/configure.ac @@ -92,7 +92,7 @@ AS_IF([test "x$enable_pgsql" != "xno"], [ AS_IF([command -v "$pg_config" >/dev/null], [ - libpq_CFLAGS="`$pg_config --includedir`" + libpq_CFLAGS="-I`$pg_config --includedir`" libpq_LIBS="`$pg_config --libdir` -lpq" AC_SUBST([libpq_CFLAGS])