On Mon, Oct 23, 2023 at 06:06:02PM +0200, Peter Eisentraut wrote: > On 23.10.23 16:26, Tom Lane wrote: >> Also, since "PGAC_PATH_PROGS(OPENSSL, openssl)" prints the full path to >> what it found, you can at least tell after the fact that you are being >> misled, because you can cross-check that path against the -L switches >> being used for libraries. > > Yeah, that seems ok.
FWIW, I was also contemplating this one yesterday: +PKG_CHECK_MODULES(OPENSSL, openssl) Still, when I link my builds to a custom OpenSSL one, I force PATH to point to a command of openssl related to the libs used so PGAC_PATH_PROGS is more useful. I guess that everybody here does the same. It could be of course possible to show both the command from PATH and from pkg-config, but that's just confusing IMO. There may be a point in doing the same for other commands like LZ4 and Zstandard but these have been less of a pain in the buildfarm, even if we don't use them for that long, so I cannot get excited about spending more ./configure cycles for these. Please find attached a patch to move the version call close to the existing PGAC_PATH_PROGS. And of course, I'd like to do a backpatch. Is that OK? -- Michael
diff --git a/configure b/configure index c2cb1b1b24..cfd968235f 100755 --- a/configure +++ b/configure @@ -14077,6 +14077,9 @@ $as_echo_n "checking for OPENSSL... " >&6; } $as_echo "$OPENSSL" >&6; } fi +pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)" +{ $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5 +$as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;} if test "$with_ssl" = openssl ; then ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : diff --git a/configure.ac b/configure.ac index 440b08d113..f220b379b3 100644 --- a/configure.ac +++ b/configure.ac @@ -1553,6 +1553,8 @@ if test "$with_gssapi" = yes ; then fi PGAC_PATH_PROGS(OPENSSL, openssl) +pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)" +AC_MSG_NOTICE([using openssl: $pgac_openssl_version]) if test "$with_ssl" = openssl ; then AC_CHECK_HEADER(openssl/ssl.h, [], [AC_MSG_ERROR([header file <openssl/ssl.h> is required for OpenSSL])]) AC_CHECK_HEADER(openssl/err.h, [], [AC_MSG_ERROR([header file <openssl/err.h> is required for OpenSSL])])
signature.asc
Description: PGP signature