Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 1 | #!/bin/sh |
2 | |||||
3 | debug=false | ||||
4 | |||||
Denis Vlasenko | 018e085 | 2007-02-25 00:40:37 +0000 | [diff] [blame] | 5 | try() { |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 6 | added="$1" |
7 | shift | ||||
8 | $debug && echo "Trying: $* $added" | ||||
9 | "$@" $added >/dev/null 2>&1 \ | ||||
10 | && exit 0 | ||||
11 | } | ||||
12 | |||||
13 | try "" "$@" | ||||
14 | try "-lm" "$@" | ||||
15 | try "-lcrypt" "$@" | ||||
16 | try "-Wl,--start-group -lcrypt -lm -Wl,--end-group" "$@" | ||||
17 | # It failed. Rerun & let people see the error messages | ||||
18 | "$@" $added |