mirror of
https://github.com/nginx/nginx.git
synced 2024-12-19 05:33:52 -06:00
fix building OpenSSL on Win32
This commit is contained in:
parent
bfbded71fc
commit
2d252980ed
@ -3,19 +3,19 @@
|
||||
|
||||
|
||||
if [ $OPENSSL != NONE ]; then
|
||||
CORE_INCS="$CORE_INCS $OPENSSL/include"
|
||||
|
||||
case "$CC" in
|
||||
|
||||
cl|bcc32)
|
||||
cl | bcc32)
|
||||
have=NGX_OPENSSL . auto/have
|
||||
have=NGX_SSL . auto/have
|
||||
|
||||
LINK_DEPS="$LINK_DEPS $OPENSSL/out32/ssleay32.lib"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/out32/ssleay32.lib"
|
||||
CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
|
||||
|
||||
LINK_DEPS="$LINK_DEPS $OPENSSL/out32/libeay32.lib"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/out32/libeay32.lib"
|
||||
CORE_INCS="$CORE_INCS $OPENSSL/openssl/include"
|
||||
CORE_DEPS="$CORE_DEPS $OPENSSL/openssl/include/openssl/ssl.h"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/ssleay32.lib"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/libeay32.lib"
|
||||
|
||||
# libeay32.lib requires gdi32.lib
|
||||
CORE_LIBS="$CORE_LIBS gdi32.lib"
|
||||
@ -24,6 +24,8 @@ if [ $OPENSSL != NONE ]; then
|
||||
*)
|
||||
have=NGX_OPENSSL . auto/have
|
||||
have=NGX_SSL . auto/have
|
||||
|
||||
CORE_INCS="$CORE_INCS $OPENSSL/include"
|
||||
LINK_DEPS="$LINK_DEPS $OPENSSL/libssl.a $OPENSSL/libcrypto.a"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/libssl.a $OPENSSL/libcrypto.a"
|
||||
;;
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
if test -n "$OPENSSL_OPT"; then
|
||||
NGX_OPENSSL_CONFIG="./Configure \"$OPENSSL_OPT\""
|
||||
NGX_OPENSSL_CONFIG="./Configure $OPENSSL_OPT"
|
||||
else
|
||||
NGX_OPENSSL_CONFIG="./config"
|
||||
fi
|
||||
@ -14,29 +14,37 @@ case $USE_THREADS in
|
||||
esac
|
||||
|
||||
case "$CC" in
|
||||
|
||||
cl)
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$OPENSSL/out32/ssleay32.lib:
|
||||
cd $OPENSSL
|
||||
perl Configure VC-WIN32 no-shared
|
||||
ms\\do_ms
|
||||
\$(MAKE) -f ms\\nt.mak
|
||||
cd \$(MAKEDIR)
|
||||
$OPENSSL/openssl/include/openssl/ssl.h: $NGX_MAKEFILE
|
||||
\$(MAKE) -f auto/lib/openssl/makefile.msvc \
|
||||
OPENSSL="$OPENSSL" OPENSSL_OPT="$OPENSSL_OPT"
|
||||
|
||||
END
|
||||
|
||||
;;
|
||||
|
||||
bcc32)
|
||||
cl | bcc32)
|
||||
|
||||
ngx_opt=`echo "-DOPENSSL=\"$OPENSSL\" -DOPENSSL_OPT=\"$OPENSSL_OPT\"" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
`echo "$OPENSSL\\out32\\libeay32.lib: $OPENSSL\\out32\\ssleay32.lib" \
|
||||
`echo "$OPENSSL\\openssl\\lib\\libeay32.lib: \
|
||||
$OPENSSL\\openssl\\include\\openssl\\ssl.h" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
`echo "$OPENSSL\\out32\\ssleay32.lib:" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/openssl/$ngx_makefile \
|
||||
-DOPENSSL=`echo \"$OPENSSL\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
`echo "$OPENSSL\\openssl\\lib\\ssleay32.lib: \
|
||||
$OPENSSL\\openssl\\include\\openssl\\ssl.h" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
`echo "$OPENSSL\\openssl\\include\\openssl\\ssl.h: $NGX_MAKEFILE" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/openssl/makefile.bcc $ngx_opt
|
||||
|
||||
END
|
||||
|
||||
@ -45,7 +53,7 @@ END
|
||||
*)
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$OPENSSL/libssl.a:
|
||||
$OPENSSL/libssl.a: $NGX_MAKEFILE
|
||||
cd $OPENSSL \\
|
||||
&& \$(MAKE) clean \\
|
||||
&& $NGX_OPENSSL_CONFIG no-shared \\
|
||||
|
@ -2,11 +2,17 @@
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
ssleay32.lib:
|
||||
all:
|
||||
cd $(OPENSSL)
|
||||
|
||||
perl Configure BC-32 no-shared
|
||||
perl Configure BC-32 no-shared --prefix=openssl -DNO_SYS_TYPES_H \
|
||||
$(OPENSSL_OPT)
|
||||
|
||||
ms\do_nasm
|
||||
|
||||
$(MAKE) -f ms\bcb.mak
|
||||
$(MAKE) -f ms\bcb.mak install
|
||||
|
||||
# Borland's make does not expand "[ch]" in
|
||||
# copy "inc32\openssl\*.[ch]" "openssl\include\openssl"
|
||||
copy inc32\openssl\*.h openssl\include\openssl
|
||||
|
14
auto/lib/openssl/makefile.msvc
Normal file
14
auto/lib/openssl/makefile.msvc
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
# Copyright (C) Igor Sysoev
|
||||
|
||||
|
||||
all:
|
||||
cd $(OPENSSL)
|
||||
|
||||
perl Configure VC-WIN32 no-shared --prefix=openssl -DNO_SYS_TYPES_H \
|
||||
$(OPENSSL_OPT)
|
||||
|
||||
ms\do_ms
|
||||
|
||||
$(MAKE) -f ms\nt.mak
|
||||
$(MAKE) -f ms\nt.mak install
|
Loading…
Reference in New Issue
Block a user