]> granicus.if.org Git - php/commitdiff
Allow it build with PHP 5.0.x and up again.
authorWez Furlong <wez@php.net>
Sat, 14 May 2005 20:06:54 +0000 (20:06 +0000)
committerWez Furlong <wez@php.net>
Sat, 14 May 2005 20:06:54 +0000 (20:06 +0000)
ext/pdo/Makefile.frag [new file with mode: 0644]
ext/pdo/config.m4

diff --git a/ext/pdo/Makefile.frag b/ext/pdo/Makefile.frag
new file mode 100644 (file)
index 0000000..283a6e2
--- /dev/null
@@ -0,0 +1,26 @@
+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; \
+               elif test -f "$(top_srcdir)/ext/pdo/$$f"; then \
+                       $(INSTALL_DATA) $(top_srcdir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
+               elif test -f "$(top_builddir)/ext/pdo/$$f"; then \
+                       $(INSTALL_DATA) $(top_builddir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
+               else \
+                       echo "hmmm"; \
+               fi \
+       done;
+
+# mini hack
+install: $(all_targets) $(install_targets) install-pdo-headers
+
index 2441499a74e7fbb6fcfff5b9fd468f7dae57129a..1fd123d6c9dd7cb77c795f4059391dcc6295622d 100755 (executable)
@@ -51,5 +51,10 @@ for more detail on this issue.
     esac
   fi
   PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared)
-  PHP_INSTALL_HEADERS(ext/pdo, [php_pdo.h php_pdo_driver.h])
+  
+  dnl When we care only about PHP 5.1 and above, we'll do it this way
+  dnl PHP_INSTALL_HEADERS(ext/pdo, [php_pdo.h php_pdo_driver.h])
+
+  dnl But since that breaks everyone developing against a stable release, we'll do it this way
+  PHP_ADD_MAKEFILE_FRAGMENT
 fi