agora inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Banck <[email protected]>
Subject: [PATCH] Improve configure error for ICU libraries if pkg-config is absent.
Date: Fri, 9 Aug 2024 10:13:27 +0200

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


--3V7upXqbjpZ4EhLz--





view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [PATCH] Improve configure error for ICU libraries if pkg-config is absent.
  In-Reply-To: <no-message-id-58642@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox