echo "hmmm"; \
fi \
done;
- @echo ""
- @echo ""
- @echo "You're now ready to install PDO drivers for your database"
- @echo "If you'd like to have PDO show up in the list of installed"
- @echo "packages when you run \"pear list\", you may now run"
- @echo "\"sudo pear install package.xml\""
- @echo "this time, when prompted to press enter, you should type"
- @echo "\"no\" and press enter instead."
# mini hack
install: $(all_targets) $(install_targets) install-pdo-headers
dnl config.m4 for extension pdo
dnl vim:se ts=2 sw=2 et:
-AC_ARG_WITH(broken-pear-install,
-[],[
- if test "x$withval" = "xyes"; then
- case $host_alias in
- *darwin*)
- AC_MSG_ERROR([
-Due to the way that loadable modules work on OSX/Darwin, you need to
-compile the PDO package statically into the PHP core.
-
-Please follow the instructions at: http://netevil.org/node.php?nid=202
-for more detail on this issue.
- ])
+pdo_running_under_pear=0
+case `pwd` in
+ /var/tmp/pear-build-*)
+ pdo_running_under_pear=1
;;
- *)
- AC_MSG_ERROR([
-Due to a bug in the pear installer you should install the PDO package manually
-using the following steps:
-
- 1. Download the PDO package to your local machine:
-
- % wget http://pecl.php.net/get/PDO
-
- 2. Determine your PHP bin dir.
- If your php5 cli binary lives at /usr/local/php5/bin/php
- the bin dir is /usr/local/php5/bin
+esac
- 3. Set your path so that your PHP bin dir is at the front:
- export PATH="/usr/local/php5/bin:\$PATH"
+if test "$pdo_running_under_pear$PHP_PEAR_VERSION" = "1"; then
+ # we're running in an environment that smells like pear,
+ # and the PHP_PEAR_VERSION env var is not set. That implies
+ # that we're running under a slightly broken pear installer
+ AC_MSG_ERROR([
+PDO requires that you upgrade your PEAR installer tools. Please
+do so now by running:
- 4. Manually build:
-
- % tar xzf PDO-0.2.tgz
- % cd PDO-0.2
- % phpize
- % ./configure
- % make
- % sudo -s
- # make install
- # echo extension=pdo.so >> /usr/local/php5/lib/php.ini
+ % sudo pear upgrade pear
-We apologize for the inconvenience, and hope to resolve this problem
-in a future PHP/PEAR release.
+or by manually downloading and installing PEAR version 1.3.5 or higher.
+Once you've upgraded, please re-try your PDO install.
])
- ;;
- esac
fi
-])
PHP_ARG_ENABLE(pdo, whether to enable PDO support,
[ --enable-pdo=yes Enable PHP Data Objects support (recommended)], yes)
if test "$ext_shared" = "yes" ; then
case $host_alias in
*darwin*)
+ if test "$pdo_running_under_pear" = "1"; then
+ AC_MSG_ERROR([
+Due to the way that loadable modules work on OSX/Darwin, you need to
+compile the PDO package statically into the PHP core.
+
+Please follow the instructions at: http://netevil.org/node.php?nid=202
+for more detail on this issue.
+ ])
+ fi
ext_shared=no
;;
esac