Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Cache the PDO include path

  • Loading branch information...
commit 8e256774b0cd24bd460c6fc4a9394abe5c1a939d 1 parent d19c366
Rasmus Lerdorf rlerdorf authored
10 acinclude.m4
@@ -2760,17 +2760,17 @@ dnl
2760 2760 dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
2761 2761 dnl
2762 2762 AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
2763   - AC_CACHE_CHECK([for PDO includes], pdo_inc_path, [
  2763 + AC_CACHE_CHECK([for PDO includes], pdo_cv_inc_path, [
2764 2764 AC_MSG_CHECKING([for PDO includes])
2765 2765 if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
2766   - pdo_inc_path=$abs_srcdir/ext
  2766 + pdo_cv_inc_path=$abs_srcdir/ext
2767 2767 elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
2768   - pdo_inc_path=$abs_srcdir/ext
  2768 + pdo_cv_inc_path=$abs_srcdir/ext
2769 2769 elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
2770   - pdo_inc_path=$prefix/include/php/ext
  2770 + pdo_cv_inc_path=$prefix/include/php/ext
2771 2771 fi
2772 2772 ])
2773   - if test -n "$pdo_inc_path"; then
  2773 + if test -n "$pdo_cv_inc_path"; then
2774 2774 ifelse([$1],[],:,[$1])
2775 2775 else
2776 2776 ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
10 ext/pdo_dblib/config.m4
@@ -59,19 +59,19 @@ if test "$PHP_PDO_DBLIB" != "no"; then
59 59 ],[
60 60 AC_MSG_CHECKING([for PDO includes])
61 61 if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
62   - pdo_inc_path=$abs_srcdir/ext
  62 + pdo_cv_inc_path=$abs_srcdir/ext
63 63 elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
64   - pdo_inc_path=$abs_srcdir/ext
  64 + pdo_cv_inc_path=$abs_srcdir/ext
65 65 elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
66   - pdo_inc_path=$prefix/include/php/ext
  66 + pdo_cv_inc_path=$prefix/include/php/ext
67 67 else
68 68 AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
69 69 fi
70   - AC_MSG_RESULT($pdo_inc_path)
  70 + AC_MSG_RESULT($pdo_cv_inc_path)
71 71 ])
72 72
73 73 PDO_DBLIB_DEFS="-DPDO_DBLIB_FLAVOUR=\\\"freetds\\\""
74   - PHP_NEW_EXTENSION(pdo_dblib, pdo_dblib.c dblib_driver.c dblib_stmt.c, $ext_shared,,-I$pdo_inc_path $PDO_DBLIB_DEFS)
  74 + PHP_NEW_EXTENSION(pdo_dblib, pdo_dblib.c dblib_driver.c dblib_stmt.c, $ext_shared,,-I$pdo_cv_inc_path $PDO_DBLIB_DEFS)
75 75 AC_CHECK_LIB(dnet_stub, dnet_addr,
76 76 [ PHP_ADD_LIBRARY_WITH_PATH(dnet_stub,,PDO_DBLIB_SHARED_LIBADD)
77 77 AC_DEFINE(HAVE_LIBDNET_STUB,1,[ ])
2  ext/pdo_firebird/config.m4
@@ -50,7 +50,7 @@ if test "$PHP_PDO_FIREBIRD" != "no"; then
50 50 PHP_ADD_LIBRARY_WITH_PATH($FIREBIRD_LIBNAME, $FIREBIRD_LIBDIR, PDO_FIREBIRD_SHARED_LIBADD)
51 51 PHP_ADD_INCLUDE($FIREBIRD_INCDIR)
52 52 AC_DEFINE(HAVE_PDO_FIREBIRD,1,[ ])
53   - PHP_NEW_EXTENSION(pdo_firebird, pdo_firebird.c firebird_driver.c firebird_statement.c, $ext_shared,,-I$pdo_inc_path)
  53 + PHP_NEW_EXTENSION(pdo_firebird, pdo_firebird.c firebird_driver.c firebird_statement.c, $ext_shared,,-I$pdo_cv_inc_path)
54 54 PHP_SUBST(PDO_FIREBIRD_SHARED_LIBADD)
55 55 PHP_ADD_EXTENSION_DEP(pdo_firebird, pdo)
56 56 fi
10 ext/pdo_mysql/config.m4
@@ -136,15 +136,15 @@ if test "$PHP_PDO_MYSQL" != "no"; then
136 136 ],[
137 137 AC_MSG_CHECKING([for PDO includes])
138 138 if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
139   - pdo_inc_path=$abs_srcdir/ext
  139 + pdo_cv_inc_path=$abs_srcdir/ext
140 140 elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
141   - pdo_inc_path=$abs_srcdir/ext
  141 + pdo_cv_inc_path=$abs_srcdir/ext
142 142 elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
143   - pdo_inc_path=$prefix/include/php/ext
  143 + pdo_cv_inc_path=$prefix/include/php/ext
144 144 else
145 145 AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
146 146 fi
147   - AC_MSG_RESULT($pdo_inc_path)
  147 + AC_MSG_RESULT($pdo_cv_inc_path)
148 148 ])
149 149
150 150 if test -n "$PDO_MYSQL_CONFIG"; then
@@ -153,7 +153,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then
153 153 fi
154 154
155 155 dnl fix after renaming to pdo_mysql
156   - PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_inc_path -I)
  156 + PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_cv_inc_path -I)
157 157 ifdef([PHP_ADD_EXTENSION_DEP],
158 158 [
159 159 PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo)
10 ext/pdo_oci/config.m4
@@ -214,18 +214,18 @@ You need to tell me where to find your Oracle Instant Client SDK, or set ORACLE_
214 214 ],[
215 215 AC_MSG_CHECKING([for PDO includes])
216 216 if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
217   - pdo_inc_path=$abs_srcdir/ext
  217 + pdo_cv_inc_path=$abs_srcdir/ext
218 218 elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
219   - pdo_inc_path=$abs_srcdir/ext
  219 + pdo_cv_inc_path=$abs_srcdir/ext
220 220 elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
221   - pdo_inc_path=$prefix/include/php/ext
  221 + pdo_cv_inc_path=$prefix/include/php/ext
222 222 else
223 223 AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
224 224 fi
225   - AC_MSG_RESULT($pdo_inc_path)
  225 + AC_MSG_RESULT($pdo_cv_inc_path)
226 226 ])
227 227
228   - PHP_NEW_EXTENSION(pdo_oci, pdo_oci.c oci_driver.c oci_statement.c, $ext_shared,,-I$pdo_inc_path)
  228 + PHP_NEW_EXTENSION(pdo_oci, pdo_oci.c oci_driver.c oci_statement.c, $ext_shared,,-I$pdo_cv_inc_path)
229 229
230 230 PHP_SUBST_OLD(PDO_OCI_SHARED_LIBADD)
231 231 PHP_SUBST_OLD(PDO_OCI_DIR)
10 ext/pdo_odbc/config.m4
@@ -47,15 +47,15 @@ if test "$PHP_PDO_ODBC" != "no"; then
47 47 ],[
48 48 AC_MSG_CHECKING([for PDO includes])
49 49 if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
50   - pdo_inc_path=$abs_srcdir/ext
  50 + pdo_cv_inc_path=$abs_srcdir/ext
51 51 elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
52   - pdo_inc_path=$abs_srcdir/ext
  52 + pdo_cv_inc_path=$abs_srcdir/ext
53 53 elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
54   - pdo_inc_path=$prefix/include/php/ext
  54 + pdo_cv_inc_path=$prefix/include/php/ext
55 55 else
56 56 AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
57 57 fi
58   - AC_MSG_RESULT($pdo_inc_path)
  58 + AC_MSG_RESULT($pdo_cv_inc_path)
59 59 ])
60 60
61 61 AC_MSG_CHECKING([for selected PDO ODBC flavour])
@@ -165,7 +165,7 @@ functions required for PDO support.
165 165 AC_MSG_ERROR([Your ODBC library does not exist or there was an error. Check config.log for more information])
166 166 ], $PDO_ODBC_LDFLAGS)
167 167
168   - PHP_NEW_EXTENSION(pdo_odbc, pdo_odbc.c odbc_driver.c odbc_stmt.c, $ext_shared,,-I$pdo_inc_path $PDO_ODBC_INCLUDE)
  168 + PHP_NEW_EXTENSION(pdo_odbc, pdo_odbc.c odbc_driver.c odbc_stmt.c, $ext_shared,,-I$pdo_cv_inc_path $PDO_ODBC_INCLUDE)
169 169 PHP_SUBST(PDO_ODBC_SHARED_LIBADD)
170 170 ifdef([PHP_ADD_EXTENSION_DEP],
171 171 [
10 ext/pdo_pgsql/config.m4
@@ -110,18 +110,18 @@ if test "$PHP_PDO_PGSQL" != "no"; then
110 110 ],[
111 111 AC_MSG_CHECKING([for PDO includes])
112 112 if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
113   - pdo_inc_path=$abs_srcdir/ext
  113 + pdo_cv_inc_path=$abs_srcdir/ext
114 114 elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
115   - pdo_inc_path=$abs_srcdir/ext
  115 + pdo_cv_inc_path=$abs_srcdir/ext
116 116 elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
117   - pdo_inc_path=$prefix/include/php/ext
  117 + pdo_cv_inc_path=$prefix/include/php/ext
118 118 else
119 119 AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
120 120 fi
121   - AC_MSG_RESULT($pdo_inc_path)
  121 + AC_MSG_RESULT($pdo_cv_inc_path)
122 122 ])
123 123
124   - PHP_NEW_EXTENSION(pdo_pgsql, pdo_pgsql.c pgsql_driver.c pgsql_statement.c, $ext_shared,,-I$pdo_inc_path $PDO_PGSQL_CFLAGS)
  124 + PHP_NEW_EXTENSION(pdo_pgsql, pdo_pgsql.c pgsql_driver.c pgsql_statement.c, $ext_shared,,-I$pdo_cv_inc_path $PDO_PGSQL_CFLAGS)
125 125 ifdef([PHP_ADD_EXTENSION_DEP],
126 126 [
127 127 PHP_ADD_EXTENSION_DEP(pdo_pgsql, pdo)
12 ext/pdo_sqlite/config.m4
@@ -19,15 +19,15 @@ if test "$PHP_PDO_SQLITE" != "no"; then
19 19 ],[
20 20 AC_MSG_CHECKING([for PDO includes])
21 21 if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
22   - pdo_inc_path=$abs_srcdir/ext
  22 + pdo_cv_inc_path=$abs_srcdir/ext
23 23 elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
24   - pdo_inc_path=$abs_srcdir/ext
  24 + pdo_cv_inc_path=$abs_srcdir/ext
25 25 elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
26   - pdo_inc_path=$prefix/include/php/ext
  26 + pdo_cv_inc_path=$prefix/include/php/ext
27 27 else
28 28 AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
29 29 fi
30   - AC_MSG_RESULT($pdo_inc_path)
  30 + AC_MSG_RESULT($pdo_cv_inc_path)
31 31 ])
32 32
33 33 php_pdo_sqlite_sources_core="pdo_sqlite.c sqlite_driver.c sqlite_statement.c"
@@ -70,7 +70,7 @@ if test "$PHP_PDO_SQLITE" != "no"; then
70 70 ])
71 71
72 72 PHP_SUBST(PDO_SQLITE_SHARED_LIBADD)
73   - PHP_NEW_EXTENSION(pdo_sqlite, $php_pdo_sqlite_sources_core, $ext_shared,,-I$pdo_inc_path)
  73 + PHP_NEW_EXTENSION(pdo_sqlite, $php_pdo_sqlite_sources_core, $ext_shared,,-I$pdo_cv_inc_path)
74 74 else
75 75 # use bundled libs
76 76 if test "$enable_maintainer_zts" = "yes"; then
@@ -92,7 +92,7 @@ if test "$PHP_PDO_SQLITE" != "no"; then
92 92
93 93 PHP_NEW_EXTENSION(pdo_sqlite,
94 94 $php_pdo_sqlite_sources_core,
95   - $ext_shared,,-DPDO_SQLITE_BUNDLED=1 $other_flags $threadsafe_flags -I$pdo_inc_path)
  95 + $ext_shared,,-DPDO_SQLITE_BUNDLED=1 $other_flags $threadsafe_flags -I$pdo_cv_inc_path)
96 96
97 97 PHP_SUBST(PDO_SQLITE_SHARED_LIBADD)
98 98 PHP_ADD_EXTENSION_DEP(pdo_sqlite, sqlite3)

0 comments on commit 8e25677

Please sign in to comment.
Something went wrong with that request. Please try again.