]> granicus.if.org Git - php/commitdiff
try to handle OSX issues more gracefully
authorWez Furlong <wez@php.net>
Sun, 13 Feb 2005 01:54:59 +0000 (01:54 +0000)
committerWez Furlong <wez@php.net>
Sun, 13 Feb 2005 01:54:59 +0000 (01:54 +0000)
ext/pdo/config.m4

index 7c0dcbfd2b920a9bd5c0b953df49b5fbb2cefd5c..357d81966ca14464ee8a05024a54ceaeb93bcebf 100755 (executable)
@@ -1,10 +1,22 @@
 dnl $Id$
 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
-  AC_MSG_ERROR([
+  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.
+    ])
+    ;;
+  *)
+    AC_MSG_ERROR([
 Due to a bug in the pear installer you should install the PDO package manually
 using the following steps:
 
@@ -34,6 +46,8 @@ We apologize for the inconvenience, and hope to resolve this problem
 in a future PHP/PEAR release.
 
 ])
+    ;;
+  esac
 fi
 ])
 
@@ -41,6 +55,13 @@ PHP_ARG_ENABLE(pdo, whether to disable PDO support,
 [  --disable-pdo            Disable PHP Data Objects support], yes)
 
 if test "$PHP_PDO" != "no"; then
+  if test "$ext_shared" = "yes" ; then
+    case $host_alias in
+      *darwin*)
+        ext_shared=no
+        ;;
+    esac
+  fi
   PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared)
   PHP_ADD_MAKEFILE_FRAGMENT
 fi