Skip to content

Commit ae19628

Browse files
committed
Revert pushed by mistake
Revert "Revert "Remove assumption that extensions are in ext/ext-name"" This reverts commit 7e47bf1.
1 parent 5bdc5f4 commit ae19628

File tree

6 files changed

+31
-28
lines changed

6 files changed

+31
-28
lines changed

acinclude.m4

+10-9
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [
940940
dnl
941941
dnl Includes an extension in the build.
942942
dnl
943-
dnl "extname" is the name of the ext/ subdir where the extension resides.
943+
dnl "extname" is the name of the extension.
944944
dnl "sources" is a list of files relative to the subdir which are used
945945
dnl to build the extension.
946946
dnl "shared" can be set to "shared" or "yes" to build the extension as
@@ -953,22 +953,23 @@ dnl "zend_ext" indicates a zend extension.
953953
AC_DEFUN([PHP_NEW_EXTENSION],[
954954
ext_builddir=[]PHP_EXT_BUILDDIR($1)
955955
ext_srcdir=[]PHP_EXT_SRCDIR($1)
956+
ext_dir=[]PHP_EXT_DIR($1)
956957
957958
ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`])
958959
959960
if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
960961
dnl ---------------------------------------------- Static module
961962
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
962-
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
963-
EXT_STATIC="$EXT_STATIC $1"
963+
PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,)
964+
EXT_STATIC="$EXT_STATIC $1;$ext_dir"
964965
if test "$3" != "nocli"; then
965-
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
966+
EXT_CLI_STATIC="$EXT_CLI_STATIC $1;$ext_dir"
966967
fi
967968
else
968969
if test "$3" = "shared" || test "$3" = "yes"; then
969970
dnl ---------------------------------------------- Shared module
970971
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes
971-
PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
972+
PHP_ADD_SOURCES_X($ext_dir,$2,$ac_extra,shared_objects_$1,yes)
972973
case $host_alias in
973974
*netware*[)]
974975
PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7)
@@ -986,14 +987,14 @@ dnl ---------------------------------------------- CLI static module
986987
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
987988
case "$PHP_SAPI" in
988989
cgi|embed[)]
989-
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
990-
EXT_STATIC="$EXT_STATIC $1"
990+
PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,)
991+
EXT_STATIC="$EXT_STATIC $1;$ext_dir"
991992
;;
992993
*[)]
993-
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
994+
PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,cli)
994995
;;
995996
esac
996-
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
997+
EXT_CLI_STATIC="$EXT_CLI_STATIC $1;$ext_dir"
997998
fi
998999
PHP_ADD_BUILD_DIR($ext_builddir)
9991000

build/config-stubs

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44

55
dir=$1; shift
66
for stubfile in $dir/*/config0.m4 $dir/*/config.m4 $dir/*/config9.m4; do
7-
echo "sinclude($stubfile)"
7+
echo "config_m4_src=$stubfile
8+
config_m4_dir=`dirname $stubfile`
9+
sinclude($stubfile)"
810
done

build/genif.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ cd $srcdir
2424
module_ptrs="$extra_module_ptrs`echo $@ | $awk -f ./build/order_by_dep.awk`"
2525

2626
for ext in ${1+"$@"} ; do
27-
header_list="$header_list ext/$ext/*.h*"
27+
ext_dir=`echo "$ext" | cut -d ';' -f 2`
28+
header_list="$header_list $ext_dir/*.h*"
2829
done
2930

3031
includes=`$awk -f ./build/print_include.awk $header_list`

build/order_by_dep.awk

+8-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ BEGIN {
66
SUBSEP=":";
77
}
88

9-
function get_deps(module_name, depline, cmd)
9+
function get_deps(module_name, module_dir, depline, cmd)
1010
{
1111
# this could probably be made *much* better
1212
RS=orig_rs;
1313
FS="[(,) \t]+"
14-
cmd = "grep PHP_ADD_EXTENSION_DEP ext/" module_name "/config*.m4"
14+
cmd = "grep PHP_ADD_EXTENSION_DEP " module_dir "/config*.m4"
1515
while (cmd | getline) {
1616
# printf("GOT: %s,%s,%s,%s,%s\n", $1, $2, $3, $4, $5);
1717
if (!length($5)) {
@@ -63,14 +63,16 @@ function count(arr, n, i)
6363
return n;
6464
}
6565

66-
/^[a-zA-Z0-9_-]+/ {
66+
/^[a-zA-Z0-9_;-]+/ {
67+
split($1, mod, ";");
68+
6769
# mini hack for pedantic awk
68-
gsub("[^a-zA-Z0-9_-]", "", $1)
70+
gsub("[^a-zA-Z0-9_-]", "", mod[1])
6971
# add each item to array
70-
mods[mod_count++] = $1
72+
mods[mod_count++] = mod[1]
7173

7274
# see if it has any module deps
73-
get_deps($1);
75+
get_deps(mod[1], mod[2]);
7476
}
7577
END {
7678
# order it correctly

configure.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ PHP_SUBST(PHP_RELEASE_VERSION)
131131
PHP_SUBST(PHP_EXTRA_VERSION)
132132

133133
dnl Define where extension directories are located in the configure context
134-
AC_DEFUN([PHP_EXT_BUILDDIR],[ext/$1])dnl
135-
AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
136-
AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
134+
AC_DEFUN([PHP_EXT_BUILDDIR],[$config_m4_dir])dnl
135+
AC_DEFUN([PHP_EXT_DIR],[$config_m4_dir])dnl
136+
AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/$config_m4_dir])dnl
137137
AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
138138

139139
dnl Setting up the PHP version based on the information above.

sapi/phpdbg/config.m4

+5-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PHP_ARG_ENABLE(phpdbg, for phpdbg support,
66
[ --enable-phpdbg Build phpdbg], yes, yes)
77

88
PHP_ARG_ENABLE(phpdbg-webhelper, for phpdbg web SAPI support,
9-
[ --enable-phpdbg-webhelper Build phpdbg web SAPI support], yes, yes)
9+
[ --enable-phpdbg-webhelper Build phpdbg web SAPI support], no)
1010

1111
PHP_ARG_ENABLE(phpdbg-debug, for phpdbg debug build,
1212
[ --enable-phpdbg-debug Build phpdbg in debug mode], no, no)
@@ -21,13 +21,6 @@ if test "$BUILD_PHPDBG" == "" && test "$PHP_PHPDBG" != "no"; then
2121
AC_DEFINE(PHPDBG_DEBUG, 0, [ ])
2222
fi
2323

24-
if test "$PHP_PHPDBG_WEBHELPER" != "no"; then
25-
if ! test -d $abs_srcdir/ext/phpdbg_webhelper; then
26-
ln -s ../sapi/phpdbg $abs_srcdir/ext/phpdbg_webhelper
27-
fi
28-
PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared)
29-
fi
30-
3124
PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE"
3225
PHP_PHPDBG_FILES="phpdbg.c phpdbg_parser.c phpdbg_lexer.c phpdbg_prompt.c phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c phpdbg_info.c phpdbg_cmd.c phpdbg_set.c phpdbg_frame.c phpdbg_watch.c phpdbg_btree.c phpdbg_sigsafe.c phpdbg_wait.c phpdbg_io.c phpdbg_eol.c phpdbg_out.c"
3326

@@ -72,6 +65,10 @@ if test "$BUILD_PHPDBG" == "" && test "$PHP_PHPDBG" != "no"; then
7265
PHP_SUBST(BUILD_PHPDBG_SHARED)
7366
fi
7467

68+
if test "$PHP_PHPDBG_WEBHELPER" != "no"; then
69+
PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared)
70+
fi
71+
7572
dnl ## Local Variables:
7673
dnl ## tab-width: 4
7774
dnl ## End:

0 commit comments

Comments
 (0)