diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-11-02 23:25:49 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-08-21 00:13:02 +0200 |
commit | 82b73fd1e3c53228bb31b75a446114b5fd0cd240 (patch) | |
tree | 541b54210a2c903f38478f06760b1766a2170454 | |
parent | a3eed5fbfe24368726906f425b15ce40b5fc36e0 (diff) | |
download | php-git-82b73fd1e3c53228bb31b75a446114b5fd0cd240.tar.gz |
Remove assumption that extensions are in ext/ext-name
Fixes also a weird ln (symlink) hack for phpdbg
-rw-r--r-- | acinclude.m4 | 19 | ||||
-rwxr-xr-x | build/config-stubs | 4 | ||||
-rw-r--r-- | build/genif.sh | 3 | ||||
-rw-r--r-- | build/order_by_dep.awk | 14 | ||||
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | sapi/phpdbg/config.m4 | 13 |
6 files changed, 31 insertions, 28 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index b4f82f1447..027af60310 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -940,7 +940,7 @@ dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [ dnl dnl Includes an extension in the build. dnl -dnl "extname" is the name of the ext/ subdir where the extension resides. +dnl "extname" is the name of the extension. dnl "sources" is a list of files relative to the subdir which are used dnl to build the extension. 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. AC_DEFUN([PHP_NEW_EXTENSION],[ ext_builddir=[]PHP_EXT_BUILDDIR($1) ext_srcdir=[]PHP_EXT_SRCDIR($1) + ext_dir=[]PHP_EXT_DIR($1) ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`]) if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then dnl ---------------------------------------------- Static module [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no - PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,) - EXT_STATIC="$EXT_STATIC $1" + PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,) + EXT_STATIC="$EXT_STATIC $1;$ext_dir" if test "$3" != "nocli"; then - EXT_CLI_STATIC="$EXT_CLI_STATIC $1" + EXT_CLI_STATIC="$EXT_CLI_STATIC $1;$ext_dir" fi else if test "$3" = "shared" || test "$3" = "yes"; then dnl ---------------------------------------------- Shared module [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes - PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes) + PHP_ADD_SOURCES_X($ext_dir,$2,$ac_extra,shared_objects_$1,yes) case $host_alias in *netware*[)] PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7) @@ -986,14 +987,14 @@ dnl ---------------------------------------------- CLI static module [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no case "$PHP_SAPI" in cgi|embed[)] - PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,) - EXT_STATIC="$EXT_STATIC $1" + PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,) + EXT_STATIC="$EXT_STATIC $1;$ext_dir" ;; *[)] - PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli) + PHP_ADD_SOURCES($ext_dir,$2,$ac_extra,cli) ;; esac - EXT_CLI_STATIC="$EXT_CLI_STATIC $1" + EXT_CLI_STATIC="$EXT_CLI_STATIC $1;$ext_dir" fi PHP_ADD_BUILD_DIR($ext_builddir) diff --git a/build/config-stubs b/build/config-stubs index 28208085a7..765eb541b0 100755 --- a/build/config-stubs +++ b/build/config-stubs @@ -4,5 +4,7 @@ dir=$1; shift for stubfile in $dir/*/config0.m4 $dir/*/config.m4 $dir/*/config9.m4; do - echo "sinclude($stubfile)" + echo "config_m4_src=$stubfile +config_m4_dir=`dirname $stubfile` +sinclude($stubfile)" done diff --git a/build/genif.sh b/build/genif.sh index 14e19b7d9a..2ca2e6de7c 100644 --- a/build/genif.sh +++ b/build/genif.sh @@ -24,7 +24,8 @@ cd $srcdir module_ptrs="$extra_module_ptrs`echo $@ | $awk -f ./build/order_by_dep.awk`" for ext in ${1+"$@"} ; do - header_list="$header_list ext/$ext/*.h*" + ext_dir="$( cut -d ';' -f 2 <<< "$ext" )" + header_list="$header_list $ext_dir/*.h*" done includes=`$awk -f ./build/print_include.awk $header_list` diff --git a/build/order_by_dep.awk b/build/order_by_dep.awk index 0fdd960652..66f59bacd6 100644 --- a/build/order_by_dep.awk +++ b/build/order_by_dep.awk @@ -6,12 +6,12 @@ BEGIN { SUBSEP=":"; } -function get_deps(module_name, depline, cmd) +function get_deps(module_name, module_dir, depline, cmd) { # this could probably be made *much* better RS=orig_rs; FS="[(,) \t]+" - cmd = "grep PHP_ADD_EXTENSION_DEP ext/" module_name "/config*.m4" + cmd = "grep PHP_ADD_EXTENSION_DEP " module_dir "/config*.m4" while (cmd | getline) { # printf("GOT: %s,%s,%s,%s,%s\n", $1, $2, $3, $4, $5); if (!length($5)) { @@ -63,14 +63,16 @@ function count(arr, n, i) return n; } -/^[a-zA-Z0-9_-]+/ { +/^[a-zA-Z0-9_-;]+/ { + split($1, mod, ";"); + # mini hack for pedantic awk - gsub("[^a-zA-Z0-9_-]", "", $1) + gsub("[^a-zA-Z0-9_-]", "", mod[1]) # add each item to array - mods[mod_count++] = $1 + mods[mod_count++] = mod[1] # see if it has any module deps - get_deps($1); + get_deps(mod[1], mod[2]); } END { # order it correctly diff --git a/configure.in b/configure.in index 43fe363435..4e0d7a68e0 100644 --- a/configure.in +++ b/configure.in @@ -131,9 +131,9 @@ PHP_SUBST(PHP_RELEASE_VERSION) PHP_SUBST(PHP_EXTRA_VERSION) dnl Define where extension directories are located in the configure context -AC_DEFUN([PHP_EXT_BUILDDIR],[ext/$1])dnl -AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl -AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl +AC_DEFUN([PHP_EXT_BUILDDIR],[$config_m4_dir])dnl +AC_DEFUN([PHP_EXT_DIR],[$config_m4_dir])dnl +AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/$config_m4_dir])dnl AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl dnl Setting up the PHP version based on the information above. diff --git a/sapi/phpdbg/config.m4 b/sapi/phpdbg/config.m4 index 1e4714e77a..b7d1244669 100644 --- a/sapi/phpdbg/config.m4 +++ b/sapi/phpdbg/config.m4 @@ -6,7 +6,7 @@ PHP_ARG_ENABLE(phpdbg, for phpdbg support, [ --enable-phpdbg Build phpdbg], yes, yes) PHP_ARG_ENABLE(phpdbg-webhelper, for phpdbg web SAPI support, -[ --enable-phpdbg-webhelper Build phpdbg web SAPI support], yes, yes) +[ --enable-phpdbg-webhelper Build phpdbg web SAPI support], no) PHP_ARG_ENABLE(phpdbg-debug, for phpdbg debug build, [ --enable-phpdbg-debug Build phpdbg in debug mode], no, no) @@ -21,13 +21,6 @@ if test "$BUILD_PHPDBG" == "" && test "$PHP_PHPDBG" != "no"; then AC_DEFINE(PHPDBG_DEBUG, 0, [ ]) fi - if test "$PHP_PHPDBG_WEBHELPER" != "no"; then - if ! test -d $abs_srcdir/ext/phpdbg_webhelper; then - ln -s ../sapi/phpdbg $abs_srcdir/ext/phpdbg_webhelper - fi - PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared) - fi - PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE" 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" @@ -72,6 +65,10 @@ if test "$BUILD_PHPDBG" == "" && test "$PHP_PHPDBG" != "no"; then PHP_SUBST(BUILD_PHPDBG_SHARED) fi +if test "$PHP_PHPDBG_WEBHELPER" != "no"; then + PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared) +fi + dnl ## Local Variables: dnl ## tab-width: 4 dnl ## End: |