]> granicus.if.org Git - php/commitdiff
Allow PDO to build as a self-contained extension.
authorWez Furlong <wez@php.net>
Mon, 17 May 2004 18:13:03 +0000 (18:13 +0000)
committerWez Furlong <wez@php.net>
Mon, 17 May 2004 18:13:03 +0000 (18:13 +0000)
Install headers so that other self-contained extensions may them.

ext/pdo/Makefile.frag [new file with mode: 0644]
ext/pdo/config.m4
ext/pdo/pdo_stmt.c

diff --git a/ext/pdo/Makefile.frag b/ext/pdo/Makefile.frag
new file mode 100644 (file)
index 0000000..5b8cf71
--- /dev/null
@@ -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
+
+
index 97688d28bf99ef61a529284c905083c071450de8..29fb185a9f7c4df8e70a0071141a2dfec082003a 100755 (executable)
@@ -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
index b1fdd7694ab3aaadb83a6c7e1e867f6c469ee58d..59854227885e59c1a7d96a2cd8dfc4c1d0a8263b 100755 (executable)
 #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) /* {{{ */
 {