summaryrefslogtreecommitdiff
path: root/security/openssh/patches/patch-aa
blob: 97d6fe53b6dbf6c222e783239a93911cd6dcc8ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
$NetBSD: patch-aa,v 1.12 2000/10/15 14:17:14 itojun Exp $

--- configure.in.orig	Thu Aug 31 07:20:05 2000
+++ configure.in	Thu Oct 12 09:23:08 2000
@@ -337,2 +337,3 @@
 saved_CFLAGS="$CFLAGS"
+crypto_LIBS=""
 if test "x$prefix" != "xNONE" ; then
@@ -353,8 +354,21 @@
 
-		LIBS="$saved_LIBS -lcrypto"
-
-		# Basic test to check for compatible version and correct linking
-		# *does not* test for RSA - that comes later.
-		AC_TRY_RUN(
-			[
+		# Some ELF systems can't resolve all the symbols in libcrypto
+		# if libcrypto was linked against RSAREF, and fail to link the
+		# test program correctly, even though a correct installation
+		# of OpenSSL exists.  So we test the linking three times in
+		# case the RSAREF libraries are needed right away.  We'll test
+		# for them explicitly later on.
+		#
+		for libcrypto in \
+			"-lcrypto" \
+			"-lcrypto -lrsaref" \
+			"-lcrypto -lRSAglue -lrsaref"
+		do
+			LIBS="$saved_LIBS $libcrypto"
+
+			# Basic test to check for compatible version and
+			# correct linking *does not* test for RSA - that comes
+			# later.
+			AC_TRY_RUN(
+				[
 #include <string.h>
@@ -368,8 +382,10 @@
 }
-			],
-			[
-				found_crypto=1
-				break;
-			], []
-		)
+				],
+				[
+					found_crypto=1
+					crypto_LIBS=$libcrypto
+					break;
+				], []
+			)
+		done
 
@@ -403,3 +419,3 @@
 fi
-LIBS="$saved_LIBS -lcrypto"
+LIBS="$saved_LIBS $crypto_LIBS"
 
@@ -764,3 +780,3 @@
 		],
-		[ struct passwd p s; p.pw_class = NULL; ],
+		[ struct passwd p; p.pw_class = NULL; ],
 		[ ac_cv_have_pw_class_in_struct_passwd="yes" ],