diff options
author | Patrik Nyblom <[email protected]> | 2011-10-25 12:31:54 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2011-12-02 15:21:10 +0100 |
commit | e78a1582dc13d770bf1a9de64ff817369c741ef5 (patch) | |
tree | e2aa3f037e3c3a9c8c72080f5d8c4c0e4f0c4c8b /erts/configure.in | |
parent | e1d960cb615a86faae67c16dc2d185b367f1c385 (diff) | |
download | otp-e78a1582dc13d770bf1a9de64ff817369c741ef5.tar.gz otp-e78a1582dc13d770bf1a9de64ff817369c741ef5.tar.bz2 otp-e78a1582dc13d770bf1a9de64ff817369c741ef5.zip |
Make Win64 build work both under MSYS and Cygwin
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/erts/configure.in b/erts/configure.in index 8798adf3a5..a171c6ec2b 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -383,12 +383,6 @@ case $host_os in # The ethread library requires _WIN32_WINNT of at least 0x0403. # -D_WIN32_WINNT=* from CPPFLAGS is saved in ETHR_DEFS. CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0500 -DWINVER=0x0500" - # _USE_32BIT_TIME_T is needed when using VC++ 2005 (ctime() will fail - # otherwise since we pass it a 32-bit value). - # - # FIXME: Use time_t all the way and remove _USE_32BIT_TIME_T. - # AC_MSG_WARN([Reverting to 32-bit time_t]) - # CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T" ;; darwin*) CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE" @@ -619,6 +613,19 @@ esac AC_SUBST(OPSYS) AC_SUBST(ARCH) +# Need to add this adjustment after we know the architecture, will fail on 64bit +# This should be temporary, USE_32BIT_TIME_T should go away before R15B +case $host_os in + win32) + # FIXME: Use time_t all the way and remove _USE_32BIT_TIME_T. + if test "x$ARCH" != "xamd64"; then + AC_MSG_WARN([Reverting to 32-bit time_t]) + CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T" + fi + ;; + *) + ;; +esac dnl Check consistency of os and darwin-switches @@ -3703,16 +3710,23 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in AC_CHECK_PROG(REGTOOL, regtool, regtool, false) if test "$ac_cv_prog_REGTOOL" != false; then wrp="/machine/software/microsoft/windows/currentversion/" - urp="uninstall/openssl_is1/inno setup: app path" + if test "x$ARCH" = "xamd64"; then + urp="uninstall/openssl (64-bit)_is1/inno setup: app path" + regtool_subsystem=-w + else + urp="uninstall/openssl (32-bit)_is1/inno setup: app path" + regtool_subsystem=-W + fi rp="$wrp$urp" - if regtool -q get "$rp" > /dev/null; then + if regtool -q $regtool_subsystem get "$rp" > /dev/null; then true else - urp="uninstall/openssl (32-bit)_is1/inno setup: app path" + # Fallback to unspecified wordlength + urp="uninstall/openssl_is1/inno setup: app path" rp="$wrp$urp" fi - if regtool -q get "$rp" > /dev/null; then - ssl_install_dir=`regtool -q get "$rp"` + if regtool -q $regtool_subsystem get "$rp" > /dev/null; then + ssl_install_dir=`regtool -q $regtool_subsystem get "$rp"` # Try hard to get rid of spaces... if cygpath -d "$ssl_install_dir" > /dev/null 2>&1; then ssl_install_dir=`cygpath -d "$ssl_install_dir"` @@ -3742,9 +3756,20 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in SSL_CRYPTO_LIBNAME=crypto SSL_SSL_LIBNAME=ssl + + if test "x$MIXED_CYGWIN" = "xyes" -o "x$MIXED_MSYS" = "xyes"; then + if test "x$ARCH" = "xamd64"; then + std_win_ssl_locations="/cygdrive/c/OpenSSL-Win64 /c/OpenSSL-Win64 /opt/local64/pgm/OpenSSL" + else + std_win_ssl_locations="/cygdrive/c/OpenSSL-Win32 /c/OpenSSL-Win32 /cygdrive/c/OpenSSL /c/OpenSSL /opt/local/pgm/OpenSSL" + fi + else + std_win_ssl_locations="" + fi + AC_MSG_CHECKING(for OpenSSL >= 0.9.7 in standard locations) - for rdir in $extra_dir /cygdrive/c/OpenSSL $std_ssl_locations; do + for rdir in $extra_dir $std_win_ssl_locations $std_ssl_locations; do dir="$erl_xcomp_sysroot$rdir" if test -f "$erl_xcomp_isysroot$rdir/include/openssl/opensslv.h"; then is_real_ssl=yes |