summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorStig Bakken <ssb@php.net>2002-10-08 01:04:52 +0000
committerStig Bakken <ssb@php.net>2002-10-08 01:04:52 +0000
commit231efd186f49d782c8ad70e26b64bea544495d6d (patch)
treea769016b38fae0ed800d60eb83734599315b15fb /main
parentd5cbbd9f02c783ed666d19f8e9432d0d23072a4e (diff)
downloadphp-git-231efd186f49d782c8ad70e26b64bea544495d6d.tar.gz
* make these variables configurable from environment on Windows:
PEAR_INSTALLDIR PHP_BINDIR PHP_CONFIG_FILE_PATH PHP_CONFIG_FILE_SCAN_DIR PHP_DATADIR PHP_EXTENSION_DIR PHP_INCLUDE_PATH PHP_LIBDIR PHP_LOCALSTATEDIR PHP_PREFIX PHP_SYSCONFDIR
Diffstat (limited to 'main')
-rw-r--r--main/config.w32.h.in24
1 files changed, 13 insertions, 11 deletions
diff --git a/main/config.w32.h.in b/main/config.w32.h.in
index 66ad21a5e7..f185a48b1e 100644
--- a/main/config.w32.h.in
+++ b/main/config.w32.h.in
@@ -6,18 +6,20 @@
*/
/* Default PHP / PEAR directories */
+#define CONDENV(ev,def) (getenv(ev)!=NULL?getenv(ev):def)
+
#define CONFIGURATION_FILE_PATH "php.ini"
-#define PEAR_INSTALLDIR "c:\\php4\\pear"
-#define PHP_BINDIR "c:\\php4"
-#define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):""
-#define PHP_CONFIG_FILE_SCAN_DIR ""
-#define PHP_DATADIR "c:\\php4"
-#define PHP_EXTENSION_DIR "c:\\php4"
-#define PHP_INCLUDE_PATH ".;c:\\php4\\pear"
-#define PHP_LIBDIR "c:\\php4"
-#define PHP_LOCALSTATEDIR "c:\\php4"
-#define PHP_PREFIX "c:\\php4"
-#define PHP_SYSCONFDIR "c:\\php4"
+#define PEAR_INSTALLDIR CONDENV("PEAR_INSTALLDIR", "c:\\php4\\pear")
+#define PHP_BINDIR CONDENV("PHP_BINDIR", "c:\\php4")
+#define PHP_CONFIG_FILE_PATH CONDENV("SystemRoot", "")
+#define PHP_CONFIG_FILE_SCAN_DIR CONDENV("PHP_CONFIG_FILE_SCAN_DIR", "")
+#define PHP_DATADIR CONDENV("PHP_DATADIR", "c:\\php4")
+#define PHP_EXTENSION_DIR CONDENV("PHP_EXTENSION_DIR", "c:\\php4")
+#define PHP_INCLUDE_PATH CONDENV("PHP_INCLUDE_PATH", ".;c:\\php4\\pear")
+#define PHP_LIBDIR CONDENV("PHP_LIBDIR", "c:\\php4")
+#define PHP_LOCALSTATEDIR CONDENV("PHP_LOCALSTATEDIR", "c:\\php4")
+#define PHP_PREFIX CONDENV("PHP_PREFIX", "c:\\php4")
+#define PHP_SYSCONFDIR CONDENV("PHP_SYSCONFDIR", "c:\\php4")
/* Enable / Disable BCMATH extension (default: enabled) */
#define WITH_BCMATH 1