svn: /php/php-src/trunk/ acinclude.m4 ext/intl/config.m4 ext/intl/php_intl.c

From: Date: Tue, 15 Feb 2011 08:28:03 +0000
Subject: svn: /php/php-src/trunk/ acinclude.m4 ext/intl/config.m4 ext/intl/php_intl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-64546@lists.php.net to get a copy of this message
pajoye Tue, 15 Feb 2011 08:28:03 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=308351 Log: - fix build with ICU < 4.2, add ICU_VERSION for m4 checks Changed paths: U php/php-src/trunk/acinclude.m4 U php/php-src/trunk/ext/intl/config.m4 U php/php-src/trunk/ext/intl/php_intl.c Modified: php/php-src/trunk/acinclude.m4 =================================================================== --- php/php-src/trunk/acinclude.m4 2011-02-15 06:54:50 UTC (rev 308350) +++ php/php-src/trunk/acinclude.m4 2011-02-15 08:28:03 UTC (rev 308351) @@ -2243,6 +2243,7 @@ AC_MSG_ERROR([ICU version 3.4 or later is required]) fi + ICU_VERSION=$icu_version ICU_INCS=$ICU_CONFIG --cppflags-searchpath ICU_LIBS=$ICU_CONFIG --ldflags --ldflags-icuio PHP_EVAL_INCLINE($ICU_INCS) Modified: php/php-src/trunk/ext/intl/config.m4 =================================================================== --- php/php-src/trunk/ext/intl/config.m4 2011-02-15 06:54:50 UTC (rev 308350) +++ php/php-src/trunk/ext/intl/config.m4 2011-02-15 08:28:03 UTC (rev 308351) @@ -9,7 +9,14 @@ PHP_SETUP_ICU(INTL_SHARED_LIBADD) PHP_SUBST(INTL_SHARED_LIBADD) PHP_REQUIRE_CXX() - + if test "$icu_version" -ge "4002"; then + icu_spoof_src=" spoofchecker/spoofchecker_class.c \ + spoofchecker/spoofchecker.c\ + spoofchecker/spoofchecker_create.c\ + spoofchecker/spoofchecker_main.c" + else + icu_spoof_src="" + fi PHP_NEW_EXTENSION(intl, php_intl.c \ intl_error.c \ intl_convert.c \ @@ -59,11 +66,7 @@ transliterator/transliterator_class.c \ transliterator/transliterator_methods.c \ idn/idn.c \ - spoofchecker/spoofchecker_class.c \ - spoofchecker/spoofchecker.c\ - spoofchecker/spoofchecker_create.c\ - spoofchecker/spoofchecker_main.c, $ext_shared,,$ICU_INCS) - + $icu_spoof_src, $ext_shared,,$ICU_INCS) PHP_ADD_BUILD_DIR($ext_builddir/collator) PHP_ADD_BUILD_DIR($ext_builddir/common) PHP_ADD_BUILD_DIR($ext_builddir/formatter) Modified: php/php-src/trunk/ext/intl/php_intl.c =================================================================== --- php/php-src/trunk/ext/intl/php_intl.c 2011-02-15 06:54:50 UTC (rev 308350) +++ php/php-src/trunk/ext/intl/php_intl.c 2011-02-15 08:28:03 UTC (rev 308351) @@ -70,10 +70,12 @@ #include "idn/idn.h" -#include "spoofchecker/spoofchecker_class.h" -#include "spoofchecker/spoofchecker.h" -#include "spoofchecker/spoofchecker_create.h" -#include "spoofchecker/spoofchecker_main.h" +#if U_ICU_VERSION_MAJOR_NUM > 3 && U_ICU_VERSION_MINOR_NUM >=2 +# include "spoofchecker/spoofchecker_class.h" +# include "spoofchecker/spoofchecker.h" +# include "spoofchecker/spoofchecker_create.h" +# include "spoofchecker/spoofchecker_main.h" +#endif #include "msgformat/msgformat.h" #include "common/common_error.h" @@ -638,12 +640,13 @@ /* Expose IDN constants to PHP scripts. */ idn_register_constants(INIT_FUNC_ARGS_PASSTHRU); +#if U_ICU_VERSION_MAJOR_NUM > 3 && U_ICU_VERSION_MINOR_NUM >=2 /* Register 'Spoofchecker' PHP class */ spoofchecker_register_Spoofchecker_class( TSRMLS_C ); /* Expose Spoofchecker constants to PHP scripts */ spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU ); - +#endif /* Global error handling. */ intl_error_init( NULL TSRMLS_CC );

« previous php.cvs (#64546) next »