File tree 3 files changed +18
-11
lines changed
3 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -2243,6 +2243,7 @@ AC_DEFUN([PHP_SETUP_ICU],[
2243
2243
AC_MSG_ERROR ( [ ICU version 3.4 or later is required] )
2244
2244
fi
2245
2245
2246
+ ICU_VERSION=$icu_version
2246
2247
ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
2247
2248
ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
2248
2249
PHP_EVAL_INCLINE($ICU_INCS)
Original file line number Diff line number Diff line change @@ -9,7 +9,14 @@ if test "$PHP_INTL" != "no"; then
9
9
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
10
10
PHP_SUBST(INTL_SHARED_LIBADD)
11
11
PHP_REQUIRE_CXX()
12
-
12
+ if test "$icu_version" -ge "4002"; then
13
+ icu_spoof_src=" spoofchecker/spoofchecker_class.c \
14
+ spoofchecker/spoofchecker.c\
15
+ spoofchecker/spoofchecker_create.c\
16
+ spoofchecker/spoofchecker_main.c"
17
+ else
18
+ icu_spoof_src=""
19
+ fi
13
20
PHP_NEW_EXTENSION(intl, php_intl.c \
14
21
intl_error.c \
15
22
intl_convert.c \
@@ -59,11 +66,7 @@ if test "$PHP_INTL" != "no"; then
59
66
transliterator/transliterator_class.c \
60
67
transliterator/transliterator_methods.c \
61
68
idn/idn.c \
62
- spoofchecker/spoofchecker_class.c \
63
- spoofchecker/spoofchecker.c\
64
- spoofchecker/spoofchecker_create.c\
65
- spoofchecker/spoofchecker_main.c, $ext_shared,,$ICU_INCS)
66
-
69
+ $icu_spoof_src, $ext_shared,,$ICU_INCS)
67
70
PHP_ADD_BUILD_DIR($ext_builddir/collator)
68
71
PHP_ADD_BUILD_DIR($ext_builddir/common)
69
72
PHP_ADD_BUILD_DIR($ext_builddir/formatter)
Original file line number Diff line number Diff line change 70
70
71
71
#include "idn/idn.h"
72
72
73
- #include "spoofchecker/spoofchecker_class.h"
74
- #include "spoofchecker/spoofchecker.h"
75
- #include "spoofchecker/spoofchecker_create.h"
76
- #include "spoofchecker/spoofchecker_main.h"
73
+ #if U_ICU_VERSION_MAJOR_NUM > 3 && U_ICU_VERSION_MINOR_NUM >=2
74
+ # include "spoofchecker/spoofchecker_class.h"
75
+ # include "spoofchecker/spoofchecker.h"
76
+ # include "spoofchecker/spoofchecker_create.h"
77
+ # include "spoofchecker/spoofchecker_main.h"
78
+ #endif
77
79
78
80
#include "msgformat/msgformat.h"
79
81
#include "common/common_error.h"
@@ -638,12 +640,13 @@ PHP_MINIT_FUNCTION( intl )
638
640
/* Expose IDN constants to PHP scripts. */
639
641
idn_register_constants (INIT_FUNC_ARGS_PASSTHRU );
640
642
643
+ #if U_ICU_VERSION_MAJOR_NUM > 3 && U_ICU_VERSION_MINOR_NUM >=2
641
644
/* Register 'Spoofchecker' PHP class */
642
645
spoofchecker_register_Spoofchecker_class ( TSRMLS_C );
643
646
644
647
/* Expose Spoofchecker constants to PHP scripts */
645
648
spoofchecker_register_constants ( INIT_FUNC_ARGS_PASSTHRU );
646
-
649
+ #endif
647
650
/* Global error handling. */
648
651
intl_error_init ( NULL TSRMLS_CC );
649
652
You can’t perform that action at this time.
0 commit comments