|
1 |
| -// vim:ft=javascript |
2 |
| -// $Id: config.w32 306241 2010-12-11 22:18:10Z pajoye $ |
3 |
| -// "Master" config file; think of it as a configure.in |
4 |
| -// equivalent. |
5 |
| - |
6 |
| -ARG_WITH("toolset", "Toolset to use for the compilation, give: vs, clang, icc. " + |
7 |
| - "The only recommended and supported toolset for production use " + |
8 |
| - "is Visual Studio. Use others at your own risk.", "vs"); |
9 |
| -toolset_option_handle() |
10 |
| - |
11 |
| -var PHP_CYGWIN="notset"; |
12 |
| - |
13 |
| -toolset_setup_compiler(); |
14 |
| - |
15 |
| -// do we use x64 or 80x86 version of compiler? |
16 |
| -X64 = toolset_is_64(); |
17 |
| -toolset_setup_arch(); |
18 |
| - |
19 |
| -toolset_setup_linker(); |
20 |
| -toolset_setup_project_tools(); |
21 |
| - |
22 |
| -// stick objects somewhere outside of the source tree |
23 |
| -ARG_ENABLE('object-out-dir', 'Alternate location for binary objects during build', ''); |
24 |
| -object_out_dir_option_handle(); |
25 |
| - |
26 |
| -ARG_ENABLE('debug', 'Compile with debugging symbols', PHP_DEBUG); |
27 |
| -ARG_ENABLE('debug-pack', 'Release binaries with external debug symbols (--enable-debug must not be specified)', 'no'); |
28 |
| -if (PHP_DEBUG == "yes" && PHP_DEBUG_PACK == "yes") { |
29 |
| - ERROR("Use of both --enable-debug and --enable-debug-pack not allowed."); |
30 |
| -} |
31 |
| - |
32 |
| -if (PHP_PREFIX == '') { |
33 |
| - PHP_PREFIX = "C:\\php"; |
34 |
| - if (PHP_DEBUG == "yes") |
35 |
| - PHP_PREFIX += "\\debug"; |
36 |
| -} |
37 |
| -DEFINE('PHP_PREFIX', PHP_PREFIX); |
38 |
| - |
39 |
| -DEFINE("BASE_INCLUDES", "/I " + PHP_DIR + "/include /I " + PHP_DIR + "/include/main /I " + PHP_DIR + "/include/Zend /I " + PHP_DIR + "/include/TSRM /I " + PHP_DIR + "/include/ext "); |
40 |
| - |
41 |
| -toolset_setup_common_cflags(); |
42 |
| - |
| 1 | +// vim:ft=javascript |
| 2 | +// $Id: config.w32 306241 2010-12-11 22:18:10Z pajoye $ |
| 3 | +// "Master" config file; think of it as a configure.in |
| 4 | +// equivalent. |
| 5 | + |
| 6 | +ARG_WITH("toolset", "Toolset to use for the compilation, give: vs, clang, icc. " + |
| 7 | + "The only recommended and supported toolset for production use " + |
| 8 | + "is Visual Studio. Use others at your own risk.", "vs"); |
| 9 | +toolset_option_handle() |
| 10 | + |
| 11 | +var PHP_CYGWIN="notset"; |
| 12 | + |
| 13 | +toolset_setup_compiler(); |
| 14 | + |
| 15 | +// do we use x64 or 80x86 version of compiler? |
| 16 | +X64 = toolset_is_64(); |
| 17 | +toolset_setup_arch(); |
| 18 | + |
| 19 | +toolset_setup_linker(); |
| 20 | +toolset_setup_project_tools(); |
| 21 | + |
| 22 | +// stick objects somewhere outside of the source tree |
| 23 | +ARG_ENABLE('object-out-dir', 'Alternate location for binary objects during build', ''); |
| 24 | +object_out_dir_option_handle(); |
| 25 | + |
| 26 | +ARG_ENABLE('debug', 'Compile with debugging symbols', PHP_DEBUG); |
| 27 | +ARG_ENABLE('debug-pack', 'Release binaries with external debug symbols (--enable-debug must not be specified)', 'no'); |
| 28 | +if (PHP_DEBUG == "yes" && PHP_DEBUG_PACK == "yes") { |
| 29 | + ERROR("Use of both --enable-debug and --enable-debug-pack not allowed."); |
| 30 | +} |
| 31 | + |
| 32 | +if (PHP_PREFIX == '') { |
| 33 | + PHP_PREFIX = "C:\\php"; |
| 34 | + if (PHP_DEBUG == "yes") |
| 35 | + PHP_PREFIX += "\\debug"; |
| 36 | +} |
| 37 | +DEFINE('PHP_PREFIX', PHP_PREFIX); |
| 38 | + |
| 39 | +DEFINE("BASE_INCLUDES", "/I " + PHP_DIR + "/include /I " + PHP_DIR + "/include/main /I " + PHP_DIR + "/include/Zend /I " + PHP_DIR + "/include/TSRM /I " + PHP_DIR + "/include/ext "); |
| 40 | + |
| 41 | +toolset_setup_common_cflags(); |
| 42 | + |
43 | 43 | ARG_WITH('prefix', 'PHP installation prefix', PHP_PREFIX);
|
44 |
| -ARG_WITH('mp', 'Tell Visual Studio use up to [n,auto,disable] processes for compilation', 'auto'); |
45 |
| -var PHP_MP_DISABLED = true; |
46 |
| -if (VS_TOOLSET && PHP_MP != 'disable') { |
47 |
| - // no from disable-all |
48 |
| - if(PHP_MP == 'auto' || PHP_MP == 'no') { |
49 |
| - ADD_FLAG('CFLAGS', ' /MP '); |
50 |
| - PHP_MP_DISABLED = false; |
51 |
| - } else { |
52 |
| - if(parseInt(PHP_MP) != 0) { |
53 |
| - ADD_FLAG('CFLAGS', ' /MP'+ PHP_MP +' '); |
54 |
| - PHP_MP_DISABLED = false; |
55 |
| - } else { |
56 |
| - STDOUT.WriteLine('WARNING: Invalid argument for MP: ' + PHP_MP); |
57 |
| - } |
58 |
| - } |
59 |
| -} |
60 |
| - |
61 |
| -/* For snapshot builders, where can we find the additional |
62 |
| - * files that make up the snapshot template? */ |
63 |
| -ARG_WITH("snapshot-template", "Path to snapshot builder template dir", "no"); |
64 |
| - |
65 |
| -// General link flags |
66 |
| -toolset_setup_common_ldlags(); |
67 |
| - |
68 |
| -// General libs |
69 |
| -toolset_setup_common_libs(); |
70 |
| - |
71 |
| -// Set some debug/release specific options |
72 |
| -toolset_setup_build_mode(); |
73 |
| - |
74 |
| -setup_zts_stuff(); |
75 |
| - |
76 |
| -if (MODE_PHPIZE) { |
77 |
| - DEFINE("PHPDLL", PHP_DLL); |
78 |
| - DEFINE("PHPLIB", PHP_DLL_LIB); |
79 |
| -} |
80 |
| - |
81 |
| -// Find the php_build dir - it contains headers and libraries |
82 |
| -// that we need |
83 |
| -ARG_WITH('php-build', 'Path to where you extracted the development libraries (http://wiki.php.net/internals/windows/libs). Assumes that it is a sibling of this source dir (..\\deps) if not specified', 'no'); |
84 |
| -php_build_option_handle(); |
85 |
| - |
86 |
| -ARG_WITH('extra-includes', 'Extra include path to use when building everything', ''); |
87 |
| -ARG_WITH('extra-libs', 'Extra library path to use when linking everything', ''); |
88 |
| - |
89 |
| -var php_usual_include_suspects = PHP_PHP_BUILD+"\\include"; |
90 |
| -var php_usual_lib_suspects = PHP_PHP_BUILD+"\\lib"; |
91 |
| - |
92 |
| -ADD_FLAG("CFLAGS", '/I "' + php_usual_include_suspects + '" '); |
93 |
| -ADD_FLAG("LDFLAGS", '/libpath:"\\"' + php_usual_lib_suspects + '\\"" '); |
94 |
| -ADD_FLAG("ARFLAGS", '/libpath:"\\"' + php_usual_lib_suspects + '\\"" '); |
95 |
| - |
96 |
| -probe_basic_headers(); |
97 |
| -add_extra_dirs(); |
98 |
| - |
99 |
| -//DEFINE("PHP_BUILD", PHP_PHP_BUILD); |
100 |
| - |
101 |
| -STDOUT.WriteBlankLines(1); |
102 |
| -STDOUT.WriteLine("Build dir: " + get_define('BUILD_DIR')); |
103 |
| -STDOUT.WriteLine("PHP Core: " + get_define('PHPDLL') + " and " + get_define('PHPLIB')); |
104 |
| - |
105 |
| -/* XXX inspect this for other toolsets */ |
106 |
| -//AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1); |
107 |
| - |
108 |
| -AC_DEFINE('HAVE_STRNLEN', 1); |
109 |
| - |
110 |
| -STDOUT.WriteBlankLines(1); |
111 |
| - |
112 |
| -if (PHP_SNAPSHOT_TEMPLATE == "no") { |
113 |
| - /* default is as a sibling of the php_build dir */ |
114 |
| - if (FSO.FolderExists(PHP_PHP_BUILD + "\\template")) { |
115 |
| - PHP_SNAPSHOT_TEMPLATE = FSO.GetAbsolutePathName(PHP_PHP_BUILD + "\\template"); |
116 |
| - } else if (FSO.FolderExists(PHP_PHP_BUILD + "\\..\\template")) { |
117 |
| - PHP_SNAPSHOT_TEMPLATE = FSO.GetAbsolutePathName(PHP_PHP_BUILD + "\\..\\template"); |
118 |
| - } |
119 |
| -} |
120 |
| - |
121 |
| -DEFINE('SNAPSHOT_TEMPLATE', PHP_SNAPSHOT_TEMPLATE); |
122 |
| - |
123 |
| -AC_DEFINE("PHP_DIR", PHP_DIR); |
124 |
| -DEFINE("PHP_DIR", PHP_DIR); |
125 |
| - |
126 |
| -ARG_WITH("codegen-arch", "Architecture for code generation", "no"); |
127 |
| -toolset_setup_codegen_arch(); |
128 |
| -
|
| 44 | +ARG_WITH('mp', 'Tell Visual Studio use up to [n,auto,disable] processes for compilation', 'auto'); |
| 45 | +var PHP_MP_DISABLED = true; |
| 46 | +if (VS_TOOLSET && PHP_MP != 'disable') { |
| 47 | + // no from disable-all |
| 48 | + if(PHP_MP == 'auto' || PHP_MP == 'no') { |
| 49 | + ADD_FLAG('CFLAGS', ' /MP '); |
| 50 | + PHP_MP_DISABLED = false; |
| 51 | + } else { |
| 52 | + if(parseInt(PHP_MP) != 0) { |
| 53 | + ADD_FLAG('CFLAGS', ' /MP'+ PHP_MP +' '); |
| 54 | + PHP_MP_DISABLED = false; |
| 55 | + } else { |
| 56 | + STDOUT.WriteLine('WARNING: Invalid argument for MP: ' + PHP_MP); |
| 57 | + } |
| 58 | + } |
| 59 | +} |
| 60 | + |
| 61 | +/* For snapshot builders, where can we find the additional |
| 62 | + * files that make up the snapshot template? */ |
| 63 | +ARG_WITH("snapshot-template", "Path to snapshot builder template dir", "no"); |
| 64 | + |
| 65 | +// General link flags |
| 66 | +toolset_setup_common_ldlags(); |
| 67 | + |
| 68 | +// General libs |
| 69 | +toolset_setup_common_libs(); |
| 70 | + |
| 71 | +// Set some debug/release specific options |
| 72 | +toolset_setup_build_mode(); |
| 73 | + |
| 74 | +setup_zts_stuff(); |
| 75 | + |
| 76 | +if (MODE_PHPIZE) { |
| 77 | + DEFINE("PHPDLL", PHP_DLL); |
| 78 | + DEFINE("PHPLIB", PHP_DLL_LIB); |
| 79 | +} |
| 80 | + |
| 81 | +// Find the php_build dir - it contains headers and libraries |
| 82 | +// that we need |
| 83 | +ARG_WITH('php-build', 'Path to where you extracted the development libraries (http://wiki.php.net/internals/windows/libs). Assumes that it is a sibling of this source dir (..\\deps) if not specified', 'no'); |
| 84 | +php_build_option_handle(); |
| 85 | + |
| 86 | +ARG_WITH('extra-includes', 'Extra include path to use when building everything', ''); |
| 87 | +ARG_WITH('extra-libs', 'Extra library path to use when linking everything', ''); |
| 88 | + |
| 89 | +var php_usual_include_suspects = PHP_PHP_BUILD+"\\include"; |
| 90 | +var php_usual_lib_suspects = PHP_PHP_BUILD+"\\lib"; |
| 91 | + |
| 92 | +ADD_FLAG("CFLAGS", '/I "' + php_usual_include_suspects + '" '); |
| 93 | +ADD_FLAG("LDFLAGS", '/libpath:"\\"' + php_usual_lib_suspects + '\\"" '); |
| 94 | +ADD_FLAG("ARFLAGS", '/libpath:"\\"' + php_usual_lib_suspects + '\\"" '); |
| 95 | + |
| 96 | +probe_basic_headers(); |
| 97 | +add_extra_dirs(); |
| 98 | + |
| 99 | +//DEFINE("PHP_BUILD", PHP_PHP_BUILD); |
| 100 | + |
| 101 | +STDOUT.WriteBlankLines(1); |
| 102 | +STDOUT.WriteLine("Build dir: " + get_define('BUILD_DIR')); |
| 103 | +STDOUT.WriteLine("PHP Core: " + get_define('PHPDLL') + " and " + get_define('PHPLIB')); |
| 104 | + |
| 105 | +/* XXX inspect this for other toolsets */ |
| 106 | +//AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1); |
| 107 | + |
| 108 | +AC_DEFINE('HAVE_STRNLEN', 1); |
| 109 | + |
| 110 | +STDOUT.WriteBlankLines(1); |
| 111 | + |
| 112 | +if (PHP_SNAPSHOT_TEMPLATE == "no") { |
| 113 | + /* default is as a sibling of the php_build dir */ |
| 114 | + if (FSO.FolderExists(PHP_PHP_BUILD + "\\template")) { |
| 115 | + PHP_SNAPSHOT_TEMPLATE = FSO.GetAbsolutePathName(PHP_PHP_BUILD + "\\template"); |
| 116 | + } else if (FSO.FolderExists(PHP_PHP_BUILD + "\\..\\template")) { |
| 117 | + PHP_SNAPSHOT_TEMPLATE = FSO.GetAbsolutePathName(PHP_PHP_BUILD + "\\..\\template"); |
| 118 | + } |
| 119 | +} |
| 120 | + |
| 121 | +DEFINE('SNAPSHOT_TEMPLATE', PHP_SNAPSHOT_TEMPLATE); |
| 122 | + |
| 123 | +AC_DEFINE("PHP_DIR", PHP_DIR); |
| 124 | +DEFINE("PHP_DIR", PHP_DIR); |
| 125 | + |
| 126 | +ARG_WITH("codegen-arch", "Architecture for code generation", "no"); |
| 127 | +toolset_setup_codegen_arch(); |
| 128 | + |
0 commit comments