agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Banck <[email protected]>
Subject: [PATCH v2] 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
the custom configure error message did not mention this. This might lead
to confusion about the actual problem. To improve this, remove the
explicit error message and rely on PKG_CHECK_MODULES' generic error
message.
Reported-by: Holger Jakobs
Discussion: https://www.postgresql.org/message-id/ccd579ed-4949-d3de-ab13-9e6456fd2caf%40jakobs.com
---
configure | 30 ++++++++++++++++++++++--------
configure.ac | 6 +-----
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index 4f3aa44756..14b7ae27e6 100755
--- a/configure
+++ b/configure
@@ -8153,17 +8153,31 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$ICU_PKG_ERRORS" >&5
- as_fn_error $? "ICU library not found
-If you have ICU already installed, see config.log for details on the
-failure. It is possible the compiler isn't looking in the proper directory.
-Use --without-icu to disable ICU support." "$LINENO" 5
+ as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
+
+$ICU_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables ICU_CFLAGS
+and ICU_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error $? "ICU library not found
-If you have ICU already installed, see config.log for details on the
-failure. It is possible the compiler isn't looking in the proper directory.
-Use --without-icu to disable ICU support." "$LINENO" 5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables ICU_CFLAGS
+and ICU_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/;.
+See \`config.log' for more details" "$LINENO" 5; }
else
ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
ICU_LIBS=$pkg_cv_ICU_LIBS
diff --git a/configure.ac b/configure.ac
index 049bc01491..94e35da4f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -829,11 +829,7 @@ AC_MSG_RESULT([$with_icu])
AC_SUBST(with_icu)
if test "$with_icu" = yes; then
- 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
-failure. It is possible the compiler isn't looking in the proper directory.
-Use --without-icu to disable ICU support.])])
+ PKG_CHECK_MODULES(ICU, icu-uc icu-i18n)
fi
#
--
2.39.2
--MW5yreqqjyrRcusr--
view thread (3+ messages)
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 v2] Improve configure error for ICU libraries if pkg-config is absent.
In-Reply-To: <no-message-id-58650@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