Author: rfm
Date: Mon Feb 29 11:05:36 2016
New Revision: 39424

URL: http://svn.gna.org/viewcvs/gnustep?rev=39424&view=rev
Log:
Implement versdion check for new ICU code

Modified:
    libs/base/trunk/Source/NSCalendar.m
    libs/base/trunk/configure
    libs/base/trunk/configure.ac

Modified: libs/base/trunk/Source/NSCalendar.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSCalendar.m?rev=39424&r1=39423&r2=39424&view=diff
==============================================================================
--- libs/base/trunk/Source/NSCalendar.m (original)
+++ libs/base/trunk/Source/NSCalendar.m Mon Feb 29 11:05:36 2016
@@ -38,6 +38,7 @@
 #if defined(HAVE_UNICODE_UCAL_H)
 #define id ucal_id
 #include <unicode/ucal.h>
+#include <unicode/uvernum.h>
 #undef id
 #endif
 
@@ -396,11 +397,14 @@
                            toDate: (NSDate *) resultDate
                           options: (NSUInteger) opts
 {
-#if GS_USE_ICU == 1
+#if GS_USE_ICU == 1 && (U_ICU_VERSION_MAJOR_NUM > 4 \
+  || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 8))
+
   NSDateComponents *comps = nil;
   UErrorCode err = U_ZERO_ERROR;
   UDate udateFrom = (UDate)floor([startingDate timeIntervalSince1970] * 
1000.0);
   UDate udateTo = (UDate)floor([resultDate timeIntervalSince1970] * 1000.0);
+
   ucal_setMillis (my->cal, udateFrom, &err);
   if (U_FAILURE(err))
     {

Modified: libs/base/trunk/configure
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/configure?rev=39424&r1=39423&r2=39424&view=diff
==============================================================================
--- libs/base/trunk/configure   (original)
+++ libs/base/trunk/configure   Mon Feb 29 11:05:36 2016
@@ -12117,9 +12117,9 @@
     echo "See http://site.icu-project.org/ for help."
   else
     ICU_VERSION=`$ICU_CONFIG --version`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU >= 4.8" >&5
-$as_echo_n "checking for ICU >= 4.8... " >&6; }
-      found=`expr $ICU_VERSION \>= 4.8`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU >= 4.6" >&5
+$as_echo_n "checking for ICU >= 4.6... " >&6; }
+      found=`expr $ICU_VERSION \>= 4.6`
       if test "$found" = "1" ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }

Modified: libs/base/trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/configure.ac?rev=39424&r1=39423&r2=39424&view=diff
==============================================================================
--- libs/base/trunk/configure.ac        (original)
+++ libs/base/trunk/configure.ac        Mon Feb 29 11:05:36 2016
@@ -3317,7 +3317,7 @@
 
 if test $enable_icu = yes; then
   if test "$enable_icu_config" = "yes"; then
-    AC_CHECK_ICU(4.8, have_icu=yes, have_icu=no)
+    AC_CHECK_ICU(4.6, have_icu=yes, have_icu=no)
   else
     have_icu=no;
     AC_CHECKING([for libicu (icu-config disabled)])


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to