|
|
|
@ -6,6 +6,10 @@ AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [ |
|
|
|
PHP_MBSTRING_SOURCES="$PHP_MBSTRING_SOURCES $1" |
|
|
|
]) |
|
|
|
|
|
|
|
AC_DEFUN([PHP_MBSTRING_ADD_BASE_SOURCES], [ |
|
|
|
PHP_MBSTRING_BASE_SOURCES="$PHP_MBSTRING_BASE_SOURCES $1" |
|
|
|
]) |
|
|
|
|
|
|
|
AC_DEFUN([PHP_MBSTRING_ADD_BUILD_DIR], [ |
|
|
|
PHP_MBSTRING_EXTRA_BUILD_DIRS="$PHP_MBSTRING_EXTRA_BUILD_DIRS $1" |
|
|
|
]) |
|
|
|
@ -26,17 +30,20 @@ AC_DEFUN([PHP_MBSTRING_EXTENSION], [ |
|
|
|
PHP_NEW_EXTENSION(mbstring, $PHP_MBSTRING_SOURCES, $ext_shared,, $PHP_MBSTRING_CFLAGS) |
|
|
|
PHP_SUBST(MBSTRING_SHARED_LIBADD) |
|
|
|
|
|
|
|
for dir in $PHP_MBSTRING_EXTRA_BUILD_DIRS; do |
|
|
|
PHP_ADD_BUILD_DIR([$ext_builddir/$dir], 1) |
|
|
|
done |
|
|
|
|
|
|
|
for dir in $PHP_MBSTRING_EXTRA_INCLUDES; do |
|
|
|
PHP_ADD_INCLUDE([$ext_srcdir/$dir]) |
|
|
|
PHP_ADD_INCLUDE([$ext_builddir/$dir]) |
|
|
|
done |
|
|
|
|
|
|
|
for dir in $PHP_MBSTRING_EXTRA_BUILD_DIRS; do |
|
|
|
PHP_ADD_BUILD_DIR([$ext_builddir/$dir]) |
|
|
|
done |
|
|
|
|
|
|
|
if test "$ext_shared" = "no"; then |
|
|
|
PHP_ADD_SOURCES(PHP_EXT_DIR(mbstring), $PHP_MBSTRING_BASE_SOURCES) |
|
|
|
out="php_config.h" |
|
|
|
else |
|
|
|
PHP_ADD_SOURCES_X(PHP_EXT_DIR(mbstring),$PHP_MBSTRING_BASE_SOURCES,,shared_objects_mbstring,yes) |
|
|
|
if test -f "$ext_builddir/config.h.in"; then |
|
|
|
out="$abs_builddir/config.h" |
|
|
|
else |
|
|
|
@ -45,11 +52,10 @@ AC_DEFUN([PHP_MBSTRING_EXTENSION], [ |
|
|
|
fi |
|
|
|
|
|
|
|
for cfg in $PHP_MBSTRING_EXTRA_CONFIG_HEADERS; do |
|
|
|
cat > $ext_srcdir/$cfg <<EOF |
|
|
|
cat > $ext_builddir/$cfg <<EOF |
|
|
|
#include "$out" |
|
|
|
EOF |
|
|
|
done |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
AC_DEFUN([PHP_MBSTRING_SETUP_MBREGEX], [ |
|
|
|
@ -88,8 +94,8 @@ int main() { return foo(10, "", 3.14); } |
|
|
|
PHP_MBSTRING_ADD_INCLUDE([oniguruma]) |
|
|
|
PHP_MBSTRING_ADD_CONFIG_HEADER([oniguruma/config.h]) |
|
|
|
|
|
|
|
PHP_MBSTRING_ADD_BASE_SOURCES([php_mbregex.c]) |
|
|
|
PHP_MBSTRING_ADD_SOURCES([ |
|
|
|
php_mbregex.c |
|
|
|
oniguruma/regcomp.c |
|
|
|
oniguruma/regerror.c |
|
|
|
oniguruma/regexec.c |
|
|
|
@ -252,19 +258,19 @@ dnl Main config |
|
|
|
dnl |
|
|
|
|
|
|
|
PHP_ARG_ENABLE(mbstring, whether to enable multibyte string support, |
|
|
|
[ --enable-mbstring Enable multibyte string support.]) |
|
|
|
[ --enable-mbstring Enable multibyte string support]) |
|
|
|
|
|
|
|
PHP_ARG_ENABLE([mbregex], [whether to enable multibyte regex support], |
|
|
|
[ --disable-mbregex MBSTRING: Disable multibyte regex support.], yes, no) |
|
|
|
[ --disable-mbregex MBSTRING: Disable multibyte regex support], yes, no) |
|
|
|
|
|
|
|
PHP_ARG_WITH(libmbfl, [for external libmbfl], |
|
|
|
[ --with-libmbfl[=DIR] MBSTRING: Use external libmbfl. DIR is the libmbfl install prefix. |
|
|
|
If DIR is not set, the bundled libmbfl will be used.], no, no) |
|
|
|
If DIR is not set, the bundled libmbfl will be used], no, no) |
|
|
|
|
|
|
|
if test "$PHP_MBSTRING" != "no"; then |
|
|
|
AC_DEFINE([HAVE_MBSTRING],1,[whether to have multibyte string support]) |
|
|
|
|
|
|
|
PHP_MBSTRING_ADD_SOURCES([mbstring.c php_unicode.c mb_gpc.c]) |
|
|
|
PHP_MBSTRING_ADD_BASE_SOURCES([mbstring.c php_unicode.c mb_gpc.c]) |
|
|
|
|
|
|
|
if test "$PHP_MBREGEX" != "no"; then |
|
|
|
PHP_MBSTRING_SETUP_MBREGEX |
|
|
|
|