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. Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx> --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 6ee29ce321d0..70eed9dc1745 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]) -- 2.35.1