1dnl config.m4 for extension pdo 2dnl vim:se ts=2 sw=2 et: 3 4AC_DEFUN([PHP_PDO_PEAR_CHECK],[ 5 pdo_running_under_pear=0 6 case `pwd` in 7 /var/tmp/pear-build-*) 8 pdo_running_under_pear=1 9 ;; 10 esac 11 12 if test "$pdo_running_under_pear$PHP_PEAR_VERSION" = "1"; then 13 # we're running in an environment that smells like pear, 14 # and the PHP_PEAR_VERSION env var is not set. That implies 15 # that we're running under a slightly broken pear installer 16 AC_MSG_ERROR([ 17PDO requires that you upgrade your PEAR installer tools. Please 18do so now by running: 19 20 % sudo pear upgrade pear 21 22or by manually downloading and installing PEAR version 1.3.5 or higher. 23 24Once you've upgraded, please re-try your PDO install. 25 ]) 26 fi 27]) 28 29PHP_ARG_ENABLE(pdo, whether to enable PDO support, 30[ --disable-pdo Disable PHP Data Objects support], yes) 31 32if test "$PHP_PDO" != "no"; then 33 34 dnl Make sure $PHP_PDO is 'yes' when it's not 'no' :) 35 PHP_PDO=yes 36 37 PHP_PDO_PEAR_CHECK 38 39 PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared) 40 ifdef([PHP_ADD_EXTENSION_DEP], 41 [ 42 PHP_ADD_EXTENSION_DEP(pdo, spl, true) 43 ]) 44 45 ifdef([PHP_INSTALL_HEADERS], 46 [ 47 dnl Sadly, this is a complete NOP for pecl extensions 48 PHP_INSTALL_HEADERS(ext/pdo, [php_pdo.h php_pdo_driver.h php_pdo_error.h]) 49 ]) 50 51 dnl so we always include the known-good working hack. 52 PHP_ADD_MAKEFILE_FRAGMENT 53fi 54