]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
build: fix pgsql fall-back configuration of CFLAGS
authorJeremy Sowden <jeremy@azazel.net>
Tue, 13 Dec 2022 11:19:51 +0000 (11:19 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 14 Mar 2023 22:33:33 +0000 (23:33 +0100)
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 <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
configure.ac

index 6ee29ce321d0045bb822968a1acdbc2e1ecb8d8a..70eed9dc17451092c33a6c454d794e0ed8f5126d 100644 (file)
@@ -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])