[PATCH] Configure: fix build from sources for OpenSSL on OS X

Piotr Sikora piotr at cloudflare.com
Tue Jun 17 22:40:17 UTC 2014


# HG changeset patch
# User Piotr Sikora <piotr at cloudflare.com>
# Date 1403044587 25200
#      Tue Jun 17 15:36:27 2014 -0700
# Node ID 3e29d10e56a059b2a8fe54bd8b913a7e399a5672
# Parent  ec919574cc14f7781c0ca212cffec586f88eec40
Configure: fix build from sources for OpenSSL on OS X.

Signed-off-by: Piotr Sikora <piotr at cloudflare.com>

diff -r ec919574cc14 -r 3e29d10e56a0 auto/lib/openssl/make
--- a/auto/lib/openssl/make	Tue Jun 17 16:51:25 2014 +0400
+++ b/auto/lib/openssl/make	Tue Jun 17 15:36:27 2014 -0700
@@ -51,12 +51,20 @@ END
             *)  ngx_prefix="$PWD/$OPENSSL/.openssl" ;;
         esac
 
+        if [ "$NGX_SYSTEM" = "Darwin" -a "$NGX_MACHINE" = "x86_64" \
+             -a -z "`echo $CFLAGS | grep 'arch i386'`" ];
+        then
+            OPENSSL_CONFIG="./Configure darwin64-x86_64-cc"
+        else
+            OPENSSL_CONFIG="./config"
+        fi
+
         cat << END                                            >> $NGX_MAKEFILE
 
 $OPENSSL/.openssl/include/openssl/ssl.h:	$NGX_MAKEFILE
 	cd $OPENSSL \\
 	&& if [ -f Makefile ]; then \$(MAKE) clean; fi \\
-	&& ./config --prefix=$ngx_prefix no-shared $OPENSSL_OPT \\
+	&& $OPENSSL_CONFIG --prefix=$ngx_prefix no-shared $OPENSSL_OPT \\
 	&& \$(MAKE) \\
 	&& \$(MAKE) install LIBDIR=lib
 



More information about the nginx-devel mailing list