Menu

Commit [r13057]  Maximize  Restore  History

configure: restore --with-pg-all, and find PostgreSQL where RHEL puts it

Reported: PostgreSQL is no longer detected from SVN, while the released
tarball detects it and builds. Alma Linux 8, PostgreSQL 18, invoked as

./configure --with-pg-all=/usr/pgsql-18

--with-pg-all was a shorthand in the old configure.in that pointed every
PostgreSQL component at one prefix. The rewrite dropped it, and autoconf
only WARNS about an unrecognised --with-... - so configure completed,
the option did nothing, and PostgreSQL silently went missing. It is
restored here, setting --with-postgresql and --with-ecpg unless those
were named explicitly.

This did not show up on Debian or Ubuntu because libpq.pc is on the
default pkg-config path there, so detection succeeded anyway and masked
the ignored option. On RHEL, Alma and Rocky the PGDG packages install
under /usr/pgsql-NN with nothing on the default PATH or PKG_CONFIG_PATH,
so both pkg-config and a bare pg_config come up empty.

So detection also gained a fallback chain: pkg-config, then pg_config on
PATH, then pg_config under /usr/pgsql-*, /usr/local/pgsql-* and /opt/*
newest first, then a direct search for libpq-fe.h in the usual include
directories. Whatever answers is then verified by compiling against
libpq-fe.h and linking PQconnectdb, so a stale pg_config reports "not
found" rather than breaking the build later.

Verified: --with-pg-all against a /usr/pgsql-18 style prefix gives
-I<prefix>/include and -L<prefix>/lib -lpq; and with pkg-config unable
to see libpq, the pg_config fallback still finds it.

mikeaubury 2026-09-02

changed /aubit4glsrc/trunk/configure
changed /aubit4glsrc/trunk/configure.ac
changed /aubit4glsrc/trunk/incl/a4gl_incl_config.h.in
changed /aubit4glsrc/trunk/m4/aubit_sql.m4
/aubit4glsrc/trunk/configure Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/configure.ac Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/incl/a4gl_incl_config.h.in Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/m4/aubit_sql.m4 Diff Switch to side-by-side view
Loading...