summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-04-04 15:51:36 +0000
committerRichard Levitte <levitte@openssl.org>2001-04-04 15:51:36 +0000
commit75c3c831db58232769f727d76e0504ce138f2dfc (patch)
tree63c27e035a1eee89418ddff0611f9885277701fe
parent385af2e9ec87b4534c88fa7fb0080c592ca43d6d (diff)
Incorporate some changes that make OpenSSL compilable in CygWin.
-rw-r--r--CHANGES7
-rwxr-xr-xConfigure3
-rw-r--r--Makefile.org7
-rw-r--r--apps/Makefile.ssl5
-rw-r--r--tools/c_rehash.in14
-rwxr-xr-xutil/mklink.pl7
6 files changed, 35 insertions, 8 deletions
diff --git a/CHANGES b/CHANGES
index a18a1bfff0..533aa4b47f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,13 @@
Changes between 0.9.6 and 0.9.6a [xx XXX 2001]
+ *) Change Configure and Makefiles to provide EXE_EXT, which will contain
+ the default extension for executables, if any. Also, make the perl
+ scripts that use symlink() to test if it really exists and use "cp"
+ if it doesn't. All this made OpenSSL compilable and installable in
+ CygWin.
+ [Richard Levitte]
+
*) Fix for asn1_GetSequence() for indefinite length constructed data.
If SEQUENCE is length is indefinite just set c->slen to the total
amount of data available.
diff --git a/Configure b/Configure
index c6866f3cec..541336bbd3 100755
--- a/Configure
+++ b/Configure
@@ -432,6 +432,7 @@ my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
my $prefix="";
my $openssldir="";
+my $exe_ext="";
my $install_prefix="";
my $no_threads=0;
my $no_shared=1;
@@ -636,6 +637,7 @@ print "Configuring for $target\n";
my $IsWindows=scalar grep /^$target$/,@WinTargets;
+$exe_ext=".exe" if ($target eq "CygWin32");
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
$prefix=$openssldir if $prefix eq "";
@@ -838,6 +840,7 @@ while (<IN>)
s/^CFLAG=.*$/CFLAG= $cflags/;
s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
s/^EX_LIBS=.*$/EX_LIBS= $lflags/;
+ s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
s/^DES_ENC=.*$/DES_ENC= $des_obj/;
s/^BF_ENC=.*$/BF_ENC= $bf_obj/;
diff --git a/Makefile.org b/Makefile.org
index 5015159369..0d685c1906 100644
--- a/Makefile.org
+++ b/Makefile.org
@@ -59,6 +59,7 @@ CFLAG= -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall -DSHA1_ASM -DMD
DEPFLAG=
PEX_LIBS=
EX_LIBS=
+EXE_EXT=
AR=ar r
RANLIB= ranlib
PERL= perl
@@ -201,7 +202,7 @@ sub_all:
do \
if [ -d "$$i" ]; then \
(cd $$i && echo "making all in $$i..." && \
- $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
+ $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' all ) || exit 1; \
else \
$(MAKE) $$i; \
fi; \
@@ -349,7 +350,7 @@ test: tests
tests: rehash
@(cd test && echo "testing..." && \
- $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' tests );
+ $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' EXE_EXT='${EXE_EXT}' tests );
@apps/openssl version -a
report:
@@ -440,7 +441,7 @@ install: all install_docs
do \
if [ -d "$$i" ]; then \
(cd $$i; echo "installing $$i..."; \
- $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' install ); \
+ $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \
fi; \
done
@for i in $(LIBS) ;\
diff --git a/apps/Makefile.ssl b/apps/Makefile.ssl
index 94430b3fa5..d3f9ab0f72 100644
--- a/apps/Makefile.ssl
+++ b/apps/Makefile.ssl
@@ -18,6 +18,7 @@ RM= rm -f
PEX_LIBS=
EX_LIBS=
+EXE_EXT=
CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG)
@@ -32,7 +33,7 @@ PROGRAM= openssl
SCRIPTS=CA.sh CA.pl der_chop
-EXE= $(PROGRAM)
+EXE= $(PROGRAM)$(EXE_EXT)
E_EXE= verify asn1pars req dgst dh dhparam enc passwd gendh errstr \
ca crl rsa rsautl dsa dsaparam \
@@ -77,7 +78,7 @@ top:
all: exe
-exe: $(EXE)
+exe: $(PROGRAM)
req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
$(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(RAND_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
diff --git a/tools/c_rehash.in b/tools/c_rehash.in
index baec7c14ff..26db8999d8 100644
--- a/tools/c_rehash.in
+++ b/tools/c_rehash.in
@@ -117,7 +117,12 @@ sub link_hash_cert {
}
$hash .= ".$suffix";
print "$fname => $hash\n";
- symlink $fname, $hash;
+ $symlink_exists=eval {symlink("",""); 1};
+ if ($symlink_exists) {
+ symlink $fname, $hash;
+ } else {
+ system ("cp", $fname, $hash);
+ }
$hashlist{$hash} = $fprint;
}
@@ -142,7 +147,12 @@ sub link_hash_crl {
}
$hash .= ".r$suffix";
print "$fname => $hash\n";
- symlink $fname, $hash;
+ $symlink_exists=eval {symlink("",""); 1};
+ if ($symlink_exists) {
+ symlink $fname, $hash;
+ } else {
+ system ("cp", $fname, $hash);
+ }
$hashlist{$hash} = $fprint;
}
diff --git a/util/mklink.pl b/util/mklink.pl
index d7b997ada7..9e9c9a5146 100755
--- a/util/mklink.pl
+++ b/util/mklink.pl
@@ -48,8 +48,13 @@ foreach $dirname (@from_path) {
my $to = join('/', @to_path);
my $file;
+$symlink_exists=eval {symlink("",""); 1};
foreach $file (@files) {
my $err = "";
- symlink("$to/$file", "$from/$file") or $err = " [$!]";
+ if ($symlink_exists) {
+ symlink("$to/$file", "$from/$file") or $err = " [$!]";
+ } else {
+ system ("cp", "$file", "$from/$file") and $err = " [$!]";
+ }
print $file . " => $from/$file$err\n";
}