]> granicus.if.org Git - php/commitdiff
Revert pushed by mistake
authorXinchen Hui <laruence@gmail.com>
Mon, 16 Nov 2015 10:04:10 +0000 (18:04 +0800)
committerXinchen Hui <laruence@gmail.com>
Mon, 16 Nov 2015 10:04:29 +0000 (18:04 +0800)
Revert "Revert "Remove assumption that extensions are in ext/ext-name""

This reverts commit 7e47bf1e65086d6bb69bd9e9c79ccb179c5302b4.

acinclude.m4
build/config-stubs
build/genif.sh
build/order_by_dep.awk
configure.in
sapi/phpdbg/config.m4

index 4ec5f87c814208aef9eaa57f9880d9c443f5cfb5..ff2fad66f4c6c9e81b8aa05d9960f9e8463fcda0 100644 (file)
@@ -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)
 
index 28208085a7513d44743fb20bd6ddaefac405685f..765eb541b09cf3e9f832e4b95a90dea8da8387d3 100755 (executable)
@@ -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
index 14e19b7d9a4669cdf672e3e2e8ec0036b836f9f7..e2bc6ac89d9bf932ced30f19ffa77b963d03f23d 100644 (file)
@@ -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=`echo "$ext" | cut -d ';' -f 2`
+       header_list="$header_list $ext_dir/*.h*"
 done
 
 includes=`$awk -f ./build/print_include.awk $header_list`
index 0fdd960652ec8b943715ac2115a1eac00ae89613..281898eceef8392a9feb79cdb74e2d15ed62ecfd 100644 (file)
@@ -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
index c3388a4bbe673a6aa2695375440ba27287026f93..0d62c488b1e24e8b609bf9281cdb8c406e9b37d9 100644 (file)
@@ -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.
index 1e4714e77a724d163aa3344ddc6817170ac27fbf..b7d12446693da88e7d6f6ea3de9fc28357e4775a 100644 (file)
@@ -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: