summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2005-06-20 17:36:19 +0000
committerAndy Polyakov <appro@openssl.org>2005-06-20 17:36:19 +0000
commitfe0b3d98c237209b9b39060ed6d40c4f284e808b (patch)
treeb1b3a841ebaf641ce235f79138ca2e273ab0d848 /config
parent8d56c8b51c0f45691604a37a4b151c7b7e6d9886 (diff)
Refine ELF detection on BSD platforms.
Diffstat (limited to 'config')
-rwxr-xr-xconfig11
1 files changed, 8 insertions, 3 deletions
diff --git a/config b/config
index 4a8c185bd5..89fa0b3e23 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 ;;