From 017bbbfee11b6b9ed615bb0e176f29e38b696f6f Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 21 Dec 2012 13:55:26 +0100 Subject: configure: support absolete out-of-tree builds configure: handle the case of absolute paths. Reported by grishka. --- configure | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 1c1497a..e4321b7 100755 --- a/configure +++ b/configure @@ -502,9 +502,14 @@ if test "$source_path_used" = "yes" ; then for f in $FILES ; do dir=`fn_dirname "$f"` test -d "$dir" || mkdir -p "$dir" - back=`echo "$source_path/$dir/" | sed 's,/\./,/,g;s,[^/]*/,../,g'` - back=$back$f - ln -sf $back $f + # Build a symlink $f that points to $dest, its $source_path + # counterpart. + case $source_path in + /*) dest=$source_path/$f;; + *) dest=`echo "$source_path/$dir/" | sed 's,/\./,/,g;s,[^/]*/,../,g'` + dest=$dest$f;; + esac + ln -sf $dest $f done fi cat >>config.mak <