From 3b95ba53557481cef570478a8dcdf2f200eae845 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Mon, 29 Mar 2021 21:41:49 +0300
Subject: [PATCH 26/26] Document setting up PKG_CONFIG_PATH for finding icu-uc
 in OSX build

Reported by Dean

See osdn #41872

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 INSTALL      | 6 ++++++
 configure.ac | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/INSTALL b/INSTALL
index f5b8546606..686daaff81 100644
--- a/INSTALL
+++ b/INSTALL
@@ -542,6 +542,12 @@ local installation.
 8. Mac OS X and Darwin notes:
 =============================
 
+Pkg-config files installed with icu4c homebrew package are not found
+from normal path. This shows up as a configure error:
+"icu development files not found. Adjusting PKG_CONFIG_PATH may help"
+One needs to adjust PKG_CONFIG_PATH before configure, like this:
+> export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH"
+
 Apple's version of GCC uses precompiled headers that does not support
 vararg macros (a GCC extension).  This causes GCC to fail when
 compiling Freeciv since the compiler is otherwise (mostly)
diff --git a/configure.ac b/configure.ac
index e91f064293..b9867609ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -635,7 +635,7 @@ fi
 
 if test "x$emscripten" != "xyes" ; then
   PKG_CHECK_MODULES([ICU], [icu-uc],,
-      [AC_MSG_ERROR([icu development files required])])
+      [AC_MSG_ERROR([icu development files not found. Adjusting PKG_CONFIG_PATH may help])])
   UTILITY_CFLAGS="${UTILITY_CFLAGS} ${ICU_CFLAGS}"
   UTILITY_LIBS="${UTILITY_LIBS} ${ICU_LIBS}"
 else
-- 
2.30.2