]> granicus.if.org Git - php/commitdiff
generalize arch setup
authorAnatol Belski <ab@php.net>
Wed, 12 Nov 2014 10:14:56 +0000 (11:14 +0100)
committerAnatol Belski <ab@php.net>
Wed, 12 Nov 2014 16:57:16 +0000 (17:57 +0100)
win32/build/config.w32
win32/build/config.w32.phpize.in
win32/build/confutils.js

index 65c273a5bc0514964cf9d1f3a197d36a215f1388..748631dddeb810c413f9a8cf577cedb19e13a3e6 100644 (file)
@@ -14,13 +14,7 @@ toolset_setup_compiler();
 
 // do we use x64 or 80x86 version of compiler?
 X64 = toolset_is_64();
-if (X64) {
-       STDOUT.WriteLine("  Detected 64-bit compiler");
-} else {
-       STDOUT.WriteLine("  Detected 32-bit compiler");
-}
-AC_DEFINE('ARCHITECTURE', X64 ? 'x64' : 'x86', "Detected compiler architecture");
-DEFINE("PHP_ARCHITECTURE", X64 ? 'x64' : 'x86');
+toolset_setup_arch();
 
 toolset_setup_linker();
 toolset_setup_project_tools();
index 8b831f0b10ddee5a90d3b4b8d2099c75669ae548..6a33dc20362bda8a4aa144a922ad2d5aebb960cd 100644 (file)
@@ -14,13 +14,7 @@ toolset_setup_compiler();
 \r
 // do we use x64 or 80x86 version of compiler?\r
 X64 = toolset_is_64();\r
-if (X64) {\r
-       STDOUT.WriteLine("  Detected 64-bit compiler");\r
-} else {\r
-       STDOUT.WriteLine("  Detected 32-bit compiler");\r
-}\r
-AC_DEFINE('ARCHITECTURE', X64 ? 'x64' : 'x86', "Detected compiler architecture");\r
-DEFINE("PHP_ARCHITECTURE", X64 ? 'x64' : 'x86');\r
+toolset_setup_arch();\r
 \r
 toolset_setup_linker();\r
 toolset_setup_project_tools();\r
index 1aac59ea5f8f4c3fca4a8c620dfe13c3fab37945..94068bfa9d48d4c46c1efcfeb4494980ac33fd73 100644 (file)
@@ -2502,6 +2502,17 @@ function toolset_is_64()
        ERROR("Unsupported toolset");
 }
 
+function toolset_setup_arch()
+{
+       if (X64) {
+               STDOUT.WriteLine("  Detected 64-bit compiler");
+       } else {
+               STDOUT.WriteLine("  Detected 32-bit compiler");
+       }
+       AC_DEFINE('ARCHITECTURE', X64 ? 'x64' : 'x86', "Detected compiler architecture");
+       DEFINE("PHP_ARCHITECTURE", X64 ? 'x64' : 'x86');
+}
+
 
 function toolset_setup_linker()
 {