mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Unbundle oniguruma in config.w32
This commit is contained in:
parent
e91d8ac5f6
commit
2d7658959e
1 changed files with 57 additions and 48 deletions
|
@ -5,14 +5,19 @@ ARG_ENABLE("mbregex", "multibyte regex support", "no");
|
||||||
|
|
||||||
if (PHP_MBSTRING != "no") {
|
if (PHP_MBSTRING != "no") {
|
||||||
|
|
||||||
|
if (CHECK_LIB("onig_a.lib;libonig_a.lib", "mbstring", PHP_MBSTRING) &&
|
||||||
|
CHECK_HEADER_ADD_INCLUDE("mbstring.h", "CFLAGS_MBSTRING", PHP_MBSTRING + ";" + PHP_PHP_BUILD + "\\include")) {
|
||||||
EXTENSION("mbstring", "mbstring.c php_unicode.c mb_gpc.c", PHP_MBSTRING_SHARED);
|
EXTENSION("mbstring", "mbstring.c php_unicode.c mb_gpc.c", PHP_MBSTRING_SHARED);
|
||||||
|
|
||||||
|
/* XXX libonig is only usable as a static library ATM, code change required to link with a DLL. */
|
||||||
|
ADD_FLAG("CFLAGS_MBSTRING", "/DONIG_EXTERN=extern /DPHP_ONIG_BAD_KOI8_ENTRY=1");
|
||||||
|
|
||||||
STDOUT.WriteLine("Using bundled libmbfl...");
|
STDOUT.WriteLine("Using bundled libmbfl...");
|
||||||
|
|
||||||
ADD_FLAG("CFLAGS_MBSTRING", "-Iext/mbstring/libmbfl -Iext/mbstring/libmbfl/mbfl \
|
ADD_FLAG("CFLAGS_MBSTRING", "-Iext/mbstring/libmbfl -Iext/mbstring/libmbfl/mbfl \
|
||||||
/D NOT_RUBY=1 /D LIBMBFL_EXPORTS=1 \
|
/D NOT_RUBY=1 /D LIBMBFL_EXPORTS=1 \
|
||||||
/D HAVE_STDARG_PROTOTYPES=1 /D HAVE_CONFIG_H \
|
/D HAVE_STDARG_PROTOTYPES=1 /D HAVE_CONFIG_H \
|
||||||
/D HAVE_STRICMP /D MBFL_DLL_EXPORT=1 /D ONIGURUMA_EXPORT /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1")
|
/D HAVE_STRICMP /D MBFL_DLL_EXPORT=1 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1")
|
||||||
|
|
||||||
FSO.CopyFile("ext\\mbstring\\libmbfl\\config.h.w32",
|
FSO.CopyFile("ext\\mbstring\\libmbfl\\config.h.w32",
|
||||||
"ext\\mbstring\\libmbfl\\config.h", true);
|
"ext\\mbstring\\libmbfl\\config.h", true);
|
||||||
|
@ -63,4 +68,8 @@ if (PHP_MBSTRING != "no") {
|
||||||
ADD_SOURCES("ext/mbstring", "php_mbregex.c", "mbstring");
|
ADD_SOURCES("ext/mbstring", "php_mbregex.c", "mbstring");
|
||||||
PHP_INSTALL_HEADERS("ext/mbstring", "php_mbregex.h");
|
PHP_INSTALL_HEADERS("ext/mbstring", "php_mbregex.h");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
WARNING("mbstring not enabled; libraries and headers not found");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue