]> granicus.if.org Git - php/commitdiff
MFH: Fix PDO configure dependancy: If --disable-pdo is used, disable all
authorJani Taskinen <jani@php.net>
Fri, 25 Jul 2008 13:46:24 +0000 (13:46 +0000)
committerJani Taskinen <jani@php.net>
Fri, 25 Jul 2008 13:46:24 +0000 (13:46 +0000)
MFH: enabled-by-default drivers. Also error out if you try to configure
MFH: a driver as static but pdo is disabled.

ext/pdo/config.m4
ext/pdo_dblib/config.m4
ext/pdo_firebird/config.m4
ext/pdo_mysql/config.m4
ext/pdo_oci/config.m4
ext/pdo_odbc/config.m4
ext/pdo_pgsql/config.m4
ext/pdo_sqlite/config.m4

index e073d35587260f2434846e6ac4049923f1170f06..f8515ddb1d4baa2a1f9fa9e653e124e04f6061cb 100755 (executable)
@@ -32,6 +32,9 @@ PHP_ARG_ENABLE(pdo, whether to enable PDO support,
 
 if test "$PHP_PDO" != "no"; then
 
+  dnl Make sure $PHP_PDO is 'yes' when it's not 'no' :)
+  PHP_PDO=yes
+
   PHP_PDO_PEAR_CHECK
 
   if test "$ext_shared" = "yes" ; then
index b66dd433d273d7dfa15e233927c80faf7b85921a..5aa89684848c73e3825fb8d3e1381d818c611c15 100644 (file)
@@ -2,14 +2,15 @@ dnl
 dnl $Id$
 dnl
 
-if test "$PHP_PDO" != "no"; then
 PHP_ARG_WITH(pdo-dblib, for PDO_DBLIB support via FreeTDS,
-[  --with-pdo-dblib[=DIR]    PDO: DBLIB-DB support.  DIR is the FreeTDS home
-                            directory])
-
+[  --with-pdo-dblib[=DIR]    PDO: DBLIB-DB support.  DIR is the FreeTDS home directory])
 
 if test "$PHP_PDO_DBLIB" != "no"; then
 
+  if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
+    AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
+  fi
+
   if test "$PHP_PDO_DBLIB" = "yes"; then
 
     for i in /usr/local /usr; do
@@ -84,5 +85,3 @@ if test "$PHP_PDO_DBLIB" != "no"; then
     PHP_ADD_EXTENSION_DEP(pdo_dblib, pdo)
   ])
 fi
-
-fi
index 0df50f9611fac629f154fc177deefd5d0fef3e0b..42cc4fc5a1335adefed9bc1f09e53699800f8730 100644 (file)
@@ -2,13 +2,16 @@ dnl
 dnl $Id$
 dnl
 
-if test "$PHP_PDO" != "no"; then
-
 PHP_ARG_WITH(pdo-firebird,for Firebird support for PDO,
 [  --with-pdo-firebird[=DIR] PDO: Firebird support.  DIR is the Firebird base
                             install directory [/opt/firebird]])
 
 if test "$PHP_PDO_FIREBIRD" != "no"; then
+
+  if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
+    AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
+  fi
+
   if test "$PHP_PDO_FIREBIRD" = "yes"; then
     FIREBIRD_INCDIR=/opt/firebird/include
     FIREBIRD_LIBDIR=/opt/firebird/lib
@@ -49,5 +52,3 @@ if test "$PHP_PDO_FIREBIRD" != "no"; then
   PHP_SUBST(PDO_FIREBIRD_SHARED_LIBADD)
   PHP_ADD_EXTENSION_DEP(pdo_firebird, pdo)
 fi
-
-fi
index 5b3e5e74fbb83f296cc089493f90bf5ccb21d2d0..c491c45d6bb541d8fb3b55c0513ad823b9a9142b 100755 (executable)
@@ -1,6 +1,6 @@
-dnl
 dnl $Id$
-dnl
++ dnl config.m4 for extension pdo_mysql
++ dnl vim: se ts=2 sw=2 et:
 
 PHP_ARG_WITH(pdo-mysql, for MySQL support for PDO,
 [  --with-pdo-mysql[=DIR]    PDO: MySQL support. DIR is the MySQL base directoy
@@ -13,6 +13,11 @@ if test -z "$PHP_ZLIB_DIR"; then
 fi
 
 if test "$PHP_PDO_MYSQL" != "no"; then
+
+  if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
+    AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
+  fi
+
   PHP_MYSQLND_ENABLED=yes
 
   AC_DEFUN([PDO_MYSQL_LIB_CHK], [
@@ -170,5 +175,3 @@ if test "$PHP_PDO_MYSQL" != "no"; then
 
   PHP_SUBST_OLD(PDO_MYSQL_MODULE_TYPE)
 fi
-
-dnl vim: se ts=2 sw=2 et:
index ec6747ea6f656e32d8140e1ead8793f3820202a1..3ebb154eb76f4a5f9905e620297255652528ec19 100755 (executable)
@@ -1,6 +1,6 @@
 dnl $Id$
-
-if test "$PHP_PDO" != "no"; then
+dnl config.m4 for extension pdo_oci
+dnl vim:et:sw=2:ts=2:
 
 AC_DEFUN([AC_PDO_OCI_VERSION],[
   AC_MSG_CHECKING([Oracle version])
@@ -61,6 +61,11 @@ PHP_ARG_WITH(pdo-oci, Oracle OCI support for PDO,
                             --with-pdo-oci=instantclient,/usr,10.2.0.3])
 
 if test "$PHP_PDO_OCI" != "no"; then
+
+  if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
+    AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
+  fi
+
   AC_MSG_CHECKING([Oracle Install-Dir])
   if test "$PHP_PDO_OCI" = "yes" || test -z "$PHP_PDO_OCI"; then
     PDO_OCI_DIR=$ORACLE_HOME
@@ -254,5 +259,3 @@ You need to tell me where to find your Oracle Instant Client SDK, or set ORACLE_
 
   AC_DEFINE_UNQUOTED(PHP_PDO_OCI_CLIENT_VERSION, "$PDO_OCI_VERSION", [ ])
 fi
-
-fi
index 1781234a01baa6ff9fd080bf428ac7e8621d7129..36e506bd2c4f64241c8c1aeb3bf917b6b3a8e24c 100755 (executable)
@@ -2,8 +2,6 @@ dnl $Id$
 dnl config.m4 for extension pdo_odbc
 dnl vim:et:sw=2:ts=2:
 
-if test "$PHP_PDO" != "no"; then
-
 define([PDO_ODBC_HELP_TEXT],[[
                             include and lib dirs are looked for under 'dir'.
                             
@@ -39,6 +37,10 @@ AC_DEFUN([PDO_ODBC_CHECK_HEADER],[
                                   
 if test "$PHP_PDO_ODBC" != "no"; then
 
+  if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
+    AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
+  fi
+
   ifdef([PHP_CHECK_PDO_INCLUDES],
   [
     PHP_CHECK_PDO_INCLUDES
@@ -170,5 +172,3 @@ functions required for PDO support.
     PHP_ADD_EXTENSION_DEP(pdo_odbc, pdo)
   ])
 fi
-
-fi
index 3abaf1306a2e5d4090935d4d7da55a1191d95076..8d480a32b8a97668cd650dc84361d5829c11472b 100644 (file)
@@ -1,14 +1,17 @@
-dnl
 dnl $Id$
-dnl
-
-if test "$PHP_PDO" != "no"; then
+dnl config.m4 for extension pdo_pgsql
+dnl vim:et:sw=2:ts=2:
 
 PHP_ARG_WITH(pdo-pgsql,for PostgreSQL support for PDO,
 [  --with-pdo-pgsql[=DIR]    PDO: PostgreSQL support.  DIR is the PostgreSQL base
                             install directory or the path to pg_config])
 
 if test "$PHP_PDO_PGSQL" != "no"; then
+
+  if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
+    AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
+  fi
+
   PHP_EXPAND_PATH($PGSQL_INCLUDE, PGSQL_INCLUDE)
 
   AC_MSG_CHECKING(for pg_config)
@@ -128,5 +131,3 @@ if test "$PHP_PDO_PGSQL" != "no"; then
     PHP_ADD_EXTENSION_DEP(pdo_pgsql, pdo) 
   ])
 fi
-
-fi
index 5c33da65d3241c3a055eb8c0d45c63811cc49983..3860a42c621f1c5be0dc70d2b762e7d39430bc91 100644 (file)
@@ -2,15 +2,17 @@ dnl $Id$
 dnl config.m4 for extension pdo_sqlite
 dnl vim:et:sw=2:ts=2:
 
-if test "$PHP_PDO" != "no"; then
-
 PHP_ARG_WITH(pdo-sqlite, for sqlite 3 support for PDO,
 [  --without-pdo-sqlite[=DIR]
                             PDO: sqlite 3 support.  DIR is the sqlite base
-                            install directory [BUNDLED]], yes)
+                            install directory [BUNDLED]], $PHP_PDO)
 
 if test "$PHP_PDO_SQLITE" != "no"; then
 
+  if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
+    AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
+  fi
+
   ifdef([PHP_CHECK_PDO_INCLUDES],
   [
     PHP_CHECK_PDO_INCLUDES
@@ -98,5 +100,3 @@ if test "$PHP_PDO_SQLITE" != "no"; then
     PHP_ADD_EXTENSION_DEP(pdo_sqlite, pdo)
   ])
 fi
-
-fi