[Libreoffice-commits] .: Branch 'libreoffice-3-3' - configure.in set_soenv.in

Caolán McNamara caolan at kemper.freedesktop.org
Sat Jan 29 04:57:30 PST 2011


 configure.in |   26 ++++++++++++++++----------
 set_soenv.in |    3 +++
 2 files changed, 19 insertions(+), 10 deletions(-)

New commits:
commit 3bbb389243fbca174ffb1ba13a7ab83bd274fb57
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jan 29 12:51:38 2011 +0000

    Resolves: fdo#31271 wrong line break with (
    (cherry picked from commit de475b03b02e4cac162b517f7d9f302b6134d546)

diff --git a/configure.in b/configure.in
index db20f9d..d9ae234 100644
--- a/configure.in
+++ b/configure.in
@@ -5213,18 +5213,21 @@ if test -n "$with_system_icu" -o -n "$with_system_libs" && \
    if test -z "$SYSTEM_GENCMN"; then
       AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
    fi
+
+   AC_PATH_PROG( ICUCONFIG, icu-config)
    AC_MSG_CHECKING([ICU version])
-      AC_TRY_RUN([
-#include <unicode/uversion.h>
+   ICU_VERSION=`$ICUCONFIG --version`
+   ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1`
+   ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2`
+   ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3`
 
-int main(int argc, char **argv) {
-      if(U_ICU_VERSION_MAJOR_NUM < 4)
-        return 1;
-      else
-        return 0;
-}
-      ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])])
-      AC_LANG_POP([C++])
+   if test "$ICU_MAJOR" -ge "4"; then
+      AC_MSG_RESULT([OK])
+   else
+      AC_MSG_ERROR([not suitable, only >= 4.0 supported currently])
+   fi
+
+    AC_LANG_POP([C++])
 else
     AC_MSG_RESULT([internal])
     SYSTEM_ICU=NO
@@ -5234,6 +5237,9 @@ AC_SUBST(SYSTEM_ICU)
 AC_SUBST(SYSTEM_GENBRK)
 AC_SUBST(SYSTEM_GENCCODE)
 AC_SUBST(SYSTEM_GENCMN)
+AC_SUBST(ICU_MAJOR)
+AC_SUBST(ICU_MINOR)
+AC_SUBST(ICU_MICRO)
 
 dnl ===================================================================
 dnl Graphite
diff --git a/set_soenv.in b/set_soenv.in
index aa12caf..ea9f10c 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1923,6 +1923,9 @@ if ($SYSTEM_PYTHON eq "NO") {
 ToFile( "HOME",              "@HOME@",             "e" );
 }
 ToFile( "SYSTEM_ICU",        "@SYSTEM_ICU@",       "e" );
+ToFile( "ICU_MAJOR",         "@ICU_MAJOR@",        "e" );
+ToFile( "ICU_MINOR",         "@ICU_MINOR@",        "e" );
+ToFile( "ICU_MICRO",         "@ICU_MICRO@",        "e" );
 ToFile( "SYSTEM_GENBRK",     "@SYSTEM_GENBRK@",    "e" );
 ToFile( "SYSTEM_GENCCODE",   "@SYSTEM_GENCCODE@",  "e" );
 ToFile( "SYSTEM_GENCMN",     "@SYSTEM_GENCMN@",    "e" );


More information about the Libreoffice-commits mailing list