[Libreoffice-commits] .: configure.ac

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 24 01:11:13 PST 2013


 configure.ac |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

New commits:
commit be6b5a214a365dedb8351014a90604d30b3bd4ac
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Thu Jan 24 10:10:49 2013 +0100

    Detect ICU by pkg-config first and fallback on icu-config only after

diff --git a/configure.ac b/configure.ac
index 9ae19b8..ddd0f71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,15 +68,17 @@ AC_CHECK_HEADER(
 # ========
 # Find icu
 # ========
-AC_PATH_PROG([ICU_CONFIG],[icu-config])
-AC_MSG_CHECKING([ICU installation])
-if ${ICU_CONFIG} --cflags >/dev/null 2>&1; then
-	ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath`
-	ICU_LIBS=`${ICU_CONFIG} --ldflags`
-	AC_MSG_RESULT([found])
-else
-	AC_MSG_ERROR([libicu config program icu-config not found])
-fi
+PKG_CHECK_MODULES([ICU],[icu-i18n],[],[
+	AC_PATH_PROG([ICU_CONFIG],[icu-config])
+	AC_MSG_CHECKING([ICU installation])
+	if ${ICU_CONFIG} --cflags >/dev/null 2>&1; then
+		ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath`
+		ICU_LIBS=`${ICU_CONFIG} --ldflags`
+		AC_MSG_RESULT([found])
+	else
+		AC_MSG_ERROR([libicu config program icu-config not found])
+	fi]
+)
 AC_SUBST(ICU_CFLAGS)
 AC_SUBST(ICU_LIBS)
 


More information about the Libreoffice-commits mailing list