diff options
author | Tomas V.V.Cox <cox@php.net> | 2003-06-18 19:27:55 +0000 |
---|---|---|
committer | Tomas V.V.Cox <cox@php.net> | 2003-06-18 19:27:55 +0000 |
commit | d3f9d47aa939167ba34ed1777d218c7ed1398afd (patch) | |
tree | db585aaec806297e0eeae0470bcc0635bdb86db4 | |
parent | 6fa60939f2d95750dfeba4356bc92128131661a0 (diff) | |
download | php-git-d3f9d47aa939167ba34ed1777d218c7ed1398afd.tar.gz |
Be more clever for discovering the default ext_dir
-rw-r--r-- | pear/PEAR/Config.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pear/PEAR/Config.php b/pear/PEAR/Config.php index 0358d7c8a2..82c36fad4a 100644 --- a/pear/PEAR/Config.php +++ b/pear/PEAR/Config.php @@ -73,7 +73,15 @@ if (getenv('PHP_PEAR_INSTALL_DIR')) { if (getenv('PHP_PEAR_EXTENSION_DIR')) { define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR')); } else { - define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir')); + if (!ini_get('extension_dir')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir')); + } elseif (defined('PEAR_EXTENSION_DIR') && @is_dir(PEAR_EXTENSION_DIR)) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', PEAR_EXTENSION_DIR); + } elseif (defined('PHP_EXTENSION_DIR')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', PHP_EXTENSION_DIR); + } else { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', '.'); + } } // Default for doc_dir |