Improve ELF detection procedure on BSD targets.
authorAndy Polyakov <appro@openssl.org>
Tue, 31 May 2005 09:32:00 +0000 (09:32 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 31 May 2005 09:32:00 +0000 (09:32 +0000)
PR: 1079

config

diff --git a/config b/config
index 3b4b0f619f5253562a71ce74e9ff2798365f5fd9..068d54b8702e38d32c12772516617bf6f1308ead 100755 (executable)
--- a/config
+++ b/config
@@ -660,7 +660,9 @@ case "$GUESSOS" in
   sparc64-*-*bsd*)     OUT="BSD-sparc64" ;;
   ia64-*-*bsd*)                OUT="BSD-ia64" ;;
   amd64-*-*bsd*)       OUT="BSD-x86_64" ;;
-  *86*-*-*bsd*)                case "`(file -L /usr/lib/libc.so.*) 2>/dev/null`" in
+  *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
                        *ELF*)  OUT="BSD-x86-elf" ;;
                        *)      OUT="BSD-x86"; options="$options no-sse2" ;;
                        esac ;;