summaryrefslogtreecommitdiffhomepage
path: root/auto
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2023-03-29 11:14:25 +0400
committerSergey Kandaurov <pluknet@nginx.com>2023-03-29 11:14:25 +0400
commite8fbc967470b39513248cd961ccccf7a032831ea (patch)
treea08db4a8af3ad8bc454e1f905bed02e2544d8567 /auto
parent25d8ab363b7ac63c37f21b35edc92b02bd0a74cc (diff)
parentdfe70f74a3558f05142fb552cea239add123d414 (diff)
downloadnginx-e8fbc967470b39513248cd961ccccf7a032831ea.tar.gz
nginx-e8fbc967470b39513248cd961ccccf7a032831ea.tar.bz2
Merged with the default branch.
Diffstat (limited to 'auto')
-rw-r--r--auto/cc/conf2
-rw-r--r--auto/cc/msvc19
-rwxr-xr-xauto/configure1
-rw-r--r--auto/lib/openssl/make15
-rw-r--r--auto/lib/openssl/makefile.msvc2
-rw-r--r--auto/os/linux1
6 files changed, 34 insertions, 6 deletions
diff --git a/auto/cc/conf b/auto/cc/conf
index afbca62bc..ba31cb88c 100644
--- a/auto/cc/conf
+++ b/auto/cc/conf
@@ -117,7 +117,7 @@ else
. auto/cc/acc
;;
- msvc*)
+ msvc)
# MSVC++ 6.0 SP2, MSVC++ Toolkit 2003
. auto/cc/msvc
diff --git a/auto/cc/msvc b/auto/cc/msvc
index 68435ff48..567bac7bc 100644
--- a/auto/cc/msvc
+++ b/auto/cc/msvc
@@ -11,8 +11,8 @@
# MSVC 2015 (14.0) cl 19.00
-NGX_MSVC_VER=`$NGX_WINE $CC 2>&1 | grep 'Compiler Version' 2>&1 \
- | sed -e 's/^.* Version \(.*\)/\1/'`
+NGX_MSVC_VER=`$NGX_WINE $CC 2>&1 | grep 'C/C++.* [0-9][0-9]*\.[0-9]' 2>&1 \
+ | sed -e 's/^.* \([0-9][0-9]*\.[0-9].*\)/\1/'`
echo " + cl version: $NGX_MSVC_VER"
@@ -22,6 +22,21 @@ have=NGX_COMPILER value="\"cl $NGX_MSVC_VER\"" . auto/define
ngx_msvc_ver=`echo $NGX_MSVC_VER | sed -e 's/^\([0-9]*\).*/\1/'`
+# detect x64 builds
+
+case "$NGX_MSVC_VER" in
+
+ *x64)
+ NGX_MACHINE=amd64
+ ;;
+
+ *)
+ NGX_MACHINE=i386
+ ;;
+
+esac
+
+
# optimizations
# maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy
diff --git a/auto/configure b/auto/configure
index 474d69e84..5b88ebb4c 100755
--- a/auto/configure
+++ b/auto/configure
@@ -44,6 +44,7 @@ if test -z "$NGX_PLATFORM"; then
else
echo "building for $NGX_PLATFORM"
NGX_SYSTEM=$NGX_PLATFORM
+ NGX_MACHINE=i386
fi
. auto/cc/conf
diff --git a/auto/lib/openssl/make b/auto/lib/openssl/make
index 126a23875..a7e9369e7 100644
--- a/auto/lib/openssl/make
+++ b/auto/lib/openssl/make
@@ -7,11 +7,24 @@ case "$CC" in
cl)
+ case "$NGX_MACHINE" in
+
+ amd64)
+ OPENSSL_TARGET=VC-WIN64A
+ ;;
+
+ *)
+ OPENSSL_TARGET=VC-WIN32
+ ;;
+
+ esac
+
cat << END >> $NGX_MAKEFILE
$OPENSSL/openssl/include/openssl/ssl.h: $NGX_MAKEFILE
\$(MAKE) -f auto/lib/openssl/makefile.msvc \
- OPENSSL="$OPENSSL" OPENSSL_OPT="$OPENSSL_OPT"
+ OPENSSL="$OPENSSL" OPENSSL_OPT="$OPENSSL_OPT" \
+ OPENSSL_TARGET="$OPENSSL_TARGET"
END
diff --git a/auto/lib/openssl/makefile.msvc b/auto/lib/openssl/makefile.msvc
index a30b28669..ed17cde08 100644
--- a/auto/lib/openssl/makefile.msvc
+++ b/auto/lib/openssl/makefile.msvc
@@ -6,7 +6,7 @@
all:
cd $(OPENSSL)
- perl Configure VC-WIN32 no-shared no-threads \
+ perl Configure $(OPENSSL_TARGET) no-shared no-threads \
--prefix="%cd%/openssl" \
--openssldir="%cd%/openssl/ssl" \
$(OPENSSL_OPT)
diff --git a/auto/os/linux b/auto/os/linux
index 4849baf0e..02dcaf290 100644
--- a/auto/os/linux
+++ b/auto/os/linux
@@ -282,7 +282,6 @@ ngx_feature="UDP_SEGMENT"
ngx_feature_name="NGX_HAVE_UDP_SEGMENT"
ngx_feature_run=no
ngx_feature_incs="#include <sys/socket.h>
- #include <stdint.h>
#include <netinet/udp.h>"
ngx_feature_path=
ngx_feature_libs=