From: Wez Furlong Date: Mon, 17 May 2004 18:13:03 +0000 (+0000) Subject: Allow PDO to build as a self-contained extension. X-Git-Tag: RELEASE_0_1~176 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd84731577d51d5f74b3bd14e6161b5b554ccf28;p=php Allow PDO to build as a self-contained extension. Install headers so that other self-contained extensions may them. --- diff --git a/ext/pdo/Makefile.frag b/ext/pdo/Makefile.frag new file mode 100644 index 0000000000..5b8cf71f6e --- /dev/null +++ b/ext/pdo/Makefile.frag @@ -0,0 +1,23 @@ +phpincludedir=$(prefix)/include/php + +PDO_HEADER_FILES= \ + php_pdo.h \ + php_pdo_driver.h + +install-pdo-headers: + echo "Installing PDO headers: $(INSTALL_ROOT)$(phpincludedir)/ext/pdo/" + $(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/pdo + for f in $(PDO_HEADER_FILES); do \ + if test -f "$(top_srcdir)/$$f"; then \ + $(INSTALL_DATA) $(top_srcdir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ + elif test -f "$(top_builddir)/$$f"; then \ + $(INSTALL_DATA) $(top_builddir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ + else \ + echo "hmmm"; \ + fi \ + done; + +# mini hack +install: $(all_targets) $(install_targets) install-pdo-headers + + diff --git a/ext/pdo/config.m4 b/ext/pdo/config.m4 index 97688d28bf..29fb185a9f 100755 --- a/ext/pdo/config.m4 +++ b/ext/pdo/config.m4 @@ -6,4 +6,5 @@ PHP_ARG_ENABLE(pdo, whether to enable PDO support, if test "$PHP_PDO" != "no"; then PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c, $ext_shared) + PHP_ADD_MAKEFILE_FRAGMENT fi diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index b1fdd7694a..5985422788 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -34,7 +34,35 @@ #include "php_pdo_int.h" #include "zend_exceptions.h" -#include "zend_arg_defs.c" +/* {{{ content from zend_arg_defs.c: + * since it is a .c file, it won't be installed for use by PECL extensions, so we include it here. */ +ZEND_BEGIN_ARG_INFO(first_arg_force_ref, 0) + ZEND_ARG_PASS_INFO(1) +ZEND_END_ARG_INFO(); + + +ZEND_BEGIN_ARG_INFO(second_arg_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) +ZEND_END_ARG_INFO(); + +ZEND_BEGIN_ARG_INFO(third_arg_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) +ZEND_END_ARG_INFO(); + + +ZEND_BEGIN_ARG_INFO(fourth_arg_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) +ZEND_END_ARG_INFO(); + +ZEND_BEGIN_ARG_INFO(all_args_by_ref, 1) +ZEND_END_ARG_INFO(); +/* }}} */ static PHP_FUNCTION(dbstmt_constructor) /* {{{ */ {