Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0fb0f68

Browse files
committed
Improve configure error for ICU libraries if pkg-config is absent.
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. Author: Michael Banck Reported-by: Holger Jakobs Discussion: https://postgr.es/m/ccd579ed-4949-d3de-ab13-9e6456fd2caf%40jakobs.com Discussion: https://postgr.es/m/66b5d05c.050a0220.7c8ce.a951@mx.google.com
1 parent 5ff9b6b commit 0fb0f68

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

configure

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8153,17 +8153,31 @@ fi
81538153
# Put the nasty error message in config.log where it belongs
81548154
echo "$ICU_PKG_ERRORS" >&5
81558155

8156-
as_fn_error $? "ICU library not found
8157-
If you have ICU already installed, see config.log for details on the
8158-
failure. It is possible the compiler isn't looking in the proper directory.
8159-
Use --without-icu to disable ICU support." "$LINENO" 5
8156+
as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8157+
8158+
$ICU_PKG_ERRORS
8159+
8160+
Consider adjusting the PKG_CONFIG_PATH environment variable if you
8161+
installed software in a non-standard prefix.
8162+
8163+
Alternatively, you may set the environment variables ICU_CFLAGS
8164+
and ICU_LIBS to avoid the need to call pkg-config.
8165+
See the pkg-config man page for more details." "$LINENO" 5
81608166
elif test $pkg_failed = untried; then
81618167
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
81628168
$as_echo "no" >&6; }
8163-
as_fn_error $? "ICU library not found
8164-
If you have ICU already installed, see config.log for details on the
8165-
failure. It is possible the compiler isn't looking in the proper directory.
8166-
Use --without-icu to disable ICU support." "$LINENO" 5
8169+
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8170+
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8171+
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8172+
is in your PATH or set the PKG_CONFIG environment variable to the full
8173+
path to pkg-config.
8174+
8175+
Alternatively, you may set the environment variables ICU_CFLAGS
8176+
and ICU_LIBS to avoid the need to call pkg-config.
8177+
See the pkg-config man page for more details.
8178+
8179+
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8180+
See \`config.log' for more details" "$LINENO" 5; }
81678181
else
81688182
ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
81698183
ICU_LIBS=$pkg_cv_ICU_LIBS

configure.ac

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -829,11 +829,7 @@ AC_MSG_RESULT([$with_icu])
829829
AC_SUBST(with_icu)
830830

831831
if test "$with_icu" = yes; then
832-
PKG_CHECK_MODULES(ICU, icu-uc icu-i18n, [],
833-
[AC_MSG_ERROR([ICU library not found
834-
If you have ICU already installed, see config.log for details on the
835-
failure. It is possible the compiler isn't looking in the proper directory.
836-
Use --without-icu to disable ICU support.])])
832+
PKG_CHECK_MODULES(ICU, icu-uc icu-i18n)
837833
fi
838834

839835
#

0 commit comments

Comments
 (0)