summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-05-29 23:15:16 +0000
committerfoobar <sniper@php.net>2005-05-29 23:15:16 +0000
commitd12196e57555ade57bd1ba90d00c6508a95fa2f7 (patch)
tree71e32dbb42d39d2f231f2f17e02592fd53c09f18
parent522159468c1746378ff021fcd250722de14c5676 (diff)
downloadphp-git-d12196e57555ade57bd1ba90d00c6508a95fa2f7.tar.gz
Fix VPATH build
-rw-r--r--ext/mbstring/config.m428
1 files changed, 17 insertions, 11 deletions
diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4
index 6035823bd7..aefc7b55f0 100644
--- a/ext/mbstring/config.m4
+++ b/ext/mbstring/config.m4
@@ -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