From: Andy Polyakov Date: Mon, 20 Jun 2005 17:39:10 +0000 (+0000) Subject: Refine ELF detection on BSD platforms. X-Git-Tag: OpenSSL_0_9_8k^2~2001 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8b452002e8ffd69d408f7eae2a122fb25e7f67b0;p=oweals%2Fopenssl.git Refine ELF detection on BSD platforms. --- diff --git a/config b/config index 13a57c4f6b..a3ccb5d9d2 100755 --- a/config +++ b/config @@ -660,9 +660,14 @@ case "$GUESSOS" in sparc64-*-*bsd*) OUT="BSD-sparc64" ;; ia64-*-*bsd*) OUT="BSD-ia64" ;; amd64-*-*bsd*) OUT="BSD-x86_64" ;; - *86*-*-*bsd*) # assume highest libc.so.* version is the one in effect - libc=`(ls /usr/lib/libc.so.* /lib/libc.so.* | tail -1) 2>/dev/null` - case "`(file $libc) 2>/dev/null`" in + *86*-*-*bsd*) # mimic ld behaviour when it's looking for libc... + if [ -L /usr/lib/libc.so ]; then # [Free|Net]BSD + libc=/usr/lib/libc.so + else # OpenBSD + # ld searches for highest libc.so.* and so do we + libc=`(ls /usr/lib/libc.so.* | tail -1) 2>/dev/null` + fi + case "`(file -L $libc) 2>/dev/null`" in *ELF*) OUT="BSD-x86-elf" ;; *) OUT="BSD-x86"; options="$options no-sse2" ;; esac ;;