From 7d219aab70e6951ab82c27c202cac05016696723 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 5 Oct 2006 10:17:08 +0000 Subject: build system overhaul --- scripts/trylink | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 scripts/trylink (limited to 'scripts/trylink') diff --git a/scripts/trylink b/scripts/trylink new file mode 100755 index 0000000..dfe282d --- /dev/null +++ b/scripts/trylink @@ -0,0 +1,18 @@ +#!/bin/sh + +debug=false + +function try { + added="$1" + shift + $debug && echo "Trying: $* $added" + "$@" $added >/dev/null 2>&1 \ + && exit 0 +} + +try "" "$@" +try "-lm" "$@" +try "-lcrypt" "$@" +try "-Wl,--start-group -lcrypt -lm -Wl,--end-group" "$@" +# It failed. Rerun & let people see the error messages +"$@" $added -- cgit v1.1