Meh, forgot the attachment. Also, this should be backpatched to v17 if accepted.
Michael
>From b696949180437a3c7307ac0509cba54828b44259 Mon Sep 17 00:00:00 2001 From: Michael Banck <michael.ba...@credativ.de> Date: Fri, 9 Aug 2024 10:13:27 +0200 Subject: [PATCH] Improve configure error for ICU libraries if pkg-config is absent. If pkg-config is not installed, the ICU libraries cannot be found, but this was not mentioned in the error message and might lead to confusion about the actual problem. To improve this, add an additional error message for the case that pkg-config is not available. Reported-by: Holger Jakobs Discussion: https://www.postgresql.org/message-id/ccd579ed-4949-d3de-ab13-9e6456fd2caf%40jakobs.com --- configure | 7 +++++++ configure.ac | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/configure b/configure index 4f3aa44756..b3a2774f1b 100755 --- a/configure +++ b/configure @@ -8094,6 +8094,13 @@ $as_echo "$with_icu" >&6; } if test "$with_icu" = yes; then + if test -z "$PKG_CONFIG"; then + as_fn_error $? "ICU library not found +The ICU library could not be found because pkg-config is not available, see +config.log for details on the failure. If ICU is installed, the variables +ICU_CFLAGS and ICU_LIBS can be set explicitly in this case, or use +--without-icu to disable ICU support." "$LINENO" 5 + fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5 diff --git a/configure.ac b/configure.ac index 049bc01491..18472a464a 100644 --- a/configure.ac +++ b/configure.ac @@ -829,6 +829,13 @@ AC_MSG_RESULT([$with_icu]) AC_SUBST(with_icu) if test "$with_icu" = yes; then + if test -z "$PKG_CONFIG"; then + AC_MSG_ERROR([ICU library not found +The ICU library could not be found because pkg-config is not available, see +config.log for details on the failure. If ICU is installed, the variables +ICU_CFLAGS and ICU_LIBS can be set explicitly in this case, or use +--without-icu to disable ICU support.]) + fi PKG_CHECK_MODULES(ICU, icu-uc icu-i18n, [], [AC_MSG_ERROR([ICU library not found If you have ICU already installed, see config.log for details on the -- 2.39.2