174664626SKris Kennaway: 274664626SKris Kennawayeval 'exec perl -S $0 ${1+"$@"}' 374664626SKris Kennaway if $running_under_some_shell; 474664626SKris Kennaway## 574664626SKris Kennaway## Configure -- OpenSSL source tree configuration script 674664626SKris Kennaway## 774664626SKris Kennaway 874664626SKris Kennawayrequire 5.000; 974664626SKris Kennawayuse strict; 1074664626SKris Kennaway 1174664626SKris Kennaway# see INSTALL for instructions. 1274664626SKris Kennaway 136be8ae07SJacques Vidrinemy $usage="Usage: Configure [no-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-engine] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [386] [[no-]fips] [debug] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]\n"; 1474664626SKris Kennaway 1574664626SKris Kennaway# Options: 1674664626SKris Kennaway# 1774664626SKris Kennaway# --openssldir install OpenSSL in OPENSSLDIR (Default: DIR/ssl if the 1874664626SKris Kennaway# --prefix option is given; /usr/local/ssl otherwise) 1974664626SKris Kennaway# --prefix prefix for the OpenSSL include, lib and bin directories 2074664626SKris Kennaway# (Default: the OPENSSLDIR directory) 2174664626SKris Kennaway# 2274664626SKris Kennaway# --install_prefix Additional prefix for package builders (empty by 2374664626SKris Kennaway# default). This needn't be set in advance, you can 2474664626SKris Kennaway# just as well use "make INSTALL_PREFIX=/whatever install". 2574664626SKris Kennaway# 265c87c606SMark Murray# --with-krb5-dir Declare where Kerberos 5 lives. The libraries are expected 275c87c606SMark Murray# to live in the subdirectory lib/ and the header files in 285c87c606SMark Murray# include/. A value is required. 295c87c606SMark Murray# --with-krb5-lib Declare where the Kerberos 5 libraries live. A value is 305c87c606SMark Murray# required. 315c87c606SMark Murray# (Default: KRB5_DIR/lib) 325c87c606SMark Murray# --with-krb5-include Declare where the Kerberos 5 header files live. A 335c87c606SMark Murray# value is required. 345c87c606SMark Murray# (Default: KRB5_DIR/include) 355c87c606SMark Murray# --with-krb5-flavor Declare what flavor of Kerberos 5 is used. Currently 365c87c606SMark Murray# supported values are "MIT" and "Heimdal". A value is required. 375c87c606SMark Murray# 38c1803d78SJacques Vidrine# --test-sanity Make a number of sanity checks on the data in this file. 39c1803d78SJacques Vidrine# This is a debugging tool for OpenSSL developers. 40c1803d78SJacques Vidrine# 41fceca8a3SJacques Vidrine# no-engine do not compile in any engine code. 425c87c606SMark Murray# no-hw-xxx do not compile support for specific crypto hardware. 435c87c606SMark Murray# Generic OpenSSL-style methods relating to this support 445c87c606SMark Murray# are always compiled but return NULL if the hardware 455c87c606SMark Murray# support isn't compiled. 465c87c606SMark Murray# no-hw do not compile support for any crypto hardware. 4774664626SKris Kennaway# [no-]threads [don't] try to create a library that is suitable for 4874664626SKris Kennaway# multithreaded applications (default is "threads" if we 4974664626SKris Kennaway# know how to do it) 50ddd58736SKris Kennaway# [no-]shared [don't] try to create shared libraries when supported. 5174664626SKris Kennaway# no-asm do not use assembler 52ddd58736SKris Kennaway# no-dso do not compile in any native shared-library methods. This 53ddd58736SKris Kennaway# will ensure that all methods just return NULL. 545c87c606SMark Murray# no-krb5 do not compile in any KRB5 library or code. 555c87c606SMark Murray# [no-]zlib [don't] compile support for zlib compression. 565c87c606SMark Murray# zlib-dynamic Like "zlib", but the zlib library is expected to be a shared 575c87c606SMark Murray# library and will be loaded in run-time by the OpenSSL library. 5874664626SKris Kennaway# 386 generate 80386 code 5974664626SKris Kennaway# no-<cipher> build without specified algorithm (rsa, idea, rc5, ...) 6074664626SKris Kennaway# -<xxx> +<xxx> compiler options are passed through 6174664626SKris Kennaway# 62ddd58736SKris Kennaway# DEBUG_SAFESTACK use type-safe stacks to enforce type-safety on stack items 63ddd58736SKris Kennaway# provided to stack calls. Generates unique stack functions for 64ddd58736SKris Kennaway# each possible stack type. 6574664626SKris Kennaway# DES_PTR use pointer lookup vs arrays in the DES in crypto/des/des_locl.h 6674664626SKris Kennaway# DES_RISC1 use different DES_ENCRYPT macro that helps reduce register 6774664626SKris Kennaway# dependancies but needs to more registers, good for RISC CPU's 6874664626SKris Kennaway# DES_RISC2 A different RISC variant. 6974664626SKris Kennaway# DES_UNROLL unroll the inner DES loop, sometimes helps, somtimes hinders. 7074664626SKris Kennaway# DES_INT use 'int' instead of 'long' for DES_LONG in crypto/des/des.h 7174664626SKris Kennaway# This is used on the DEC Alpha where long is 8 bytes 7274664626SKris Kennaway# and int is 4 7374664626SKris Kennaway# BN_LLONG use the type 'long long' in crypto/bn/bn.h 7474664626SKris Kennaway# MD2_CHAR use 'char' instead of 'int' for MD2_INT in crypto/md2/md2.h 7574664626SKris Kennaway# MD2_LONG use 'long' instead of 'int' for MD2_INT in crypto/md2/md2.h 7674664626SKris Kennaway# IDEA_SHORT use 'short' instead of 'int' for IDEA_INT in crypto/idea/idea.h 7774664626SKris Kennaway# IDEA_LONG use 'long' instead of 'int' for IDEA_INT in crypto/idea/idea.h 7874664626SKris Kennaway# RC2_SHORT use 'short' instead of 'int' for RC2_INT in crypto/rc2/rc2.h 7974664626SKris Kennaway# RC2_LONG use 'long' instead of 'int' for RC2_INT in crypto/rc2/rc2.h 8074664626SKris Kennaway# RC4_CHAR use 'char' instead of 'int' for RC4_INT in crypto/rc4/rc4.h 8174664626SKris Kennaway# RC4_LONG use 'long' instead of 'int' for RC4_INT in crypto/rc4/rc4.h 8274664626SKris Kennaway# RC4_INDEX define RC4_INDEX in crypto/rc4/rc4_locl.h. This turns on 8374664626SKris Kennaway# array lookups instead of pointer use. 84f579bf8eSKris Kennaway# RC4_CHUNK enables code that handles data aligned at long (natural CPU 85f579bf8eSKris Kennaway# word) boundary. 86f579bf8eSKris Kennaway# RC4_CHUNK_LL enables code that handles data aligned at long long boundary 87f579bf8eSKris Kennaway# (intended for 64-bit CPUs running 32-bit OS). 8874664626SKris Kennaway# BF_PTR use 'pointer arithmatic' for Blowfish (unsafe on Alpha). 8974664626SKris Kennaway# BF_PTR2 intel specific version (generic version is more efficient). 9074664626SKris Kennaway# MD5_ASM use some extra md5 assember, 9174664626SKris Kennaway# SHA1_ASM use some extra sha1 assember, must define L_ENDIAN for x86 9274664626SKris Kennaway# RMD160_ASM use some extra ripemd160 assember, 9374664626SKris Kennaway 9474664626SKris Kennawaymy $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL"; 9574664626SKris Kennaway 9674664626SKris Kennaway# MD2_CHAR slags pentium pros 9774664626SKris Kennawaymy $x86_gcc_opts="RC4_INDEX MD2_INT"; 9874664626SKris Kennaway 9974664626SKris Kennaway# MODIFY THESE PARAMETERS IF YOU ARE GOING TO USE THE 'util/speed.sh SCRIPT 10074664626SKris Kennaway# Don't worry about these normally 10174664626SKris Kennaway 10274664626SKris Kennawaymy $tcc="cc"; 10374664626SKris Kennawaymy $tflags="-fast -Xa"; 10474664626SKris Kennawaymy $tbn_mul=""; 10574664626SKris Kennawaymy $tlib="-lnsl -lsocket"; 10674664626SKris Kennaway#$bits1="SIXTEEN_BIT "; 10774664626SKris Kennaway#$bits2="THIRTY_TWO_BIT "; 10874664626SKris Kennawaymy $bits1="THIRTY_TWO_BIT "; 10974664626SKris Kennawaymy $bits2="SIXTY_FOUR_BIT "; 11074664626SKris Kennaway 11174664626SKris Kennawaymy $x86_elf_asm="asm/bn86-elf.o asm/co86-elf.o:asm/dx86-elf.o asm/yx86-elf.o:asm/bx86-elf.o:asm/mx86-elf.o:asm/sx86-elf.o:asm/cx86-elf.o:asm/rx86-elf.o:asm/rm86-elf.o:asm/r586-elf.o"; 11274664626SKris Kennawaymy $x86_out_asm="asm/bn86-out.o asm/co86-out.o:asm/dx86-out.o asm/yx86-out.o:asm/bx86-out.o:asm/mx86-out.o:asm/sx86-out.o:asm/cx86-out.o:asm/rx86-out.o:asm/rm86-out.o:asm/r586-out.o"; 11374664626SKris Kennawaymy $x86_bsdi_asm="asm/bn86bsdi.o asm/co86bsdi.o:asm/dx86bsdi.o asm/yx86bsdi.o:asm/bx86bsdi.o:asm/mx86bsdi.o:asm/sx86bsdi.o:asm/cx86bsdi.o:asm/rx86bsdi.o:asm/rm86bsdi.o:asm/r586bsdi.o"; 11474664626SKris Kennaway 1155740a5e3SKris Kennawaymy $mips3_irix_asm="asm/mips3.o::::::::"; 1165740a5e3SKris Kennaway# There seems to be boundary faults in asm/alpha.s. 1175740a5e3SKris Kennaway#my $alpha_asm="asm/alpha.o::::::::"; 1185740a5e3SKris Kennawaymy $alpha_asm="::::::::"; 1195740a5e3SKris Kennaway 12074664626SKris Kennaway# -DB_ENDIAN slows things down on a sparc for md5, but helps sha1. 12174664626SKris Kennaway# So the md5_locl.h file has an undef B_ENDIAN if sun is defined 12274664626SKris Kennaway 1235c87c606SMark Murray#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $bn_obj : $des_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags 124f579bf8eSKris Kennaway 12574664626SKris Kennawaymy %table=( 126ddd58736SKris Kennaway# File 'TABLE' (created by 'make TABLE') contains the data from this list, 127ddd58736SKris Kennaway# formatted for better readability. 128ddd58736SKris Kennaway 129ddd58736SKris Kennaway 130f579bf8eSKris Kennaway#"b", "${tcc}:${tflags}::${tlib}:${bits1}:${tbn_mul}::", 131f579bf8eSKris Kennaway#"bl-4c-2c", "${tcc}:${tflags}::${tlib}:${bits1}BN_LLONG RC4_CHAR MD2_CHAR:${tbn_mul}::", 132f579bf8eSKris Kennaway#"bl-4c-ri", "${tcc}:${tflags}::${tlib}:${bits1}BN_LLONG RC4_CHAR RC4_INDEX:${tbn_mul}::", 133f579bf8eSKris Kennaway#"b2-is-ri-dp", "${tcc}:${tflags}::${tlib}:${bits2}IDEA_SHORT RC4_INDEX DES_PTR:${tbn_mul}::", 13474664626SKris Kennaway 13574664626SKris Kennaway# Our development configs 1365c87c606SMark Murray"purify", "purify gcc:-g -DPURIFY -Wall::(unknown)::-lsocket -lnsl::::", 1375c87c606SMark Murray"debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::", 1386be8ae07SJacques Vidrine"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o", 1395c87c606SMark Murray"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", 1405c87c606SMark Murray"debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", 1416be8ae07SJacques Vidrine"debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -Wall -Wshadow -Werror -pipe::(unknown)::::::", 1425c87c606SMark Murray"debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", 1436be8ae07SJacques Vidrine"debug-ben-fips-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_FIPS -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o", 1445c87c606SMark Murray"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", 1455c87c606SMark Murray"debug-bodo", "gcc:-DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DBIO_PAIR_DEBUG -DPEDANTIC -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", 1465c87c606SMark Murray"debug-ulf", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT:::${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", 1476be8ae07SJacques Vidrine"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -mcpu=i486 -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", 1485c87c606SMark Murray"debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT::dlfcn", 149ced566fdSJacques Vidrine"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 150ced566fdSJacques Vidrine"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wmissing-prototypes -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 151ced566fdSJacques Vidrine"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 152ced566fdSJacques Vidrine"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wmissing-prototypes -Wconversion -Wno-long-long -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 1535c87c606SMark Murray"dist", "cc:-O::(unknown)::::::", 15474664626SKris Kennaway 155f579bf8eSKris Kennaway# Basic configs that should work on any (32 and less bit) box 1565c87c606SMark Murray"gcc", "gcc:-O3::(unknown):::BN_LLONG:::", 1575c87c606SMark Murray"cc", "cc:-O::(unknown)::::::", 15874664626SKris Kennaway 1596be8ae07SJacques Vidrine####VOS Configurations 1606be8ae07SJacques Vidrine"vos-gcc","gcc:-b hppa1.1-stratus-vos -O3 -Wall -Wuninitialized -D_POSIX_C_SOURCE=200112L -D_BSD::(unknown):VOS:-Wl,-map:BN_LLONG:::::::::::::.so:", 1616be8ae07SJacques Vidrine"debug-vos-gcc","gcc:-b hppa1.1-stratus-vos -O0 -g -Wall -D_POSIX_C_SOURCE=200112L -D_BSD -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map:BN_LLONG:::::::::::::.so:", 1626be8ae07SJacques Vidrine"vos-vcc","vcc:-b i386-stratus-vos -O3 -D_POSIX_C_SOURCE=200112L -D_BSD::(unknown):VOS:-Wl,-map::::::::::::::.so:", 1636be8ae07SJacques Vidrine"debug-vos-vcc","vcc:-b i386-stratus-vos -O0 -g -D_POSIX_C_SOURCE=200112L -D_BSD -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG::(unknown):VOS:-Wl,-map::::::::::::::.so:", 1646be8ae07SJacques Vidrine 1655c87c606SMark Murray#### Solaris x86 with GNU C setups 1665c87c606SMark Murray# -DOPENSSL_NO_INLINE_ASM switches off inline assembler. We have to do it 167f579bf8eSKris Kennaway# here because whenever GNU C instantiates an assembler template it 168f579bf8eSKris Kennaway# surrounds it with #APP #NO_APP comment pair which (at least Solaris 169f579bf8eSKris Kennaway# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic" 170f579bf8eSKris Kennaway# error message. 171fceca8a3SJacques Vidrine"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 17274664626SKris Kennaway 17326d191b4SKris Kennaway#### Solaris x86 with Sun C setups 1745c87c606SMark Murray"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 17526d191b4SKris Kennaway 17674664626SKris Kennaway#### SPARC Solaris with GNU C setups 1775c87c606SMark Murray"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 1785c87c606SMark Murray"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 1795c87c606SMark Murray# -m32 should be safe to add as long as driver recognizes -mcpu=ultrasparc 1805c87c606SMark Murray"solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 1815c87c606SMark Murray"solaris64-sparcv9-gcc31","gcc:-mcpu=ultrasparc -m64 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 18274664626SKris Kennaway# gcc pre-2.8 doesn't understand -mcpu=ultrasparc, so fall down to -mv8 18374664626SKris Kennaway# but keep the assembler modules. 1845c87c606SMark Murray"solaris-sparcv9-gcc27","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus-gcc27.o:::asm/md5-sparcv8plus-gcc27.o::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 1855c87c606SMark Murray"solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 1865c87c606SMark Murray 18774664626SKris Kennaway#### 1885c87c606SMark Murray"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 1895c87c606SMark Murray"debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 19074664626SKris Kennaway 19174664626SKris Kennaway#### SPARC Solaris with Sun C setups 19274664626SKris Kennaway# DO NOT use /xO[34] on sparc with SC3.0. It is broken, and will not pass the tests 1935c87c606SMark Murray"solaris-sparc-sc3","cc:-fast -O -Xa -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 19474664626SKris Kennaway# SC4.0 doesn't pass 'make test', upgrade to SC5.0 or SC4.2. 19574664626SKris Kennaway# SC4.2 is ok, better than gcc even on bn as long as you tell it -xarch=v8 19674664626SKris Kennaway# SC5.0 note: Compiler common patch 107357-01 or later is required! 1975c87c606SMark Murray"solaris-sparcv7-cc","cc:-xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 1985c87c606SMark Murray"solaris-sparcv8-cc","cc:-xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 1995c87c606SMark Murray"solaris-sparcv9-cc","cc:-xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 2005c87c606SMark Murray"solaris64-sparcv9-cc","cc:-xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:solaris-shared:-KPIC:-xarch=v9:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):/usr/ccs/bin/ar rs", 201f579bf8eSKris Kennaway#### 2025c87c606SMark Murray"debug-solaris-sparcv8-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 2035c87c606SMark Murray"debug-solaris-sparcv9-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 20474664626SKris Kennaway 20574664626SKris Kennaway#### SPARC Linux setups 2065c87c606SMark Murray"linux-sparcv7","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::", 20774664626SKris Kennaway# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently 20874664626SKris Kennaway# assisted with debugging of following two configs. 2095c87c606SMark Murray"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 21074664626SKris Kennaway# it's a real mess with -mcpu=ultrasparc option under Linux, but 21174664626SKris Kennaway# -Wa,-Av8plus should do the trick no matter what. 2125c87c606SMark Murray"linux-sparcv9","gcc:-mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:asm/sparcv8plus.o:::asm/md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 2135c87c606SMark Murray# GCC 3.1 is a requirement 2145c87c606SMark Murray"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::asm/md5-sparcv9.o::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 21574664626SKris Kennaway 21674664626SKris Kennaway# Sunos configs, assuming sparc for the gcc one. 2175c87c606SMark Murray##"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):SUNOS::DES_UNROLL:::", 2185c87c606SMark Murray"sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown):SUNOS::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:::", 21974664626SKris Kennaway 22074664626SKris Kennaway#### IRIX 5.x configs 22174664626SKris Kennaway# -mips2 flag is added by ./config when appropriate. 2225c87c606SMark Murray"irix-gcc","gcc:-O3 -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR::::::::::dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 2235c87c606SMark Murray"irix-cc", "cc:-O2 -use_readonly_const -DTERMIOS -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:irix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 22474664626SKris Kennaway#### IRIX 6.x configs 22574664626SKris Kennaway# Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke 226ced566fdSJacques Vidrine# './Configure irix-cc -o32' manually. 22774664626SKris Kennaway# -mips4 flag is added by ./config when appropriate. 228ced566fdSJacques Vidrine"irix-mips3-gcc","gcc:-mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 229ced566fdSJacques Vidrine"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT:${mips3_irix_asm}:dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 23074664626SKris Kennaway# N64 ABI builds. 231ced566fdSJacques Vidrine"irix64-mips4-gcc","gcc:-mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 232ced566fdSJacques Vidrine"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG:${mips3_irix_asm}:dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 233f579bf8eSKris Kennaway 234f579bf8eSKris Kennaway#### Unified HP-UX ANSI C configs. 235f579bf8eSKris Kennaway# Special notes: 236f579bf8eSKris Kennaway# - Originally we were optimizing at +O4 level. It should be noted 237f579bf8eSKris Kennaway# that the only difference between +O3 and +O4 is global inter- 238f579bf8eSKris Kennaway# procedural analysis. As it has to be performed during the link 239f579bf8eSKris Kennaway# stage the compiler leaves behind certain pseudo-code in lib*.a 240f579bf8eSKris Kennaway# which might be release or even patch level specific. Generating 241f579bf8eSKris Kennaway# the machine code for and analyzing the *whole* program appears 242f579bf8eSKris Kennaway# to be *extremely* memory demanding while the performance gain is 243f579bf8eSKris Kennaway# actually questionable. The situation is intensified by the default 244f579bf8eSKris Kennaway# HP-UX data set size limit (infamous 'maxdsiz' tunable) of 64MB 245f579bf8eSKris Kennaway# which is way too low for +O4. In other words, doesn't +O3 make 246f579bf8eSKris Kennaway# more sense? 247f579bf8eSKris Kennaway# - Keep in mind that the HP compiler by default generates code 248f579bf8eSKris Kennaway# suitable for execution on the host you're currently compiling at. 249f579bf8eSKris Kennaway# If the toolkit is ment to be used on various PA-RISC processors 2505c87c606SMark Murray# consider './config +DAportable'. 251f579bf8eSKris Kennaway# - +DD64 is chosen in favour of +DA2.0W because it's ment to be 252f579bf8eSKris Kennaway# compatible with *future* releases. 253f579bf8eSKris Kennaway# - If you run ./Configure hpux-parisc-[g]cc manually don't forget to 254f579bf8eSKris Kennaway# pass -D_REENTRANT on HP-UX 10 and later. 255f579bf8eSKris Kennaway# - -DMD32_XARRAY triggers workaround for compiler bug we ran into in 256f579bf8eSKris Kennaway# 32-bit message digests. (For the moment of this writing) HP C 257f579bf8eSKris Kennaway# doesn't seem to "digest" too many local variables (they make "him" 258f579bf8eSKris Kennaway# chew forever:-). For more details look-up MD32_XARRAY comment in 259f579bf8eSKris Kennaway# crypto/sha/sha_lcl.h. 260f579bf8eSKris Kennaway# <appro@fy.chalmers.se> 261f579bf8eSKris Kennaway# 2625c87c606SMark Murray#!#"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl", 263f579bf8eSKris Kennaway# Since there is mention of this in shlib/hpux10-cc.sh 2645c87c606SMark Murray"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 2655c87c606SMark Murray"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 2665c87c606SMark Murray"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 2675c87c606SMark Murray# 64bit PARISC for GCC without optimization, which seems to make problems. 2685c87c606SMark Murray# Submitted by <ross.alexander@uk.neceur.com> 2695c87c606SMark Murray"hpux64-parisc-gcc","gcc:-DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 270ced566fdSJacques Vidrine"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:-fpic::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 2715c87c606SMark Murray 2725c87c606SMark Murray# IA-64 targets 273fceca8a3SJacques Vidrine"hpux-ia64-cc","cc:-Ae +DD32 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 2745c87c606SMark Murray# Frank Geurts <frank.geurts@nl.abnamro.com> has patiently assisted with 2755c87c606SMark Murray# with debugging of the following config. 276fceca8a3SJacques Vidrine"hpux64-ia64-cc","cc:-Ae +DD64 +O3 +Olit=all -z -DB_ENDIAN::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/ia64-cpp.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 277ddd58736SKris Kennaway 278ddd58736SKris Kennaway# More attempts at unified 10.X and 11.X targets for HP C compiler. 279ddd58736SKris Kennaway# 280ddd58736SKris Kennaway# Chris Ruemmler <ruemmler@cup.hp.com> 281ddd58736SKris Kennaway# Kevin Steves <ks@hp.se> 282fceca8a3SJacques Vidrine"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 283fceca8a3SJacques Vidrine"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 284fceca8a3SJacques Vidrine"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dlfcn:hpux64-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 2855c87c606SMark Murray# Isn't the line below meaningless? HP-UX cc optimizes for host by default. 2865c87c606SMark Murray# hpux-parisc1_0-cc with +DAportable flag would make more sense. <appro> 287fceca8a3SJacques Vidrine"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT::-Wl,+s -ldld:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 28874664626SKris Kennaway 28974664626SKris Kennaway# HPUX 9.X config. 29074664626SKris Kennaway# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or 29174664626SKris Kennaway# egcs. gcc 2.8.1 is also broken. 29274664626SKris Kennaway 2935c87c606SMark Murray"hpux-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::(unknown)::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 29474664626SKris Kennaway# If hpux-cc fails (e.g. during "make test"), try the next one; otherwise, 295f579bf8eSKris Kennaway# please report your OS and compiler version to the openssl-bugs@openssl.org 29674664626SKris Kennaway# mailing list. 2975c87c606SMark Murray"hpux-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::(unknown)::-Wl,+s -ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 29874664626SKris Kennaway 2995c87c606SMark Murray"hpux-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 30074664626SKris Kennaway# If hpux-gcc fails, try this one: 3015c87c606SMark Murray"hpux-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown)::-Wl,+s -ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 302a21b1b38SKris Kennaway 303a21b1b38SKris Kennaway# HPUX 9.X on Motorola 68k platforms with gcc 3045c87c606SMark Murray"hpux-m68k-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::(unknown):::BN_LLONG DES_PTR DES_UNROLL:::::::::::::", 30574664626SKris Kennaway 30674664626SKris Kennaway# HPUX 10.X config. Supports threads. 3075c87c606SMark Murray"hpux10-cc", "cc:-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 30874664626SKris Kennaway# If hpux10-cc fails, try this one (if still fails, try deleting BN_LLONG): 3095c87c606SMark Murray"hpux10-brokencc", "cc:-DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:+Z::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 31074664626SKris Kennaway 3115c87c606SMark Murray"hpux10-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 31274664626SKris Kennaway# If hpux10-gcc fails, try this one: 3135c87c606SMark Murray"hpux10-brokengcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O3::-D_REENTRANT::-Wl,+s -ldld:DES_PTR DES_UNROLL DES_RISC1::::::::::dl:hpux-shared:-fPIC::.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 31474664626SKris Kennaway 31574664626SKris Kennaway# HPUX 11.X from www.globus.org. 31674664626SKris Kennaway# Only works on PA-RISC 2.0 cpus, and not optimized. Why? 3175c87c606SMark Murray#"hpux11-32bit-cc","cc:+DA2.0 -DB_ENDIAN -D_HPUX_SOURCE -Aa -Ae +ESlit::-D_REENTRANT:::DES_PTR DES_UNROLL DES_RISC1:::", 3185c87c606SMark Murray#"hpux11-64bit-cc","cc:+DA2.0W -g -D_HPUX_SOURCE -Aa -Ae +ESlit::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT :::", 319f579bf8eSKris Kennaway# Use unified settings above instead. 32074664626SKris Kennaway 321ddd58736SKris Kennaway#### HP MPE/iX http://jazz.external.hp.com/src/openssl/ 3225c87c606SMark Murray"MPE/iX-gcc", "gcc:-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB::(unknown):MPE:-L/SYSLOG/PUB -lsyslog -lsocket -lcurses:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:::", 323ddd58736SKris Kennaway 324c1803d78SJacques Vidrine#### PARISC Linux setups 3255c87c606SMark Murray"linux-parisc","gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT:::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::", 326c1803d78SJacques Vidrine 327a21b1b38SKris Kennaway# Dec Alpha, OSF/1 - the alpha164-cc is historical, for the conversion 328a21b1b38SKris Kennaway# from the older DEC C Compiler to the newer compiler. It's now the 329a21b1b38SKris Kennaway# same as the preferred entry, alpha-cc. If you are still using the 330a21b1b38SKris Kennaway# older compiler (you're at 3.x or earlier, or perhaps very early 4.x) 331a21b1b38SKris Kennaway# you should use `alphaold-cc'. 332a21b1b38SKris Kennaway# 333a21b1b38SKris Kennaway# "What's in a name? That which we call a rose 334a21b1b38SKris Kennaway# By any other word would smell as sweet." 335a21b1b38SKris Kennaway# 336a21b1b38SKris Kennaway# - William Shakespeare, "Romeo & Juliet", Act II, scene II. 337a21b1b38SKris Kennaway# 338a21b1b38SKris Kennaway# For OSF/1 3.2b and earlier, and Digital UNIX 3.2c - 3.2g, with the 339a21b1b38SKris Kennaway# vendor compiler, use alphaold-cc. 340a21b1b38SKris Kennaway# For Digital UNIX 4.0 - 4.0e, with the vendor compiler, use alpha-cc. 341a21b1b38SKris Kennaway# For Tru64 UNIX 4.f - current, with the vendor compiler, use alpha-cc. 342a21b1b38SKris Kennaway# 343a21b1b38SKris Kennaway# There's also an alternate target available (which `config' will never 344a21b1b38SKris Kennaway# select) called alpha-cc-rpath. This target builds an RPATH into the 345a21b1b38SKris Kennaway# shared libraries, which is very convenient on Tru64 since binaries 346a21b1b38SKris Kennaway# linked against that shared library will automatically inherit that RPATH, 347a21b1b38SKris Kennaway# and hence know where to look for the openssl libraries, even if they're in 348a21b1b38SKris Kennaway# an odd place. 349a21b1b38SKris Kennaway# 35074664626SKris Kennaway# For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version 351a21b1b38SKris Kennaway# 3525c87c606SMark Murray"alpha-gcc","gcc:-O3::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so", 3535c87c606SMark Murray"alphaold-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so", 3545c87c606SMark Murray"alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared:::.so", 3555c87c606SMark Murray"alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared:::.so", 3565c87c606SMark Murray"alpha-cc-rpath", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared-rpath:::.so", 357a21b1b38SKris Kennaway# 358a21b1b38SKris Kennaway# This probably belongs in a different section. 359a21b1b38SKris Kennaway# 3605c87c606SMark Murray"FreeBSD-alpha","gcc:-DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 361f579bf8eSKris Kennaway 362f579bf8eSKris Kennaway#### Alpha Linux with GNU C and Compaq C setups 363f579bf8eSKris Kennaway# Special notes: 364f579bf8eSKris Kennaway# - linux-alpha+bwx-gcc is ment to be used from ./config only. If you 365f579bf8eSKris Kennaway# ought to run './Configure linux-alpha+bwx-gcc' manually, do 366f579bf8eSKris Kennaway# complement the command line with -mcpu=ev56, -mcpu=ev6 or whatever 367f579bf8eSKris Kennaway# which is appropriate. 368f579bf8eSKris Kennaway# - If you use ccc keep in mind that -fast implies -arch host and the 369f579bf8eSKris Kennaway# compiler is free to issue instructions which gonna make elder CPU 370f579bf8eSKris Kennaway# choke. If you wish to build "blended" toolkit, add -arch generic 371f579bf8eSKris Kennaway# *after* -fast and invoke './Configure linux-alpha-ccc' manually. 372f579bf8eSKris Kennaway# 373f579bf8eSKris Kennaway# <appro@fy.chalmers.se> 374f579bf8eSKris Kennaway# 3755c87c606SMark Murray"linux-alpha-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3765c87c606SMark Murray"linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3775c87c606SMark Murray"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", 3785c87c606SMark Murray"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}", 37974664626SKris Kennaway 38074664626SKris Kennaway# assembler versions -- currently defunct: 3815c87c606SMark Murray##"OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer:::(unknown):SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2:${alpha_asm}", 38274664626SKris Kennaway 38374664626SKris Kennaway# The intel boxes :-), It would be worth seeing if bsdi-gcc can use the 38474664626SKris Kennaway# bn86-elf.o file file since it is hand tweaked assembler. 3855c87c606SMark Murray"linux-elf", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3865c87c606SMark Murray"linux-pentium", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3875c87c606SMark Murray"linux-ppro", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3885c87c606SMark Murray"linux-k6", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=k6 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3895c87c606SMark Murray"debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", 3905c87c606SMark Murray"debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", 3915c87c606SMark Murray"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3926be8ae07SJacques Vidrine"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3935c87c606SMark Murray"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}", 394fceca8a3SJacques Vidrine"linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 395fceca8a3SJacques Vidrine"linux-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3965c87c606SMark Murray"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3975c87c606SMark Murray"linux-m68k", "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT:::BN_LLONG::", 3985c87c606SMark Murray"linux-s390", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 3995c87c606SMark Murray"linux-s390x", "gcc:-DB_ENDIAN -DTERMIO -DNO_ASM -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 4005c87c606SMark Murray"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 40150ef0093SJacques Vidrine"linux-ia64-ecc", "ecc:-DL_ENDIAN -DTERMIO -O2 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 4025c87c606SMark Murray"linux-x86_64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 4035c87c606SMark Murray"NetBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 4045c87c606SMark Murray"NetBSD-m68", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 4055c87c606SMark Murray"NetBSD-x86", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 4065c87c606SMark Murray"FreeBSD-elf", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 407fceca8a3SJacques Vidrine"FreeBSD-sparc64","gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::-pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE:::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 408fceca8a3SJacques Vidrine"FreeBSD-ia64","gcc:-DL_ENDIAN -DTERMIOS -O -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:asm/ia64-cpp.o:::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 4095c87c606SMark Murray"FreeBSD", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}", 4105c87c606SMark Murray"bsdi-gcc", "gcc:-O3 -ffast-math -DL_ENDIAN -DPERL5 -m486::(unknown):::RSA_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_bsdi_asm}", 4115c87c606SMark Murray"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 4125c87c606SMark Murray"nextstep", "cc:-O -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", 4135c87c606SMark Murray"nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", 4145c87c606SMark Murray 41574664626SKris Kennaway# NCR MP-RAS UNIX ver 02.03.01 416fceca8a3SJacques Vidrine"ncr-scde","cc:-O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw::(unknown)::-lsocket -lnsl -lc89:${x86_gcc_des} ${x86_gcc_opts}:::", 41774664626SKris Kennaway 418ddd58736SKris Kennaway# QNX 4 4195c87c606SMark Murray"qnx4", "cc:-DL_ENDIAN -DTERMIO::(unknown):::${x86_gcc_des} ${x86_gcc_opts}:", 420ddd58736SKris Kennaway 421a21b1b38SKris Kennaway# QNX 6 4225c87c606SMark Murray"qnx6", "cc:-DL_ENDIAN -DTERMIOS::(unknown)::-lsocket:${x86_gcc_des} ${x86_gcc_opts}:", 423a21b1b38SKris Kennaway 424ddd58736SKris Kennaway# Linux on ARM 4256be8ae07SJacques Vidrine"linux-elf-arm","gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 426ddd58736SKris Kennaway 427fceca8a3SJacques Vidrine# SCO/Caldera targets. 428fceca8a3SJacques Vidrine# 429fceca8a3SJacques Vidrine# Originally we had like unixware-*, unixware-*-pentium, unixware-*-p6, etc. 430fceca8a3SJacques Vidrine# Now we only have blended unixware-* as it's the only one used by ./config. 431fceca8a3SJacques Vidrine# If you want to optimize for particular microarchitecture, bypass ./config 432fceca8a3SJacques Vidrine# and './Configure unixware-7 -Kpentium_pro' or whatever appropriate. 433fceca8a3SJacques Vidrine# Note that not all targets include assembler support. Mostly because of 434fceca8a3SJacques Vidrine# lack of motivation to support out-of-date platforms with out-of-date 435fceca8a3SJacques Vidrine# compiler drivers and assemblers. Tim Rice <tim@multitalents.net> has 436fceca8a3SJacques Vidrine# patiently assisted to debug most of it. 437fceca8a3SJacques Vidrine# 4385740a5e3SKris Kennaway# UnixWare 2.0x fails destest with -O 4395c87c606SMark Murray"unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::", 4405c87c606SMark Murray"unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::", 441fceca8a3SJacques Vidrine"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 442fceca8a3SJacques Vidrine"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 443fceca8a3SJacques Vidrine"OpenUNIX-8","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 444fceca8a3SJacques Vidrine"OpenUNIX-8-gcc","gcc:-O -DFILIO_H -fomit-frame-pointer::-pthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 445fceca8a3SJacques Vidrine"sco3-gcc", "gcc:-O3 -fomit-frame-pointer -Dssize_t=int -DNO_SYS_UN_H::(unknown)::-lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::", # the SCO assembler doesn't seem to like our assembler files ... 446fceca8a3SJacques Vidrine# SCO 5 - Ben Laurie <ben@algroup.co.uk> says the -O breaks the SCO cc. 447fceca8a3SJacques Vidrine"sco5-cc", "cc:-belf::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 448fceca8a3SJacques Vidrine"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 44974664626SKris Kennaway 450f579bf8eSKris Kennaway 45174664626SKris Kennaway# IBM's AIX. 4525c87c606SMark Murray"aix-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::", 4535c87c606SMark Murray"aix-gcc", "gcc:-O3 -DB_ENDIAN::(unknown):AIX::BN_LLONG RC4_CHAR:::", 454fceca8a3SJacques Vidrine"aix43-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", 4555c87c606SMark Murray"aix43-gcc", "gcc:-O1 -DAIX -DB_ENDIAN::(unknown):::BN_LLONG RC4_CHAR::::::::::dlfcn:", 456fceca8a3SJacques Vidrine"aix64-cc", "cc:-O -DAIX -DB_ENDIAN -qmaxmem=16384 -q64::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHAR::::::::::dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", 45774664626SKris Kennaway 45874664626SKris Kennaway# 459c1803d78SJacques Vidrine# Cray T90 and similar (SDSC) 46074664626SKris Kennaway# It's Big-endian, but the algorithms work properly when B_ENDIAN is NOT 46174664626SKris Kennaway# defined. The T90 ints and longs are 8 bytes long, and apparently the 46274664626SKris Kennaway# B_ENDIAN code assumes 4 byte ints. Fortunately, the non-B_ENDIAN and 46374664626SKris Kennaway# non L_ENDIAN code aligns the bytes in each word correctly. 46474664626SKris Kennaway# 46574664626SKris Kennaway# The BIT_FIELD_LIMITS define is to avoid two fatal compiler errors: 46674664626SKris Kennaway#'Taking the address of a bit field is not allowed. ' 46774664626SKris Kennaway#'An expression with bit field exists as the operand of "sizeof" ' 46874664626SKris Kennaway# (written by Wayne Schroeder <schroede@SDSC.EDU>) 469c1803d78SJacques Vidrine# 470c1803d78SJacques Vidrine# j90 is considered the base machine type for unicos machines, 471c1803d78SJacques Vidrine# so this configuration is now called "cray-j90" ... 4725c87c606SMark Murray"cray-j90", "cc: -DBIT_FIELD_LIMITS -DTERMIOS::(unknown):CRAY::SIXTY_FOUR_BIT_LONG DES_INT:::", 47374664626SKris Kennaway 47474664626SKris Kennaway# 47574664626SKris Kennaway# Cray T3E (Research Center Juelich, beckman@acl.lanl.gov) 47674664626SKris Kennaway# 47774664626SKris Kennaway# The BIT_FIELD_LIMITS define was written for the C90 (it seems). I added 47874664626SKris Kennaway# another use. Basically, the problem is that the T3E uses some bit fields 47974664626SKris Kennaway# for some st_addr stuff, and then sizeof and address-of fails 48074664626SKris Kennaway# I could not use the ams/alpha.o option because the Cray assembler, 'cam' 48174664626SKris Kennaway# did not like it. 4825c87c606SMark Murray"cray-t3e", "cc: -DBIT_FIELD_LIMITS -DTERMIOS::(unknown):CRAY::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:::", 48374664626SKris Kennaway 48474664626SKris Kennaway# DGUX, 88100. 4855c87c606SMark Murray"dgux-R3-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown):::RC4_INDEX DES_UNROLL:::", 4865c87c606SMark Murray"dgux-R4-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lnsl -lsocket:RC4_INDEX DES_UNROLL:::", 4875c87c606SMark Murray"dgux-R4-x86-gcc", "gcc:-O3 -fomit-frame-pointer -DL_ENDIAN::(unknown)::-lnsl -lsocket:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", 48874664626SKris Kennaway 48974664626SKris Kennaway# Sinix/ReliantUNIX RM400 49074664626SKris Kennaway# NOTE: The CDS++ Compiler up to V2.0Bsomething has the IRIX_CC_BUG optimizer problem. Better use -g */ 4915c87c606SMark Murray"ReliantUNIX","cc:-KPIC -g -DTERMIOS -DB_ENDIAN::-Kthread:SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:BN_LLONG DES_PTR DES_RISC2 DES_UNROLL BF_PTR::::::::::dlfcn:reliantunix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 4925c87c606SMark Murray"SINIX","cc:-O::(unknown):SNI:-lsocket -lnsl -lc -L/usr/ucblib -lucb:RC4_INDEX RC4_CHAR:::", 4935c87c606SMark Murray"SINIX-N","/usr/ucb/cc:-O2 -misaligned::(unknown)::-lucb:RC4_INDEX RC4_CHAR:::", 49474664626SKris Kennaway 49574664626SKris Kennaway# SIEMENS BS2000/OSD: an EBCDIC-based mainframe 4965c87c606SMark Murray"BS2000-OSD","c89:-O -XLLML -XLLMK -XL -DB_ENDIAN -DTERMIOS -DCHARSET_EBCDIC::(unknown)::-lsocket -lnsl:THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR:::", 49774664626SKris Kennaway 498a21b1b38SKris Kennaway# OS/390 Unix an EBCDIC-based Unix system on IBM mainframe 499a21b1b38SKris Kennaway# You need to compile using the c89.sh wrapper in the tools directory, because the 500a21b1b38SKris Kennaway# IBM compiler does not like the -L switch after any object modules. 501a21b1b38SKris Kennaway# 5025c87c606SMark Murray"OS390-Unix","c89.sh:-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE::(unknown):::THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR:::", 503a21b1b38SKris Kennaway 50474664626SKris Kennaway# Windows NT, Microsoft Visual C++ 4.0 50574664626SKris Kennaway 5065c87c606SMark Murray"VC-NT","cl::::WINNT::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32", 5075c87c606SMark Murray"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32", 5085c87c606SMark Murray"VC-WIN32","cl::::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32", 5095c87c606SMark Murray"VC-WIN16","cl:::(unknown):WIN16::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::", 5105c87c606SMark Murray"VC-W31-16","cl:::(unknown):WIN16::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::", 5115c87c606SMark Murray"VC-W31-32","cl::::WIN16::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::", 5125c87c606SMark Murray"VC-MSDOS","cl:::(unknown):MSDOS::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::", 51374664626SKris Kennaway 51474664626SKris Kennaway# Borland C++ 4.5 515fceca8a3SJacques Vidrine"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN::::::::::win32", 5165c87c606SMark Murray"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::", 51774664626SKris Kennaway 51850ef0093SJacques Vidrine# MinGW 51950ef0093SJacques Vidrine"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-mno-cygwin -lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32::::.dll", 520ddd58736SKris Kennaway 5214f20a5a2SJacques Vidrine# UWIN 5225c87c606SMark Murray"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", 5234f20a5a2SJacques Vidrine 524c1803d78SJacques Vidrine# Cygwin 5255c87c606SMark Murray"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32", 5265c87c606SMark Murray"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:::.dll", 5275c87c606SMark Murray 5285c87c606SMark Murray# DJGPP 5295c87c606SMark Murray"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall:::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::", 53074664626SKris Kennaway 53174664626SKris Kennaway# Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at> 5325c87c606SMark Murray"ultrix-cc","cc:-std1 -O -Olimit 2500 -DL_ENDIAN::(unknown):::::::", 5335c87c606SMark Murray"ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown):::::::", 53474664626SKris Kennaway# K&R C is no longer supported; you need gcc on old Ultrix installations 5355c87c606SMark Murray##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::", 53674664626SKris Kennaway 53774664626SKris Kennaway# Some OpenBSD from Bob Beck <beck@obtuse.com> 5385c87c606SMark Murray"OpenBSD", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 5395c87c606SMark Murray"OpenBSD-alpha", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 5405c87c606SMark Murray"OpenBSD-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 5415c87c606SMark Murray"OpenBSD-m68k", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 5425c87c606SMark Murray"OpenBSD-m88k", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 5435c87c606SMark Murray"OpenBSD-mips", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 5445c87c606SMark Murray"OpenBSD-powerpc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 5455c87c606SMark Murray"OpenBSD-sparc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 5465c87c606SMark Murray"OpenBSD-sparc64", "gcc:-DB_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2 BF_PTR::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 5475c87c606SMark Murray"OpenBSD-vax", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 5485c87c606SMark Murray"OpenBSD-hppa", "gcc:-DTERMIOS -O3 -fomit-frame-pointer::(unknown):::BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", 54974664626SKris Kennaway 550a21b1b38SKris Kennaway##### MacOS X (a.k.a. Rhapsody or Darwin) setup 5515c87c606SMark Murray"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", 5525c87c606SMark Murray"darwin-ppc-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", 5535c87c606SMark Murray"darwin-i386-cc","cc:-O3 -fomit-frame-pointer -fno-common -DB_ENDIAN::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::::::::::darwin-shared:-fPIC::.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", 5545c87c606SMark Murray 5555c87c606SMark Murray##### A/UX 5565c87c606SMark Murray"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", 557f579bf8eSKris Kennaway 558ddd58736SKris Kennaway##### Sony NEWS-OS 4.x 5595c87c606SMark Murray"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::", 5605c87c606SMark Murray 5615c87c606SMark Murray##### GNU Hurd 5625c87c606SMark Murray"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC", 5635c87c606SMark Murray 5645c87c606SMark Murray##### OS/2 EMX 5655c87c606SMark Murray"OS2-EMX", "gcc::::::::", 566ddd58736SKris Kennaway 567c1803d78SJacques Vidrine##### VxWorks for various targets 5685c87c606SMark Murray"vxworks-ppc405","ccppc:-g -msoft-float -mlongcall -DCPU=PPC405 -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::", 5695c87c606SMark Murray"vxworks-ppc750","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h \$(DEBUG_FLAG):::VXWORKS:-r:::::", 5705c87c606SMark Murray"vxworks-ppc750-debug","ccppc:-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g:::VXWORKS:-r:::::", 57150ef0093SJacques Vidrine"vxworks-ppc860","ccppc:-nostdinc -msoft-float -DCPU=PPC860 -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r:::::", 57250ef0093SJacques Vidrine"vxworks-mipsle","ccmips:-B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -DL_ENDIAN -EL -Wl,-EL -mips2 -mno-branch-likely -G 0 -fno-builtin -msoft-float -DCPU=MIPS32 -DMIPSEL -DNO_STRINGS_H -I\$(WIND_BASE)/target/h:::VXWORKS:-r::::::::::::::::ranlibmips:", 5735c87c606SMark Murray 5745c87c606SMark Murray##### Compaq Non-Stop Kernel (Tandem) 5755c87c606SMark Murray"tandem-c89","c89:-Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN::(unknown):::THIRTY_TWO_BIT:::", 576c1803d78SJacques Vidrine 57774664626SKris Kennaway); 57874664626SKris Kennaway 5795c87c606SMark Murraymy @WinTargets=qw(VC-NT VC-CE VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS 5805c87c606SMark Murray BC-32 BC-16 Mingw32 OS2-EMX); 58174664626SKris Kennaway 582c1803d78SJacques Vidrinemy $idx = 0; 583c1803d78SJacques Vidrinemy $idx_cc = $idx++; 584c1803d78SJacques Vidrinemy $idx_cflags = $idx++; 585c1803d78SJacques Vidrinemy $idx_unistd = $idx++; 586c1803d78SJacques Vidrinemy $idx_thread_cflag = $idx++; 5875c87c606SMark Murraymy $idx_sys_id = $idx++; 588c1803d78SJacques Vidrinemy $idx_lflags = $idx++; 589c1803d78SJacques Vidrinemy $idx_bn_ops = $idx++; 590c1803d78SJacques Vidrinemy $idx_bn_obj = $idx++; 591c1803d78SJacques Vidrinemy $idx_des_obj = $idx++; 592c1803d78SJacques Vidrinemy $idx_bf_obj = $idx++; 593c1803d78SJacques Vidrinemy $idx_md5_obj = $idx++; 594c1803d78SJacques Vidrinemy $idx_sha1_obj = $idx++; 595c1803d78SJacques Vidrinemy $idx_cast_obj = $idx++; 596c1803d78SJacques Vidrinemy $idx_rc4_obj = $idx++; 597c1803d78SJacques Vidrinemy $idx_rmd160_obj = $idx++; 598c1803d78SJacques Vidrinemy $idx_rc5_obj = $idx++; 599c1803d78SJacques Vidrinemy $idx_dso_scheme = $idx++; 600c1803d78SJacques Vidrinemy $idx_shared_target = $idx++; 601c1803d78SJacques Vidrinemy $idx_shared_cflag = $idx++; 602c1803d78SJacques Vidrinemy $idx_shared_ldflag = $idx++; 603c1803d78SJacques Vidrinemy $idx_shared_extension = $idx++; 604c1803d78SJacques Vidrinemy $idx_ranlib = $idx++; 6055c87c606SMark Murraymy $idx_arflags = $idx++; 606c1803d78SJacques Vidrine 60774664626SKris Kennawaymy $prefix=""; 60874664626SKris Kennawaymy $openssldir=""; 6095740a5e3SKris Kennawaymy $exe_ext=""; 61074664626SKris Kennawaymy $install_prefix=""; 61174664626SKris Kennawaymy $no_threads=0; 612ddd58736SKris Kennawaymy $no_shared=1; 6135c87c606SMark Murraymy $zlib=0; 6145c87c606SMark Murraymy $no_krb5=0; 61574664626SKris Kennawaymy $threads=0; 61674664626SKris Kennawaymy $no_asm=0; 617ddd58736SKris Kennawaymy $no_dso=0; 61874664626SKris Kennawaymy @skip=(); 6196be8ae07SJacques Vidrinemy $Makefile="Makefile"; 62074664626SKris Kennawaymy $des_locl="crypto/des/des_locl.h"; 62174664626SKris Kennawaymy $des ="crypto/des/des.h"; 62274664626SKris Kennawaymy $bn ="crypto/bn/bn.h"; 62374664626SKris Kennawaymy $md2 ="crypto/md2/md2.h"; 62474664626SKris Kennawaymy $rc4 ="crypto/rc4/rc4.h"; 62574664626SKris Kennawaymy $rc4_locl="crypto/rc4/rc4_locl.h"; 62674664626SKris Kennawaymy $idea ="crypto/idea/idea.h"; 62774664626SKris Kennawaymy $rc2 ="crypto/rc2/rc2.h"; 62874664626SKris Kennawaymy $bf ="crypto/bf/bf_locl.h"; 62974664626SKris Kennawaymy $bn_asm ="bn_asm.o"; 63074664626SKris Kennawaymy $des_enc="des_enc.o fcrypt_b.o"; 6316be8ae07SJacques Vidrinemy $fips_des_enc="fips_des_enc.o"; 63274664626SKris Kennawaymy $bf_enc ="bf_enc.o"; 63374664626SKris Kennawaymy $cast_enc="c_enc.o"; 63474664626SKris Kennawaymy $rc4_enc="rc4_enc.o"; 63574664626SKris Kennawaymy $rc5_enc="rc5_enc.o"; 63674664626SKris Kennawaymy $md5_obj=""; 63774664626SKris Kennawaymy $sha1_obj=""; 63874664626SKris Kennawaymy $rmd160_obj=""; 63974664626SKris Kennawaymy $processor=""; 6405740a5e3SKris Kennawaymy $default_ranlib; 64174664626SKris Kennawaymy $perl; 6426be8ae07SJacques Vidrinemy $fips=0; 6436be8ae07SJacques Vidrinemy $debug=0; 64474664626SKris Kennaway 6455c87c606SMark Murraymy $no_ssl2=0; 6465c87c606SMark Murraymy $no_ssl3=0; 6475c87c606SMark Murraymy $no_tls1=0; 6485c87c606SMark Murraymy $no_md5=0; 6495c87c606SMark Murraymy $no_sha=0; 6505c87c606SMark Murraymy $no_rsa=0; 6515c87c606SMark Murraymy $no_dh=0; 6525c87c606SMark Murray 65374664626SKris Kennaway&usage if ($#ARGV < 0); 65474664626SKris Kennaway 655ddd58736SKris Kennawaymy $flags; 656ddd58736SKris Kennawaymy $depflags; 657ddd58736SKris Kennawaymy $openssl_algorithm_defines; 658ddd58736SKris Kennawaymy $openssl_thread_defines; 6595c87c606SMark Murraymy $openssl_sys_defines=""; 660ddd58736SKris Kennawaymy $openssl_other_defines; 661ddd58736SKris Kennawaymy $libs; 662fceca8a3SJacques Vidrinemy $libkrb5=""; 663ddd58736SKris Kennawaymy $target; 664ddd58736SKris Kennawaymy $options; 665ddd58736SKris Kennawaymy $symlink; 6665c87c606SMark Murraymy $make_depend=0; 6675c87c606SMark Murraymy %withargs=(); 668ddd58736SKris Kennaway 669ddd58736SKris Kennawaymy @argvcopy=@ARGV; 670ddd58736SKris Kennawaymy $argvstring=""; 671ddd58736SKris Kennawaymy $argv_unprocessed=1; 672ddd58736SKris Kennaway 673ddd58736SKris Kennawaywhile($argv_unprocessed) 674ddd58736SKris Kennaway { 675ddd58736SKris Kennaway $flags=""; 676ddd58736SKris Kennaway $depflags=""; 677ddd58736SKris Kennaway $openssl_algorithm_defines=""; 678ddd58736SKris Kennaway $openssl_thread_defines=""; 6795c87c606SMark Murray $openssl_sys_defines=""; 680ddd58736SKris Kennaway $openssl_other_defines=""; 681ddd58736SKris Kennaway $libs=""; 682ddd58736SKris Kennaway $target=""; 683ddd58736SKris Kennaway $options=""; 684ddd58736SKris Kennaway $symlink=1; 685ddd58736SKris Kennaway 686ddd58736SKris Kennaway $argv_unprocessed=0; 687ddd58736SKris Kennaway $argvstring=join(' ',@argvcopy); 688ddd58736SKris Kennaway 689ddd58736SKris KennawayPROCESS_ARGS: 690ddd58736SKris Kennaway foreach (@argvcopy) 69174664626SKris Kennaway { 692f579bf8eSKris Kennaway s /^-no-/no-/; # some people just can't read the instructions 693c1803d78SJacques Vidrine if (/^--test-sanity$/) 694c1803d78SJacques Vidrine { 695c1803d78SJacques Vidrine exit(&test_sanity()); 696c1803d78SJacques Vidrine } 697c1803d78SJacques Vidrine elsif (/^no-asm$/) 69874664626SKris Kennaway { 69974664626SKris Kennaway $no_asm=1; 7005c87c606SMark Murray $flags .= "-DOPENSSL_NO_ASM "; 7015c87c606SMark Murray $openssl_other_defines .= "#define OPENSSL_NO_ASM\n"; 7025c87c606SMark Murray } 703fceca8a3SJacques Vidrine elsif (/^no-err$/) 704fceca8a3SJacques Vidrine { 705fceca8a3SJacques Vidrine $flags .= "-DOPENSSL_NO_ERR "; 706fceca8a3SJacques Vidrine $openssl_other_defines .= "#define OPENSSL_NO_ERR\n"; 707fceca8a3SJacques Vidrine } 7085c87c606SMark Murray elsif (/^no-hw-(.+)$/) 7095c87c606SMark Murray { 7105c87c606SMark Murray my $hw=$1; 7115c87c606SMark Murray $hw =~ tr/[a-z]/[A-Z]/; 7125c87c606SMark Murray $flags .= "-DOPENSSL_NO_HW_$hw "; 7135c87c606SMark Murray $openssl_other_defines .= "#define OPENSSL_NO_HW_$hw\n"; 7145c87c606SMark Murray } 7155c87c606SMark Murray elsif (/^no-hw$/) 7165c87c606SMark Murray { 7175c87c606SMark Murray $flags .= "-DOPENSSL_NO_HW "; 7185c87c606SMark Murray $openssl_other_defines .= "#define OPENSSL_NO_HW\n"; 71974664626SKris Kennaway } 720ddd58736SKris Kennaway elsif (/^no-dso$/) 721ddd58736SKris Kennaway { $no_dso=1; } 7225c87c606SMark Murray elsif (/^no-krb5$/) 7235c87c606SMark Murray { $no_krb5=1; } 72474664626SKris Kennaway elsif (/^no-threads$/) 72574664626SKris Kennaway { $no_threads=1; } 72674664626SKris Kennaway elsif (/^threads$/) 72774664626SKris Kennaway { $threads=1; } 728ddd58736SKris Kennaway elsif (/^no-shared$/) 729ddd58736SKris Kennaway { $no_shared=1; } 7305c87c606SMark Murray elsif (/^shared$/ || /^-shared$/ || /^--shared$/) 731ddd58736SKris Kennaway { $no_shared=0; } 7325c87c606SMark Murray elsif (/^no-zlib$/) 7335c87c606SMark Murray { $zlib=0; } 7345c87c606SMark Murray elsif (/^zlib$/) 7355c87c606SMark Murray { $zlib=1; } 7365c87c606SMark Murray elsif (/^zlib-dynamic$/) 7375c87c606SMark Murray { $zlib=2; } 738ddd58736SKris Kennaway elsif (/^no-symlinks$/) 739ddd58736SKris Kennaway { $symlink=0; } 7405c87c606SMark Murray elsif (/^no-ssl$/) 7415c87c606SMark Murray { $no_ssl2 = $no_ssl3 = 1; } 7425c87c606SMark Murray elsif (/^no-ssl2$/) 7435c87c606SMark Murray { $no_ssl2 = 1; } 7445c87c606SMark Murray elsif (/^no-ssl3$/) 7455c87c606SMark Murray { $no_ssl3 = 1; } 7465c87c606SMark Murray elsif (/^no-tls1?$/) 7475c87c606SMark Murray { $no_tls1 = 1; } 7486be8ae07SJacques Vidrine elsif (/^no-fips$/) 7496be8ae07SJacques Vidrine { $fips = 0; } 75074664626SKris Kennaway elsif (/^no-(.+)$/) 75174664626SKris Kennaway { 75274664626SKris Kennaway my $algo=$1; 75374664626SKris Kennaway push @skip,$algo; 75474664626SKris Kennaway $algo =~ tr/[a-z]/[A-Z]/; 7555c87c606SMark Murray $flags .= "-DOPENSSL_NO_$algo "; 7565c87c606SMark Murray $depflags .= "-DOPENSSL_NO_$algo "; 7575c87c606SMark Murray $openssl_algorithm_defines .= "#define OPENSSL_NO_$algo\n"; 7585c87c606SMark Murray if ($algo eq "RIJNDAEL") 7595c87c606SMark Murray { 7605c87c606SMark Murray push @skip, "aes"; 7615c87c606SMark Murray $flags .= "-DOPENSSL_NO_AES "; 7625c87c606SMark Murray $depflags .= "-DOPENSSL_NO_AES "; 7635c87c606SMark Murray $openssl_algorithm_defines .= "#define OPENSSL_NO_AES\n"; 7645c87c606SMark Murray } 76574664626SKris Kennaway if ($algo eq "DES") 76674664626SKris Kennaway { 767f579bf8eSKris Kennaway push @skip, "mdc2"; 76874664626SKris Kennaway $options .= " no-mdc2"; 7695c87c606SMark Murray $flags .= "-DOPENSSL_NO_MDC2 "; 7705c87c606SMark Murray $depflags .= "-DOPENSSL_NO_MDC2 "; 7715c87c606SMark Murray $openssl_algorithm_defines .= "#define OPENSSL_NO_MDC2\n"; 7725c87c606SMark Murray } 7735c87c606SMark Murray if ($algo eq "MD5") 7745c87c606SMark Murray { 7755c87c606SMark Murray $no_md5 = 1; 7765c87c606SMark Murray } 7775c87c606SMark Murray if ($algo eq "SHA") 7785c87c606SMark Murray { 7795c87c606SMark Murray $no_sha = 1; 7805c87c606SMark Murray } 7815c87c606SMark Murray if ($algo eq "RSA") 7825c87c606SMark Murray { 7835c87c606SMark Murray $no_rsa = 1; 7845c87c606SMark Murray } 7855c87c606SMark Murray if ($algo eq "DH") 7865c87c606SMark Murray { 7875c87c606SMark Murray $no_dh = 1; 78874664626SKris Kennaway } 78974664626SKris Kennaway } 790ddd58736SKris Kennaway elsif (/^reconfigure/ || /^reconf/) 791ddd58736SKris Kennaway { 792ddd58736SKris Kennaway if (open(IN,"<$Makefile")) 793ddd58736SKris Kennaway { 794ddd58736SKris Kennaway while (<IN>) 795ddd58736SKris Kennaway { 796ddd58736SKris Kennaway chop; 797ddd58736SKris Kennaway if (/^CONFIGURE_ARGS=(.*)/) 798ddd58736SKris Kennaway { 799ddd58736SKris Kennaway $argvstring=$1; 800ddd58736SKris Kennaway @argvcopy=split(' ',$argvstring); 801ddd58736SKris Kennaway die "Incorrect data to reconfigure, please do a normal configuration\n" 802ddd58736SKris Kennaway if (grep(/^reconf/,@argvcopy)); 803ddd58736SKris Kennaway print "Reconfiguring with: $argvstring\n"; 804ddd58736SKris Kennaway $argv_unprocessed=1; 805ddd58736SKris Kennaway close(IN); 806ddd58736SKris Kennaway last PROCESS_ARGS; 807ddd58736SKris Kennaway } 808ddd58736SKris Kennaway } 809ddd58736SKris Kennaway close(IN); 810ddd58736SKris Kennaway } 811ddd58736SKris Kennaway die "Insufficient data to reconfigure, please do a normal configuration\n"; 812ddd58736SKris Kennaway } 81374664626SKris Kennaway elsif (/^386$/) 81474664626SKris Kennaway { $processor=386; } 8156be8ae07SJacques Vidrine elsif (/^fips$/) 8166be8ae07SJacques Vidrine { 8176be8ae07SJacques Vidrine $fips=1; 8186be8ae07SJacques Vidrine } 8196be8ae07SJacques Vidrine elsif (/^debug$/) 8206be8ae07SJacques Vidrine { 8216be8ae07SJacques Vidrine $debug=1; 8226be8ae07SJacques Vidrine } 82374664626SKris Kennaway elsif (/^rsaref$/) 82474664626SKris Kennaway { 8255c87c606SMark Murray # No RSAref support any more since it's not needed. 8265c87c606SMark Murray # The check for the option is there so scripts aren't 8275c87c606SMark Murray # broken 82874664626SKris Kennaway } 82974664626SKris Kennaway elsif (/^[-+]/) 83074664626SKris Kennaway { 83174664626SKris Kennaway if (/^-[lL](.*)$/) 83274664626SKris Kennaway { 83374664626SKris Kennaway $libs.=$_." "; 83474664626SKris Kennaway } 83574664626SKris Kennaway elsif (/^-[^-]/ or /^\+/) 83674664626SKris Kennaway { 83774664626SKris Kennaway $flags.=$_." "; 83874664626SKris Kennaway } 83974664626SKris Kennaway elsif (/^--prefix=(.*)$/) 84074664626SKris Kennaway { 84174664626SKris Kennaway $prefix=$1; 84274664626SKris Kennaway } 84374664626SKris Kennaway elsif (/^--openssldir=(.*)$/) 84474664626SKris Kennaway { 84574664626SKris Kennaway $openssldir=$1; 84674664626SKris Kennaway } 84774664626SKris Kennaway elsif (/^--install.prefix=(.*)$/) 84874664626SKris Kennaway { 84974664626SKris Kennaway $install_prefix=$1; 85074664626SKris Kennaway } 8515c87c606SMark Murray elsif (/^--with-krb5-(dir|lib|include|flavor)=(.*)$/) 8525c87c606SMark Murray { 8535c87c606SMark Murray $withargs{"krb5-".$1}=$2; 8545c87c606SMark Murray } 85574664626SKris Kennaway else 85674664626SKris Kennaway { 85774664626SKris Kennaway print STDERR $usage; 85874664626SKris Kennaway exit(1); 85974664626SKris Kennaway } 86074664626SKris Kennaway } 86174664626SKris Kennaway elsif ($_ =~ /^([^:]+):(.+)$/) 86274664626SKris Kennaway { 86374664626SKris Kennaway eval "\$table{\$1} = \"$2\""; # allow $xxx constructs in the string 86474664626SKris Kennaway $target=$1; 86574664626SKris Kennaway } 86674664626SKris Kennaway else 86774664626SKris Kennaway { 86874664626SKris Kennaway die "target already defined - $target\n" if ($target ne ""); 86974664626SKris Kennaway $target=$_; 87074664626SKris Kennaway } 87174664626SKris Kennaway unless ($_ eq $target) { 87274664626SKris Kennaway if ($options eq "") { 87374664626SKris Kennaway $options = $_; 87474664626SKris Kennaway } else { 87574664626SKris Kennaway $options .= " ".$_; 87674664626SKris Kennaway } 87774664626SKris Kennaway } 87874664626SKris Kennaway } 879ddd58736SKris Kennaway} 88074664626SKris Kennaway 8815c87c606SMark Murray$no_ssl3=1 if ($no_md5 || $no_sha); 8825c87c606SMark Murray$no_ssl3=1 if ($no_rsa && $no_dh); 8835c87c606SMark Murray 8845c87c606SMark Murray$no_ssl2=1 if ($no_md5); 8855c87c606SMark Murray$no_ssl2=1 if ($no_rsa); 8865c87c606SMark Murray 8875c87c606SMark Murray$no_tls1=1 if ($no_md5 || $no_sha); 8885c87c606SMark Murray$no_tls1=1 if ($no_dh); 8895c87c606SMark Murray 8905c87c606SMark Murrayif ($no_ssl2) 8915c87c606SMark Murray { 8925c87c606SMark Murray push @skip,"SSL2"; 8935c87c606SMark Murray $flags .= "-DOPENSSL_NO_SSL2 "; 8945c87c606SMark Murray $depflags .= "-DOPENSSL_NO_SSL2 "; 8955c87c606SMark Murray $openssl_algorithm_defines .= "#define OPENSSL_NO_SSL2\n"; 8965c87c606SMark Murray } 8975c87c606SMark Murray 8985c87c606SMark Murrayif ($no_ssl3) 8995c87c606SMark Murray { 9005c87c606SMark Murray push @skip,"SSL3"; 9015c87c606SMark Murray $flags .= "-DOPENSSL_NO_SSL3 "; 9025c87c606SMark Murray $depflags .= "-DOPENSSL_NO_SSL3 "; 9035c87c606SMark Murray $openssl_algorithm_defines .= "#define OPENSSL_NO_SSL3\n"; 9045c87c606SMark Murray } 9055c87c606SMark Murray 9065c87c606SMark Murrayif ($no_tls1) 9075c87c606SMark Murray { 9085c87c606SMark Murray push @skip,"TLS1"; 9095c87c606SMark Murray $flags .= "-DOPENSSL_NO_TLS1 "; 9105c87c606SMark Murray $depflags .= "-DOPENSSL_NO_TLS1 "; 9115c87c606SMark Murray $openssl_algorithm_defines .= "#define OPENSSL_NO_TLS1\n"; 9125c87c606SMark Murray } 9135c87c606SMark Murray 91474664626SKris Kennawayif ($target eq "TABLE") { 91574664626SKris Kennaway foreach $target (sort keys %table) { 91674664626SKris Kennaway print_table_entry($target); 91774664626SKris Kennaway } 91874664626SKris Kennaway exit 0; 91974664626SKris Kennaway} 92074664626SKris Kennaway 921f579bf8eSKris Kennawayif ($target eq "LIST") { 922f579bf8eSKris Kennaway foreach (sort keys %table) { 923f579bf8eSKris Kennaway print; 924f579bf8eSKris Kennaway print "\n"; 925f579bf8eSKris Kennaway } 926f579bf8eSKris Kennaway exit 0; 927f579bf8eSKris Kennaway} 928f579bf8eSKris Kennaway 929c1803d78SJacques Vidrineif ($target =~ m/^CygWin32(-.*)$/) { 930c1803d78SJacques Vidrine $target = "Cygwin".$1; 931c1803d78SJacques Vidrine} 932c1803d78SJacques Vidrine 933ddd58736SKris Kennawayprint "Configuring for $target\n"; 934ddd58736SKris Kennaway 93574664626SKris Kennaway&usage if (!defined($table{$target})); 93674664626SKris Kennaway 93774664626SKris Kennawaymy $IsWindows=scalar grep /^$target$/,@WinTargets; 93874664626SKris Kennaway 939c1803d78SJacques Vidrine$exe_ext=".exe" if ($target eq "Cygwin"); 9405c87c606SMark Murray$exe_ext=".exe" if ($target eq "DJGPP"); 9416be8ae07SJacques Vidrine$exe_ext=".pm" if ($target eq "vos-gcc" or $target eq "debug-vos-gcc" or $target eq "vos-vcc" or $target eq "debug-vos-vcc"); 94274664626SKris Kennaway$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq ""); 94374664626SKris Kennaway$prefix=$openssldir if $prefix eq ""; 94474664626SKris Kennaway 9456be8ae07SJacques Vidrine$default_ranlib= &which("ranlib") or $default_ranlib="true"; 9466be8ae07SJacques Vidrine$perl=$ENV{'PERL'} or $perl=&which("perl5") or $perl=&which("perl") 9476be8ae07SJacques Vidrine or $perl="perl"; 9486be8ae07SJacques Vidrine 94974664626SKris Kennawaychop $openssldir if $openssldir =~ /\/$/; 95074664626SKris Kennawaychop $prefix if $prefix =~ /\/$/; 95174664626SKris Kennaway 95274664626SKris Kennaway$openssldir=$prefix . "/ssl" if $openssldir eq ""; 9535c87c606SMark Murray$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/])/; 95474664626SKris Kennaway 95574664626SKris Kennaway 95674664626SKris Kennawayprint "IsWindows=$IsWindows\n"; 95774664626SKris Kennaway 958c1803d78SJacques Vidrinemy @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); 959c1803d78SJacques Vidrinemy $cc = $fields[$idx_cc]; 960c1803d78SJacques Vidrinemy $cflags = $fields[$idx_cflags]; 961c1803d78SJacques Vidrinemy $unistd = $fields[$idx_unistd]; 962c1803d78SJacques Vidrinemy $thread_cflag = $fields[$idx_thread_cflag]; 9635c87c606SMark Murraymy $sys_id = $fields[$idx_sys_id]; 964c1803d78SJacques Vidrinemy $lflags = $fields[$idx_lflags]; 965c1803d78SJacques Vidrinemy $bn_ops = $fields[$idx_bn_ops]; 966c1803d78SJacques Vidrinemy $bn_obj = $fields[$idx_bn_obj]; 967c1803d78SJacques Vidrinemy $des_obj = $fields[$idx_des_obj]; 968c1803d78SJacques Vidrinemy $bf_obj = $fields[$idx_bf_obj]; 9695c87c606SMark Murray$md5_obj = $fields[$idx_md5_obj]; 9705c87c606SMark Murray$sha1_obj = $fields[$idx_sha1_obj]; 971c1803d78SJacques Vidrinemy $cast_obj = $fields[$idx_cast_obj]; 972c1803d78SJacques Vidrinemy $rc4_obj = $fields[$idx_rc4_obj]; 9735c87c606SMark Murray$rmd160_obj = $fields[$idx_rmd160_obj]; 974c1803d78SJacques Vidrinemy $rc5_obj = $fields[$idx_rc5_obj]; 975c1803d78SJacques Vidrinemy $dso_scheme = $fields[$idx_dso_scheme]; 976c1803d78SJacques Vidrinemy $shared_target = $fields[$idx_shared_target]; 977c1803d78SJacques Vidrinemy $shared_cflag = $fields[$idx_shared_cflag]; 978c1803d78SJacques Vidrinemy $shared_ldflag = $fields[$idx_shared_ldflag]; 979c1803d78SJacques Vidrinemy $shared_extension = $fields[$idx_shared_extension]; 980c1803d78SJacques Vidrinemy $ranlib = $fields[$idx_ranlib]; 9815c87c606SMark Murraymy $arflags = $fields[$idx_arflags]; 982c1803d78SJacques Vidrine 983fceca8a3SJacques Vidrinemy $no_shared_warn=0; 984fceca8a3SJacques Vidrine 98574664626SKris Kennaway$cflags="$flags$cflags" if ($flags ne ""); 98674664626SKris Kennaway 9875c87c606SMark Murray# Kerberos settings. The flavor must be provided from outside, either through 9885c87c606SMark Murray# the script "config" or manually. 9895c87c606SMark Murrayif ($no_krb5 9905c87c606SMark Murray || !defined($withargs{"krb5-flavor"}) 9915c87c606SMark Murray || $withargs{"krb5-flavor"} eq "") 9925c87c606SMark Murray { 9935c87c606SMark Murray $cflags="-DOPENSSL_NO_KRB5 $cflags"; 9945c87c606SMark Murray $options.=" no-krb5" unless $no_krb5; 9955c87c606SMark Murray $openssl_algorithm_defines .= "#define OPENSSL_NO_KRB5\n"; 9965c87c606SMark Murray } 9975c87c606SMark Murrayelse 9985c87c606SMark Murray { 9995c87c606SMark Murray my ($lresolv, $lpath, $lext); 10005c87c606SMark Murray if ($withargs{"krb5-flavor"} =~ /^[Hh]eimdal$/) 10015c87c606SMark Murray { 10025c87c606SMark Murray die "Sorry, Heimdal is currently not supported\n"; 10035c87c606SMark Murray } 10045c87c606SMark Murray ##### HACK to force use of Heimdal. 10055c87c606SMark Murray ##### WARNING: Since we don't really have adequate support for Heimdal, 10065c87c606SMark Murray ##### using this will break the build. You'll have to make 10075c87c606SMark Murray ##### changes to the source, and if you do, please send 10085c87c606SMark Murray ##### patches to openssl-dev@openssl.org 10095c87c606SMark Murray if ($withargs{"krb5-flavor"} =~ /^force-[Hh]eimdal$/) 10105c87c606SMark Murray { 10115c87c606SMark Murray warn "Heimdal isn't really supported. Your build WILL break\n"; 10125c87c606SMark Murray warn "If you fix the problems, please send a patch to openssl-dev\@openssl.org\n"; 10135c87c606SMark Murray $withargs{"krb5-dir"} = "/usr/heimdal" 10145c87c606SMark Murray if $withargs{"krb5-dir"} eq ""; 10155c87c606SMark Murray $withargs{"krb5-lib"} = "-L".$withargs{"krb5-dir"}. 10165c87c606SMark Murray "/lib -lgssapi -lkrb5 -lcom_err" 10175c87c606SMark Murray if $withargs{"krb5-lib"} eq ""; 10185c87c606SMark Murray $cflags="-DKRB5_HEIMDAL $cflags"; 10195c87c606SMark Murray } 10205c87c606SMark Murray if ($withargs{"krb5-flavor"} =~ /^[Mm][Ii][Tt]/) 10215c87c606SMark Murray { 10225c87c606SMark Murray $withargs{"krb5-dir"} = "/usr/kerberos" 10235c87c606SMark Murray if $withargs{"krb5-dir"} eq ""; 10245c87c606SMark Murray $withargs{"krb5-lib"} = "-L".$withargs{"krb5-dir"}. 10255c87c606SMark Murray "/lib -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto" 10265c87c606SMark Murray if $withargs{"krb5-lib"} eq ""; 10275c87c606SMark Murray $cflags="-DKRB5_MIT $cflags"; 10285c87c606SMark Murray $withargs{"krb5-flavor"} =~ s/^[Mm][Ii][Tt][._-]*//; 10295c87c606SMark Murray if ($withargs{"krb5-flavor"} =~ /^1[._-]*[01]/) 10305c87c606SMark Murray { 10315c87c606SMark Murray $cflags="-DKRB5_MIT_OLD11 $cflags"; 10325c87c606SMark Murray } 10335c87c606SMark Murray } 10345c87c606SMark Murray LRESOLV: 10355c87c606SMark Murray foreach $lpath ("/lib", "/usr/lib") 10365c87c606SMark Murray { 10375c87c606SMark Murray foreach $lext ("a", "so") 10385c87c606SMark Murray { 10395c87c606SMark Murray $lresolv = "$lpath/libresolv.$lext"; 10405c87c606SMark Murray last LRESOLV if (-r "$lresolv"); 10415c87c606SMark Murray $lresolv = ""; 10425c87c606SMark Murray } 10435c87c606SMark Murray } 10445c87c606SMark Murray $withargs{"krb5-lib"} .= " -lresolv" 10455c87c606SMark Murray if ("$lresolv" ne ""); 10465c87c606SMark Murray $withargs{"krb5-include"} = "-I".$withargs{"krb5-dir"}."/include" 10475c87c606SMark Murray if $withargs{"krb5-include"} eq "" && 10485c87c606SMark Murray $withargs{"krb5-dir"} ne ""; 10495c87c606SMark Murray } 10505c87c606SMark Murray 1051ddd58736SKris Kennaway# The DSO code currently always implements all functions so that no 1052ddd58736SKris Kennaway# applications will have to worry about that from a compilation point 1053ddd58736SKris Kennaway# of view. However, the "method"s may return zero unless that platform 1054ddd58736SKris Kennaway# has support compiled in for them. Currently each method is enabled 1055ddd58736SKris Kennaway# by a define "DSO_<name>" ... we translate the "dso_scheme" config 1056ddd58736SKris Kennaway# string entry into using the following logic; 1057ddd58736SKris Kennawaymy $dso_cflags; 1058ddd58736SKris Kennawayif (!$no_dso && $dso_scheme ne "") 1059ddd58736SKris Kennaway { 1060ddd58736SKris Kennaway $dso_scheme =~ tr/[a-z]/[A-Z]/; 1061ddd58736SKris Kennaway if ($dso_scheme eq "DLFCN") 1062ddd58736SKris Kennaway { 1063ddd58736SKris Kennaway $dso_cflags = "-DDSO_DLFCN -DHAVE_DLFCN_H"; 1064ddd58736SKris Kennaway } 1065ddd58736SKris Kennaway elsif ($dso_scheme eq "DLFCN_NO_H") 1066ddd58736SKris Kennaway { 1067ddd58736SKris Kennaway $dso_cflags = "-DDSO_DLFCN"; 1068ddd58736SKris Kennaway } 1069ddd58736SKris Kennaway else 1070ddd58736SKris Kennaway { 1071ddd58736SKris Kennaway $dso_cflags = "-DDSO_$dso_scheme"; 1072ddd58736SKris Kennaway } 1073ddd58736SKris Kennaway $cflags = "$dso_cflags $cflags"; 1074ddd58736SKris Kennaway } 1075ddd58736SKris Kennaway 107674664626SKris Kennawaymy $thread_cflags; 1077f579bf8eSKris Kennawaymy $thread_defines; 107874664626SKris Kennawayif ($thread_cflag ne "(unknown)" && !$no_threads) 107974664626SKris Kennaway { 108074664626SKris Kennaway # If we know how to do it, support threads by default. 108174664626SKris Kennaway $threads = 1; 108274664626SKris Kennaway } 108374664626SKris Kennawayif ($thread_cflag eq "(unknown)") 108474664626SKris Kennaway { 108574664626SKris Kennaway # If the user asked for "threads", hopefully they also provided 108674664626SKris Kennaway # any system-dependent compiler options that are necessary. 10875c87c606SMark Murray $thread_cflags="-DOPENSSL_THREADS $cflags" ; 10885c87c606SMark Murray $thread_defines .= "#define OPENSSL_THREADS\n"; 108974664626SKris Kennaway } 109074664626SKris Kennawayelse 109174664626SKris Kennaway { 10925c87c606SMark Murray $thread_cflags="-DOPENSSL_THREADS $thread_cflag $cflags"; 10935c87c606SMark Murray $thread_defines .= "#define OPENSSL_THREADS\n"; 1094f579bf8eSKris Kennaway# my $def; 1095f579bf8eSKris Kennaway# foreach $def (split ' ',$thread_cflag) 1096f579bf8eSKris Kennaway# { 1097f579bf8eSKris Kennaway# if ($def =~ s/^-D// && $def !~ /^_/) 1098f579bf8eSKris Kennaway# { 1099f579bf8eSKris Kennaway# $thread_defines .= "#define $def\n"; 1100f579bf8eSKris Kennaway# } 1101f579bf8eSKris Kennaway# } 110274664626SKris Kennaway } 110374664626SKris Kennaway 110474664626SKris Kennaway$lflags="$libs$lflags" if ($libs ne ""); 110574664626SKris Kennaway 110674664626SKris Kennawayif ($no_asm) 110774664626SKris Kennaway { 110874664626SKris Kennaway $bn_obj=$des_obj=$bf_obj=$cast_obj=$rc4_obj=$rc5_obj=""; 110974664626SKris Kennaway $sha1_obj=$md5_obj=$rmd160_obj=""; 111074664626SKris Kennaway } 111174664626SKris Kennaway 11125c87c606SMark Murrayif (!$no_shared) 11135c87c606SMark Murray { 11145c87c606SMark Murray $cast_obj=""; # CAST assembler is not PIC 11155c87c606SMark Murray } 11165c87c606SMark Murray 111774664626SKris Kennawayif ($threads) 111874664626SKris Kennaway { 111974664626SKris Kennaway $cflags=$thread_cflags; 1120f579bf8eSKris Kennaway $openssl_thread_defines .= $thread_defines; 112174664626SKris Kennaway } 112274664626SKris Kennaway 11235c87c606SMark Murrayif ($zlib) 11245c87c606SMark Murray { 11255c87c606SMark Murray $cflags = "-DZLIB $cflags"; 11265c87c606SMark Murray $cflags = "-DZLIB_SHARED $cflags" if $zlib == 2; 11275c87c606SMark Murray $lflags = "$lflags -lz" if $zlib == 1; 11285c87c606SMark Murray } 11295c87c606SMark Murray 1130ddd58736SKris Kennaway# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org 11315740a5e3SKris Kennawaymy $shared_mark = ""; 11325c87c606SMark Murrayif ($shared_target eq "") 11335c87c606SMark Murray { 1134fceca8a3SJacques Vidrine $no_shared_warn = 1 if !$no_shared; 11355c87c606SMark Murray $no_shared = 1; 11365c87c606SMark Murray } 11375c87c606SMark Murrayif (!$no_shared) 11385740a5e3SKris Kennaway { 1139ddd58736SKris Kennaway if ($shared_cflag ne "") 1140ddd58736SKris Kennaway { 1141ddd58736SKris Kennaway $cflags = "$shared_cflag $cflags"; 11425740a5e3SKris Kennaway } 1143ddd58736SKris Kennaway } 11445c87c606SMark Murray 11455c87c606SMark Murrayif ($sys_id ne "") 1146de7cdddaSKris Kennaway { 11475c87c606SMark Murray $cflags="-DOPENSSL_SYSNAME_$sys_id $cflags"; 11485c87c606SMark Murray $openssl_sys_defines="#define OPENSSL_SYSNAME_$sys_id\n"; 1149de7cdddaSKris Kennaway } 1150ddd58736SKris Kennaway 11515740a5e3SKris Kennawayif ($ranlib eq "") 11525740a5e3SKris Kennaway { 11535740a5e3SKris Kennaway $ranlib = $default_ranlib; 11545740a5e3SKris Kennaway } 11555740a5e3SKris Kennaway 115674664626SKris Kennaway#my ($bn1)=split(/\s+/,$bn_obj); 115774664626SKris Kennaway#$bn1 = "" unless defined $bn1; 115874664626SKris Kennaway#$bn1=$bn_asm unless ($bn1 =~ /\.o$/); 115974664626SKris Kennaway#$bn_obj="$bn1"; 116074664626SKris Kennaway 116174664626SKris Kennaway$bn_obj = $bn_asm unless $bn_obj ne ""; 116274664626SKris Kennaway 11636be8ae07SJacques Vidrineif ($fips) 11646be8ae07SJacques Vidrine { 11656be8ae07SJacques Vidrine $des_obj=$sha1_obj=""; 11666be8ae07SJacques Vidrine $openssl_other_defines.="#define OPENSSL_FIPS\n"; 11676be8ae07SJacques Vidrine } 11686be8ae07SJacques Vidrine$des_obj=$des_enc unless (!$fips && $des_obj =~ /\.o$/); 11696be8ae07SJacques Vidrinemy $fips_des_obj='asm/fips-dx86-elf.o'; 11706be8ae07SJacques Vidrine$fips_des_obj=$fips_des_enc unless $processor eq '386'; 11716be8ae07SJacques Vidrinemy $fips_sha1_obj='asm/sx86-elf.o' if $processor eq '386'; 117274664626SKris Kennaway$bf_obj=$bf_enc unless ($bf_obj =~ /\.o$/); 117374664626SKris Kennaway$cast_obj=$cast_enc unless ($cast_obj =~ /\.o$/); 117474664626SKris Kennaway$rc4_obj=$rc4_enc unless ($rc4_obj =~ /\.o$/); 117574664626SKris Kennaway$rc5_obj=$rc5_enc unless ($rc5_obj =~ /\.o$/); 11766be8ae07SJacques Vidrineif ($sha1_obj =~ /\.o$/ || $fips_sha1_obj =~ /\.o$/) 117774664626SKris Kennaway { 117874664626SKris Kennaway# $sha1_obj=$sha1_enc; 117974664626SKris Kennaway $cflags.=" -DSHA1_ASM"; 118074664626SKris Kennaway } 118174664626SKris Kennawayif ($md5_obj =~ /\.o$/) 118274664626SKris Kennaway { 118374664626SKris Kennaway# $md5_obj=$md5_enc; 118474664626SKris Kennaway $cflags.=" -DMD5_ASM"; 118574664626SKris Kennaway } 118674664626SKris Kennawayif ($rmd160_obj =~ /\.o$/) 118774664626SKris Kennaway { 118874664626SKris Kennaway# $rmd160_obj=$rmd160_enc; 118974664626SKris Kennaway $cflags.=" -DRMD160_ASM"; 119074664626SKris Kennaway } 119174664626SKris Kennaway 11926be8ae07SJacques Vidrineif ($debug) 11936be8ae07SJacques Vidrine { 11946be8ae07SJacques Vidrine $cflags.=" -g"; 11956be8ae07SJacques Vidrine $cflags=~s/-fomit-frame-pointer//; 11966be8ae07SJacques Vidrine } 11976be8ae07SJacques Vidrine 11984f20a5a2SJacques Vidrine# "Stringify" the C flags string. This permits it to be made part of a string 11994f20a5a2SJacques Vidrine# and works as well on command lines. 12004f20a5a2SJacques Vidrine$cflags =~ s/([\\\"])/\\\1/g; 12014f20a5a2SJacques Vidrine 120274664626SKris Kennawaymy $version = "unknown"; 120374664626SKris Kennawaymy $major = "unknown"; 120474664626SKris Kennawaymy $minor = "unknown"; 1205ddd58736SKris Kennawaymy $shlib_version_number = "unknown"; 1206ddd58736SKris Kennawaymy $shlib_version_history = "unknown"; 1207ddd58736SKris Kennawaymy $shlib_major = "unknown"; 1208ddd58736SKris Kennawaymy $shlib_minor = "unknown"; 120974664626SKris Kennaway 121074664626SKris Kennawayopen(IN,'<crypto/opensslv.h') || die "unable to read opensslv.h:$!\n"; 121174664626SKris Kennawaywhile (<IN>) 121274664626SKris Kennaway { 121374664626SKris Kennaway $version=$1 if /OPENSSL.VERSION.TEXT.*OpenSSL (\S+) /; 1214ddd58736SKris Kennaway $shlib_version_number=$1 if /SHLIB_VERSION_NUMBER *"([^"]+)"/; 1215ddd58736SKris Kennaway $shlib_version_history=$1 if /SHLIB_VERSION_HISTORY *"([^"]*)"/; 121674664626SKris Kennaway } 121774664626SKris Kennawayclose(IN); 1218ddd58736SKris Kennawayif ($shlib_version_history ne "") { $shlib_version_history .= ":"; } 121974664626SKris Kennaway 122074664626SKris Kennawayif ($version =~ /(^[0-9]*)\.([0-9\.]*)/) 122174664626SKris Kennaway { 122274664626SKris Kennaway $major=$1; 122374664626SKris Kennaway $minor=$2; 122474664626SKris Kennaway } 122574664626SKris Kennaway 1226ddd58736SKris Kennawayif ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/) 1227ddd58736SKris Kennaway { 1228ddd58736SKris Kennaway $shlib_major=$1; 1229ddd58736SKris Kennaway $shlib_minor=$2; 1230ddd58736SKris Kennaway } 1231ddd58736SKris Kennaway 123274664626SKris Kennawayopen(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n"; 12335c87c606SMark Murrayunlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new"; 12345c87c606SMark Murrayopen(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n"; 1235f579bf8eSKris Kennawayprint OUT "### Generated automatically from Makefile.org by Configure.\n\n"; 123674664626SKris Kennawaymy $sdirs=0; 123774664626SKris Kennawaywhile (<IN>) 123874664626SKris Kennaway { 123974664626SKris Kennaway chop; 124074664626SKris Kennaway $sdirs = 1 if /^SDIRS=/; 124174664626SKris Kennaway if ($sdirs) { 124274664626SKris Kennaway my $dir; 124374664626SKris Kennaway foreach $dir (@skip) { 12445c87c606SMark Murray s/([ ])$dir /\1/; 124574664626SKris Kennaway } 124674664626SKris Kennaway } 124774664626SKris Kennaway $sdirs = 0 unless /\\$/; 124874664626SKris Kennaway s/^VERSION=.*/VERSION=$version/; 124974664626SKris Kennaway s/^MAJOR=.*/MAJOR=$major/; 125074664626SKris Kennaway s/^MINOR=.*/MINOR=$minor/; 1251ddd58736SKris Kennaway s/^SHLIB_VERSION_NUMBER=.*/SHLIB_VERSION_NUMBER=$shlib_version_number/; 1252ddd58736SKris Kennaway s/^SHLIB_VERSION_HISTORY=.*/SHLIB_VERSION_HISTORY=$shlib_version_history/; 1253ddd58736SKris Kennaway s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=$shlib_major/; 1254ddd58736SKris Kennaway s/^SHLIB_MINOR=.*/SHLIB_MINOR=$shlib_minor/; 12555740a5e3SKris Kennaway s/^SHLIB_EXT=.*/SHLIB_EXT=$shared_extension/; 125674664626SKris Kennaway s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/; 125774664626SKris Kennaway s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/; 125874664626SKris Kennaway s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/; 125974664626SKris Kennaway s/^PLATFORM=.*$/PLATFORM=$target/; 126074664626SKris Kennaway s/^OPTIONS=.*$/OPTIONS=$options/; 1261ddd58736SKris Kennaway s/^CONFIGURE_ARGS=.*$/CONFIGURE_ARGS=$argvstring/; 126274664626SKris Kennaway s/^CC=.*$/CC= $cc/; 12635c87c606SMark Murray s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; 126474664626SKris Kennaway s/^CFLAG=.*$/CFLAG= $cflags/; 126574664626SKris Kennaway s/^DEPFLAG=.*$/DEPFLAG= $depflags/; 126674664626SKris Kennaway s/^EX_LIBS=.*$/EX_LIBS= $lflags/; 12675740a5e3SKris Kennaway s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/; 126874664626SKris Kennaway s/^BN_ASM=.*$/BN_ASM= $bn_obj/; 126974664626SKris Kennaway s/^DES_ENC=.*$/DES_ENC= $des_obj/; 12706be8ae07SJacques Vidrine s/^FIPS_DES_ENC=.*$/FIPS_DES_ENC= $fips_des_obj/; 127174664626SKris Kennaway s/^BF_ENC=.*$/BF_ENC= $bf_obj/; 127274664626SKris Kennaway s/^CAST_ENC=.*$/CAST_ENC= $cast_obj/; 127374664626SKris Kennaway s/^RC4_ENC=.*$/RC4_ENC= $rc4_obj/; 127474664626SKris Kennaway s/^RC5_ENC=.*$/RC5_ENC= $rc5_obj/; 127574664626SKris Kennaway s/^MD5_ASM_OBJ=.*$/MD5_ASM_OBJ= $md5_obj/; 127674664626SKris Kennaway s/^SHA1_ASM_OBJ=.*$/SHA1_ASM_OBJ= $sha1_obj/; 12776be8ae07SJacques Vidrine s/^FIPS_SHA1_ASM_OBJ=.*$/FIPS_SHA1_ASM_OBJ= $fips_sha1_obj/; 127874664626SKris Kennaway s/^RMD160_ASM_OBJ=.*$/RMD160_ASM_OBJ= $rmd160_obj/; 127974664626SKris Kennaway s/^PROCESSOR=.*/PROCESSOR= $processor/; 128074664626SKris Kennaway s/^RANLIB=.*/RANLIB= $ranlib/; 12815c87c606SMark Murray s/^ARFLAGS=.*/ARFLAGS= $arflags/; 128274664626SKris Kennaway s/^PERL=.*/PERL= $perl/; 12835c87c606SMark Murray s/^KRB5_INCLUDES=.*/KRB5_INCLUDES=$withargs{"krb5-include"}/; 1284fceca8a3SJacques Vidrine s/^LIBKRB5=.*/LIBKRB5=$withargs{"krb5-lib"}/; 1285ddd58736SKris Kennaway s/^SHLIB_TARGET=.*/SHLIB_TARGET=$shared_target/; 12865740a5e3SKris Kennaway s/^SHLIB_MARK=.*/SHLIB_MARK=$shared_mark/; 12875740a5e3SKris Kennaway s/^SHARED_LIBS=.*/SHARED_LIBS=\$(SHARED_CRYPTO) \$(SHARED_SSL)/ if (!$no_shared); 1288a21b1b38SKris Kennaway if ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*$/) 1289a21b1b38SKris Kennaway { 1290a21b1b38SKris Kennaway my $sotmp = $1; 12914f20a5a2SJacques Vidrine s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/; 12924f20a5a2SJacques Vidrine } 12934f20a5a2SJacques Vidrine elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.dylib$/) 12944f20a5a2SJacques Vidrine { 12954f20a5a2SJacques Vidrine s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.dylib/; 1296a21b1b38SKris Kennaway } 1297a21b1b38SKris Kennaway elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/) 1298a21b1b38SKris Kennaway { 1299a21b1b38SKris Kennaway my $sotmp = $1; 1300a21b1b38SKris Kennaway s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/; 1301a21b1b38SKris Kennaway } 13024f20a5a2SJacques Vidrine elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/) 13034f20a5a2SJacques Vidrine { 13044f20a5a2SJacques Vidrine s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.\$(SHLIB_MAJOR).dylib .dylib/; 13054f20a5a2SJacques Vidrine } 1306c1803d78SJacques Vidrine s/^SHARED_LDFLAGS=.*/SHARED_LDFLAGS=$shared_ldflag/; 130774664626SKris Kennaway print OUT $_."\n"; 130874664626SKris Kennaway } 130974664626SKris Kennawayclose(IN); 131074664626SKris Kennawayclose(OUT); 13115c87c606SMark Murrayrename($Makefile,"$Makefile.bak") || die "unable to rename $Makefile\n" if -e $Makefile; 13125c87c606SMark Murrayrename("$Makefile.new",$Makefile) || die "unable to rename $Makefile.new\n"; 131374664626SKris Kennaway 131474664626SKris Kennawayprint "CC =$cc\n"; 131574664626SKris Kennawayprint "CFLAG =$cflags\n"; 131674664626SKris Kennawayprint "EX_LIBS =$lflags\n"; 131774664626SKris Kennawayprint "BN_ASM =$bn_obj\n"; 131874664626SKris Kennawayprint "DES_ENC =$des_obj\n"; 131974664626SKris Kennawayprint "BF_ENC =$bf_obj\n"; 132074664626SKris Kennawayprint "CAST_ENC =$cast_obj\n"; 132174664626SKris Kennawayprint "RC4_ENC =$rc4_obj\n"; 132274664626SKris Kennawayprint "RC5_ENC =$rc5_obj\n"; 132374664626SKris Kennawayprint "MD5_OBJ_ASM =$md5_obj\n"; 132474664626SKris Kennawayprint "SHA1_OBJ_ASM =$sha1_obj\n"; 132574664626SKris Kennawayprint "RMD160_OBJ_ASM=$rmd160_obj\n"; 132674664626SKris Kennawayprint "PROCESSOR =$processor\n"; 132774664626SKris Kennawayprint "RANLIB =$ranlib\n"; 13285c87c606SMark Murrayprint "ARFLAGS =$arflags\n"; 132974664626SKris Kennawayprint "PERL =$perl\n"; 13305c87c606SMark Murrayprint "KRB5_INCLUDES =",$withargs{"krb5-include"},"\n" 13315c87c606SMark Murray if $withargs{"krb5-include"} ne ""; 133274664626SKris Kennaway 133374664626SKris Kennawaymy $des_ptr=0; 133474664626SKris Kennawaymy $des_risc1=0; 133574664626SKris Kennawaymy $des_risc2=0; 133674664626SKris Kennawaymy $des_unroll=0; 133774664626SKris Kennawaymy $bn_ll=0; 133874664626SKris Kennawaymy $def_int=2; 133974664626SKris Kennawaymy $rc4_int=$def_int; 134074664626SKris Kennawaymy $md2_int=$def_int; 134174664626SKris Kennawaymy $idea_int=$def_int; 134274664626SKris Kennawaymy $rc2_int=$def_int; 134374664626SKris Kennawaymy $rc4_idx=0; 1344f579bf8eSKris Kennawaymy $rc4_chunk=0; 134574664626SKris Kennawaymy $bf_ptr=0; 134674664626SKris Kennawaymy @type=("char","short","int","long"); 134774664626SKris Kennawaymy ($b64l,$b64,$b32,$b16,$b8)=(0,0,1,0,0); 13485c87c606SMark Murraymy $export_var_as_fn=0; 134974664626SKris Kennaway 135074664626SKris Kennawaymy $des_int; 135174664626SKris Kennaway 135274664626SKris Kennawayforeach (sort split(/\s+/,$bn_ops)) 135374664626SKris Kennaway { 135474664626SKris Kennaway $des_ptr=1 if /DES_PTR/; 135574664626SKris Kennaway $des_risc1=1 if /DES_RISC1/; 135674664626SKris Kennaway $des_risc2=1 if /DES_RISC2/; 135774664626SKris Kennaway $des_unroll=1 if /DES_UNROLL/; 135874664626SKris Kennaway $des_int=1 if /DES_INT/; 135974664626SKris Kennaway $bn_ll=1 if /BN_LLONG/; 136074664626SKris Kennaway $rc4_int=0 if /RC4_CHAR/; 136174664626SKris Kennaway $rc4_int=3 if /RC4_LONG/; 136274664626SKris Kennaway $rc4_idx=1 if /RC4_INDEX/; 1363f579bf8eSKris Kennaway $rc4_chunk=1 if /RC4_CHUNK/; 1364f579bf8eSKris Kennaway $rc4_chunk=2 if /RC4_CHUNK_LL/; 136574664626SKris Kennaway $md2_int=0 if /MD2_CHAR/; 136674664626SKris Kennaway $md2_int=3 if /MD2_LONG/; 136774664626SKris Kennaway $idea_int=1 if /IDEA_SHORT/; 136874664626SKris Kennaway $idea_int=3 if /IDEA_LONG/; 136974664626SKris Kennaway $rc2_int=1 if /RC2_SHORT/; 137074664626SKris Kennaway $rc2_int=3 if /RC2_LONG/; 137174664626SKris Kennaway $bf_ptr=1 if $_ eq "BF_PTR"; 137274664626SKris Kennaway $bf_ptr=2 if $_ eq "BF_PTR2"; 137374664626SKris Kennaway ($b64l,$b64,$b32,$b16,$b8)=(0,1,0,0,0) if /SIXTY_FOUR_BIT/; 137474664626SKris Kennaway ($b64l,$b64,$b32,$b16,$b8)=(1,0,0,0,0) if /SIXTY_FOUR_BIT_LONG/; 137574664626SKris Kennaway ($b64l,$b64,$b32,$b16,$b8)=(0,0,1,0,0) if /THIRTY_TWO_BIT/; 137674664626SKris Kennaway ($b64l,$b64,$b32,$b16,$b8)=(0,0,0,1,0) if /SIXTEEN_BIT/; 137774664626SKris Kennaway ($b64l,$b64,$b32,$b16,$b8)=(0,0,0,0,1) if /EIGHT_BIT/; 13785c87c606SMark Murray $export_var_as_fn=1 if /EXPORT_VAR_AS_FN/; 137974664626SKris Kennaway } 138074664626SKris Kennaway 138174664626SKris Kennawayopen(IN,'<crypto/opensslconf.h.in') || die "unable to read crypto/opensslconf.h.in:$!\n"; 13825c87c606SMark Murrayunlink("crypto/opensslconf.h.new") || die "unable to remove old crypto/opensslconf.h.new:$!\n" if -e "crypto/opensslconf.h.new"; 13835c87c606SMark Murrayopen(OUT,'>crypto/opensslconf.h.new') || die "unable to create crypto/opensslconf.h.new:$!\n"; 1384f579bf8eSKris Kennawayprint OUT "/* opensslconf.h */\n"; 1385f579bf8eSKris Kennawayprint OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n"; 1386f579bf8eSKris Kennaway 1387f579bf8eSKris Kennawayprint OUT "/* OpenSSL was configured with the following options: */\n"; 13885c87c606SMark Murraymy $openssl_algorithm_defines_trans = $openssl_algorithm_defines; 13895c87c606SMark Murray$openssl_algorithm_defines_trans =~ s/^\s*#\s*define\s+OPENSSL_(.*)/# if defined(OPENSSL_$1) \&\& !defined($1)\n# define $1\n# endif/mg; 1390f579bf8eSKris Kennaway$openssl_algorithm_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg; 1391f579bf8eSKris Kennaway$openssl_algorithm_defines = " /* no ciphers excluded */\n" if $openssl_algorithm_defines eq ""; 1392f579bf8eSKris Kennaway$openssl_thread_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg; 13935c87c606SMark Murray$openssl_sys_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg; 1394f579bf8eSKris Kennaway$openssl_other_defines =~ s/^\s*#\s*define\s+(.*)/#ifndef $1\n# define $1\n#endif/mg; 13955c87c606SMark Murrayprint OUT $openssl_sys_defines; 13965c87c606SMark Murrayprint OUT "#ifndef OPENSSL_DOING_MAKEDEPEND\n\n"; 13975c87c606SMark Murrayprint OUT $openssl_algorithm_defines; 13985c87c606SMark Murrayprint OUT "\n#endif /* OPENSSL_DOING_MAKEDEPEND */\n"; 13995c87c606SMark Murrayprint OUT $openssl_thread_defines; 14005c87c606SMark Murrayprint OUT $openssl_other_defines,"\n"; 14015c87c606SMark Murray 14025c87c606SMark Murrayprint OUT "/* The OPENSSL_NO_* macros are also defined as NO_* if the application\n"; 14035c87c606SMark Murrayprint OUT " asks for it. This is a transient feature that is provided for those\n"; 14045c87c606SMark Murrayprint OUT " who haven't had the time to do the appropriate changes in their\n"; 14055c87c606SMark Murrayprint OUT " applications. */\n"; 14065c87c606SMark Murrayprint OUT "#ifdef OPENSSL_ALGORITHM_DEFINES\n"; 14075c87c606SMark Murrayprint OUT $openssl_algorithm_defines_trans; 14085c87c606SMark Murrayprint OUT "#endif\n\n"; 1409f579bf8eSKris Kennaway 141074664626SKris Kennawaywhile (<IN>) 141174664626SKris Kennaway { 141274664626SKris Kennaway if (/^#define\s+OPENSSLDIR/) 141374664626SKris Kennaway { print OUT "#define OPENSSLDIR \"$openssldir\"\n"; } 14145c87c606SMark Murray elsif (/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/) 14155c87c606SMark Murray { printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n" 14165c87c606SMark Murray if $export_var_as_fn; 14175c87c606SMark Murray printf OUT "#%s OPENSSL_EXPORT_VAR_AS_FUNCTION\n", 14185c87c606SMark Murray ($export_var_as_fn)?"define":"undef"; } 141974664626SKris Kennaway elsif (/^#define\s+OPENSSL_UNISTD/) 142074664626SKris Kennaway { 142174664626SKris Kennaway $unistd = "<unistd.h>" if $unistd eq ""; 142274664626SKris Kennaway print OUT "#define OPENSSL_UNISTD $unistd\n"; 142374664626SKris Kennaway } 142474664626SKris Kennaway elsif (/^#((define)|(undef))\s+SIXTY_FOUR_BIT_LONG/) 142574664626SKris Kennaway { printf OUT "#%s SIXTY_FOUR_BIT_LONG\n",($b64l)?"define":"undef"; } 142674664626SKris Kennaway elsif (/^#((define)|(undef))\s+SIXTY_FOUR_BIT/) 142774664626SKris Kennaway { printf OUT "#%s SIXTY_FOUR_BIT\n",($b64)?"define":"undef"; } 142874664626SKris Kennaway elsif (/^#((define)|(undef))\s+THIRTY_TWO_BIT/) 142974664626SKris Kennaway { printf OUT "#%s THIRTY_TWO_BIT\n",($b32)?"define":"undef"; } 143074664626SKris Kennaway elsif (/^#((define)|(undef))\s+SIXTEEN_BIT/) 143174664626SKris Kennaway { printf OUT "#%s SIXTEEN_BIT\n",($b16)?"define":"undef"; } 143274664626SKris Kennaway elsif (/^#((define)|(undef))\s+EIGHT_BIT/) 143374664626SKris Kennaway { printf OUT "#%s EIGHT_BIT\n",($b8)?"define":"undef"; } 143474664626SKris Kennaway elsif (/^#((define)|(undef))\s+BN_LLONG\s*$/) 143574664626SKris Kennaway { printf OUT "#%s BN_LLONG\n",($bn_ll)?"define":"undef"; } 143674664626SKris Kennaway elsif (/^\#define\s+DES_LONG\s+.*/) 143774664626SKris Kennaway { printf OUT "#define DES_LONG unsigned %s\n", 143874664626SKris Kennaway ($des_int)?'int':'long'; } 143974664626SKris Kennaway elsif (/^\#(define|undef)\s+DES_PTR/) 144074664626SKris Kennaway { printf OUT "#%s DES_PTR\n",($des_ptr)?'define':'undef'; } 144174664626SKris Kennaway elsif (/^\#(define|undef)\s+DES_RISC1/) 144274664626SKris Kennaway { printf OUT "#%s DES_RISC1\n",($des_risc1)?'define':'undef'; } 144374664626SKris Kennaway elsif (/^\#(define|undef)\s+DES_RISC2/) 144474664626SKris Kennaway { printf OUT "#%s DES_RISC2\n",($des_risc2)?'define':'undef'; } 144574664626SKris Kennaway elsif (/^\#(define|undef)\s+DES_UNROLL/) 144674664626SKris Kennaway { printf OUT "#%s DES_UNROLL\n",($des_unroll)?'define':'undef'; } 144774664626SKris Kennaway elsif (/^#define\s+RC4_INT\s/) 144874664626SKris Kennaway { printf OUT "#define RC4_INT unsigned %s\n",$type[$rc4_int]; } 1449f579bf8eSKris Kennaway elsif (/^#undef\s+RC4_CHUNK/) 1450f579bf8eSKris Kennaway { 1451f579bf8eSKris Kennaway printf OUT "#undef RC4_CHUNK\n" if $rc4_chunk==0; 1452f579bf8eSKris Kennaway printf OUT "#define RC4_CHUNK unsigned long\n" if $rc4_chunk==1; 1453f579bf8eSKris Kennaway printf OUT "#define RC4_CHUNK unsigned long long\n" if $rc4_chunk==2; 1454f579bf8eSKris Kennaway } 145574664626SKris Kennaway elsif (/^#((define)|(undef))\s+RC4_INDEX/) 145674664626SKris Kennaway { printf OUT "#%s RC4_INDEX\n",($rc4_idx)?"define":"undef"; } 145774664626SKris Kennaway elsif (/^#(define|undef)\s+I386_ONLY/) 145874664626SKris Kennaway { printf OUT "#%s I386_ONLY\n", ($processor == 386)? 145974664626SKris Kennaway "define":"undef"; } 146074664626SKris Kennaway elsif (/^#define\s+MD2_INT\s/) 146174664626SKris Kennaway { printf OUT "#define MD2_INT unsigned %s\n",$type[$md2_int]; } 146274664626SKris Kennaway elsif (/^#define\s+IDEA_INT\s/) 146374664626SKris Kennaway {printf OUT "#define IDEA_INT unsigned %s\n",$type[$idea_int];} 146474664626SKris Kennaway elsif (/^#define\s+RC2_INT\s/) 146574664626SKris Kennaway {printf OUT "#define RC2_INT unsigned %s\n",$type[$rc2_int];} 146674664626SKris Kennaway elsif (/^#(define|undef)\s+BF_PTR/) 146774664626SKris Kennaway { 146874664626SKris Kennaway printf OUT "#undef BF_PTR\n" if $bf_ptr == 0; 146974664626SKris Kennaway printf OUT "#define BF_PTR\n" if $bf_ptr == 1; 147074664626SKris Kennaway printf OUT "#define BF_PTR2\n" if $bf_ptr == 2; 147174664626SKris Kennaway } 147274664626SKris Kennaway else 147374664626SKris Kennaway { print OUT $_; } 147474664626SKris Kennaway } 147574664626SKris Kennawayclose(IN); 147674664626SKris Kennawayclose(OUT); 14775c87c606SMark Murrayrename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h"; 14785c87c606SMark Murrayrename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n"; 147974664626SKris Kennaway 148074664626SKris Kennaway 148174664626SKris Kennaway# Fix the date 148274664626SKris Kennaway 148374664626SKris Kennawayprint "SIXTY_FOUR_BIT_LONG mode\n" if $b64l; 148474664626SKris Kennawayprint "SIXTY_FOUR_BIT mode\n" if $b64; 148574664626SKris Kennawayprint "THIRTY_TWO_BIT mode\n" if $b32; 148674664626SKris Kennawayprint "SIXTEEN_BIT mode\n" if $b16; 148774664626SKris Kennawayprint "EIGHT_BIT mode\n" if $b8; 148874664626SKris Kennawayprint "DES_PTR used\n" if $des_ptr; 148974664626SKris Kennawayprint "DES_RISC1 used\n" if $des_risc1; 149074664626SKris Kennawayprint "DES_RISC2 used\n" if $des_risc2; 149174664626SKris Kennawayprint "DES_UNROLL used\n" if $des_unroll; 149274664626SKris Kennawayprint "DES_INT used\n" if $des_int; 149374664626SKris Kennawayprint "BN_LLONG mode\n" if $bn_ll; 149474664626SKris Kennawayprint "RC4 uses u$type[$rc4_int]\n" if $rc4_int != $def_int; 149574664626SKris Kennawayprint "RC4_INDEX mode\n" if $rc4_idx; 1496f579bf8eSKris Kennawayprint "RC4_CHUNK is undefined\n" if $rc4_chunk==0; 1497f579bf8eSKris Kennawayprint "RC4_CHUNK is unsigned long\n" if $rc4_chunk==1; 1498f579bf8eSKris Kennawayprint "RC4_CHUNK is unsigned long long\n" if $rc4_chunk==2; 149974664626SKris Kennawayprint "MD2 uses u$type[$md2_int]\n" if $md2_int != $def_int; 150074664626SKris Kennawayprint "IDEA uses u$type[$idea_int]\n" if $idea_int != $def_int; 150174664626SKris Kennawayprint "RC2 uses u$type[$rc2_int]\n" if $rc2_int != $def_int; 150274664626SKris Kennawayprint "BF_PTR used\n" if $bf_ptr == 1; 150374664626SKris Kennawayprint "BF_PTR2 used\n" if $bf_ptr == 2; 150474664626SKris Kennaway 150574664626SKris Kennawayif($IsWindows) { 150674664626SKris Kennaway open (OUT,">crypto/buildinf.h") || die "Can't open buildinf.h"; 150774664626SKris Kennaway printf OUT <<EOF; 150874664626SKris Kennaway#ifndef MK1MF_BUILD 150974664626SKris Kennaway /* auto-generated by Configure for crypto/cversion.c: 15106be8ae07SJacques Vidrine * for Unix builds, crypto/Makefile generates functional definitions; 151174664626SKris Kennaway * Windows builds (and other mk1mf builds) compile cversion.c with 151274664626SKris Kennaway * -DMK1MF_BUILD and use definitions added to this file by util/mk1mf.pl. */ 151374664626SKris Kennaway #error "Windows builds (PLATFORM=$target) use mk1mf.pl-created Makefiles" 151474664626SKris Kennaway#endif 151574664626SKris KennawayEOF 151674664626SKris Kennaway close(OUT); 151774664626SKris Kennaway} else { 15186be8ae07SJacques Vidrine my $make_command = "make PERL=\'$perl\'"; 15195c87c606SMark Murray my $make_targets = ""; 15205c87c606SMark Murray $make_targets .= " links" if $symlink; 15215c87c606SMark Murray $make_targets .= " depend" if $depflags ne "" && $make_depend; 15225c87c606SMark Murray $make_targets .= " gentests" if $symlink; 15235c87c606SMark Murray (system $make_command.$make_targets) == 0 or exit $? 15245c87c606SMark Murray if $make_targets ne ""; 152574664626SKris Kennaway if ( $perl =~ m@^/@) { 1526ddd58736SKris Kennaway &dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";'); 152774664626SKris Kennaway &dofile("apps/der_chop",$perl,'^#!/', '#!%s'); 1528f579bf8eSKris Kennaway &dofile("apps/CA.pl",$perl,'^#!/', '#!%s'); 152974664626SKris Kennaway } else { 153074664626SKris Kennaway # No path for Perl known ... 1531ddd58736SKris Kennaway &dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";'); 153274664626SKris Kennaway &dofile("apps/der_chop",'/usr/local/bin/perl','^#!/', '#!%s'); 1533f579bf8eSKris Kennaway &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s'); 153474664626SKris Kennaway } 15355c87c606SMark Murray if ($depflags ne "" && !$make_depend) { 15365c87c606SMark Murray print <<EOF; 15375c87c606SMark Murray 15385c87c606SMark MurraySince you've disabled at least one algorithm, you need to do the following 15395c87c606SMark Murraybefore building: 15405c87c606SMark Murray 15415c87c606SMark Murray make depend 15425c87c606SMark MurrayEOF 15435c87c606SMark Murray } 154474664626SKris Kennaway} 154574664626SKris Kennaway 154674664626SKris Kennawayprint <<EOF; 154774664626SKris Kennaway 1548f579bf8eSKris KennawayConfigured for $target. 154974664626SKris KennawayEOF 155074664626SKris Kennaway 155174664626SKris Kennawayprint <<\EOF if (!$no_threads && !$threads); 155274664626SKris Kennaway 155374664626SKris KennawayThe library could not be configured for supporting multi-threaded 155474664626SKris Kennawayapplications as the compiler options required on this system are not known. 155574664626SKris KennawaySee file INSTALL for details if you need multi-threading. 155674664626SKris KennawayEOF 155774664626SKris Kennaway 1558fceca8a3SJacques Vidrineprint <<\EOF if ($no_shared_warn); 1559fceca8a3SJacques Vidrine 1560fceca8a3SJacques VidrineYou gave the option 'shared'. Normally, that would give you shared libraries. 1561fceca8a3SJacques VidrineUnfortunately, the OpenSSL configuration doesn't include shared library support 1562fceca8a3SJacques Vidrinefor this platform yet, so it will pretend you gave the option 'no-shared'. If 1563fceca8a3SJacques Vidrineyou can inform the developpers (openssl-dev\@openssl.org) how to support shared 1564fceca8a3SJacques Vidrinelibraries on this platform, they will at least look at it and try their best 1565fceca8a3SJacques Vidrine(but please first make sure you have tried with a current version of OpenSSL). 1566fceca8a3SJacques VidrineEOF 1567fceca8a3SJacques Vidrine 156874664626SKris Kennawayexit(0); 156974664626SKris Kennaway 157074664626SKris Kennawaysub usage 157174664626SKris Kennaway { 157274664626SKris Kennaway print STDERR $usage; 1573f579bf8eSKris Kennaway print STDERR "\npick os/compiler from:\n"; 157474664626SKris Kennaway my $j=0; 157574664626SKris Kennaway my $i; 1576f579bf8eSKris Kennaway my $k=0; 157774664626SKris Kennaway foreach $i (sort keys %table) 157874664626SKris Kennaway { 157974664626SKris Kennaway next if $i =~ /^debug/; 1580f579bf8eSKris Kennaway $k += length($i) + 1; 1581f579bf8eSKris Kennaway if ($k > 78) 1582f579bf8eSKris Kennaway { 1583f579bf8eSKris Kennaway print STDERR "\n"; 1584f579bf8eSKris Kennaway $k=length($i); 1585f579bf8eSKris Kennaway } 1586f579bf8eSKris Kennaway print STDERR $i . " "; 158774664626SKris Kennaway } 158874664626SKris Kennaway foreach $i (sort keys %table) 158974664626SKris Kennaway { 159074664626SKris Kennaway next if $i !~ /^debug/; 1591f579bf8eSKris Kennaway $k += length($i) + 1; 1592f579bf8eSKris Kennaway if ($k > 78) 1593f579bf8eSKris Kennaway { 159474664626SKris Kennaway print STDERR "\n"; 1595f579bf8eSKris Kennaway $k=length($i); 1596f579bf8eSKris Kennaway } 1597f579bf8eSKris Kennaway print STDERR $i . " "; 1598f579bf8eSKris Kennaway } 1599f579bf8eSKris Kennaway print STDERR "\n\nNOTE: If in doubt, on Unix-ish systems use './config'.\n"; 160074664626SKris Kennaway exit(1); 160174664626SKris Kennaway } 160274664626SKris Kennaway 160374664626SKris Kennawaysub which 160474664626SKris Kennaway { 160574664626SKris Kennaway my($name)=@_; 160674664626SKris Kennaway my $path; 160774664626SKris Kennaway foreach $path (split /:/, $ENV{PATH}) 160874664626SKris Kennaway { 16096be8ae07SJacques Vidrine if (-f "$path/$name$exe_ext" and -x _) 161074664626SKris Kennaway { 16116be8ae07SJacques Vidrine return "$path/$name$exe_ext" unless ($name eq "perl" and 16126be8ae07SJacques Vidrine system("$path/$name$exe_ext -e " . '\'exit($]<5.0);\'')); 161374664626SKris Kennaway } 161474664626SKris Kennaway } 161574664626SKris Kennaway } 161674664626SKris Kennaway 161774664626SKris Kennawaysub dofile 161874664626SKris Kennaway { 161974664626SKris Kennaway my $f; my $p; my %m; my @a; my $k; my $ff; 162074664626SKris Kennaway ($f,$p,%m)=@_; 162174664626SKris Kennaway 162274664626SKris Kennaway open(IN,"<$f.in") || open(IN,"<$f") || die "unable to open $f:$!\n"; 162374664626SKris Kennaway @a=<IN>; 162474664626SKris Kennaway close(IN); 162574664626SKris Kennaway foreach $k (keys %m) 162674664626SKris Kennaway { 162774664626SKris Kennaway grep(/$k/ && ($_=sprintf($m{$k}."\n",$p)),@a); 162874664626SKris Kennaway } 1629f579bf8eSKris Kennaway open(OUT,">$f.new") || die "unable to open $f.new:$!\n"; 163074664626SKris Kennaway print OUT @a; 163174664626SKris Kennaway close(OUT); 1632f579bf8eSKris Kennaway rename($f,"$f.bak") || die "unable to rename $f\n" if -e $f; 1633f579bf8eSKris Kennaway rename("$f.new",$f) || die "unable to rename $f.new\n"; 163474664626SKris Kennaway } 163574664626SKris Kennaway 163674664626SKris Kennawaysub print_table_entry 163774664626SKris Kennaway { 163874664626SKris Kennaway my $target = shift; 163974664626SKris Kennaway 16405c87c606SMark Murray (my $cc,my $cflags,my $unistd,my $thread_cflag,my $sys_id,my $lflags, 16415c87c606SMark Murray my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj, 1642ddd58736SKris Kennaway my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj, 16435740a5e3SKris Kennaway my $rc5_obj,my $dso_scheme,my $shared_target,my $shared_cflag, 16445c87c606SMark Murray my $shared_ldflag,my $shared_extension,my $ranlib,my $arflags)= 16455740a5e3SKris Kennaway split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); 164674664626SKris Kennaway 164774664626SKris Kennaway print <<EOF 164874664626SKris Kennaway 164974664626SKris Kennaway*** $target 165074664626SKris Kennaway\$cc = $cc 165174664626SKris Kennaway\$cflags = $cflags 165274664626SKris Kennaway\$unistd = $unistd 165374664626SKris Kennaway\$thread_cflag = $thread_cflag 16545c87c606SMark Murray\$sys_id = $sys_id 165574664626SKris Kennaway\$lflags = $lflags 165674664626SKris Kennaway\$bn_ops = $bn_ops 165774664626SKris Kennaway\$bn_obj = $bn_obj 165874664626SKris Kennaway\$des_obj = $des_obj 165974664626SKris Kennaway\$bf_obj = $bf_obj 166074664626SKris Kennaway\$md5_obj = $md5_obj 166174664626SKris Kennaway\$sha1_obj = $sha1_obj 166274664626SKris Kennaway\$cast_obj = $cast_obj 166374664626SKris Kennaway\$rc4_obj = $rc4_obj 166474664626SKris Kennaway\$rmd160_obj = $rmd160_obj 166574664626SKris Kennaway\$rc5_obj = $rc5_obj 1666ddd58736SKris Kennaway\$dso_scheme = $dso_scheme 1667ddd58736SKris Kennaway\$shared_target= $shared_target 1668ddd58736SKris Kennaway\$shared_cflag = $shared_cflag 1669c1803d78SJacques Vidrine\$shared_ldflag = $shared_ldflag 16705740a5e3SKris Kennaway\$shared_extension = $shared_extension 16715740a5e3SKris Kennaway\$ranlib = $ranlib 16725c87c606SMark Murray\$arflags = $arflags 167374664626SKris KennawayEOF 167474664626SKris Kennaway } 1675c1803d78SJacques Vidrine 1676c1803d78SJacques Vidrinesub test_sanity 1677c1803d78SJacques Vidrine { 1678c1803d78SJacques Vidrine my $errorcnt = 0; 1679c1803d78SJacques Vidrine 1680c1803d78SJacques Vidrine print STDERR "=" x 70, "\n"; 1681c1803d78SJacques Vidrine print STDERR "=== SANITY TESTING!\n"; 1682c1803d78SJacques Vidrine print STDERR "=== No configuration will be done, all other arguments will be ignored!\n"; 1683c1803d78SJacques Vidrine print STDERR "=" x 70, "\n"; 1684c1803d78SJacques Vidrine 1685c1803d78SJacques Vidrine foreach $target (sort keys %table) 1686c1803d78SJacques Vidrine { 1687c1803d78SJacques Vidrine @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); 1688c1803d78SJacques Vidrine 1689c1803d78SJacques Vidrine if ($fields[$idx_dso_scheme-1] =~ /^(dl|dlfcn|win32|vms)$/) 1690c1803d78SJacques Vidrine { 1691c1803d78SJacques Vidrine $errorcnt++; 1692c1803d78SJacques Vidrine print STDERR "SANITY ERROR: '$target' has the dso_scheme [$idx_dso_scheme] values\n"; 1693c1803d78SJacques Vidrine print STDERR " in the previous field\n"; 1694c1803d78SJacques Vidrine } 1695c1803d78SJacques Vidrine elsif ($fields[$idx_dso_scheme+1] =~ /^(dl|dlfcn|win32|vms)$/) 1696c1803d78SJacques Vidrine { 1697c1803d78SJacques Vidrine $errorcnt++; 1698c1803d78SJacques Vidrine print STDERR "SANITY ERROR: '$target' has the dso_scheme [$idx_dso_scheme] values\n"; 1699c1803d78SJacques Vidrine print STDERR " in the following field\n"; 1700c1803d78SJacques Vidrine } 1701c1803d78SJacques Vidrine elsif ($fields[$idx_dso_scheme] !~ /^(dl|dlfcn|win32|vms|)$/) 1702c1803d78SJacques Vidrine { 1703c1803d78SJacques Vidrine $errorcnt++; 1704c1803d78SJacques Vidrine print STDERR "SANITY ERROR: '$target' has the dso_scheme [$idx_dso_scheme] field = ",$fields[$idx_dso_scheme],"\n"; 1705c1803d78SJacques Vidrine print STDERR " valid values are 'dl', 'dlfcn', 'win32' and 'vms'\n"; 1706c1803d78SJacques Vidrine } 1707c1803d78SJacques Vidrine } 1708c1803d78SJacques Vidrine print STDERR "No sanity errors detected!\n" if $errorcnt == 0; 1709c1803d78SJacques Vidrine return $errorcnt; 1710c1803d78SJacques Vidrine } 1711