summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure b/configure
index 985afbf..0ecacce 100755
--- a/configure
+++ b/configure
@@ -398,7 +398,12 @@ check_cpp(){
check_ld(){
log check_ld "$@"
check_cc || return
- check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
+ flags=''
+ libs=''
+ for f; do
+ test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
+ done
+ check_cmd $cc $LDFLAGS $flags -o $TMPE $TMPO $extralibs $libs
}
check_cflags(){
OpenPOWER on IntegriCloud