mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Implement versdion check for new ICU code
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39424 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3f98e43dba
commit
65b62e65c1
3 changed files with 9 additions and 5 deletions
|
@ -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 @@ do \
|
|||
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))
|
||||
{
|
||||
|
|
6
configure
vendored
6
configure
vendored
|
@ -12117,9 +12117,9 @@ fi
|
|||
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; }
|
||||
|
|
|
@ -3317,7 +3317,7 @@ AC_ARG_WITH(icu-library,
|
|||
|
||||
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)])
|
||||
|
|
Loading…
Reference in a new issue