Revision ad064840 configure

b/configure
139 139
fi
140 140

  
141 141
# find source path
142
# XXX: we assume an absolute path is given when launching configure,
143
# except in './configure' case.
144
source_path=${0%configure}
145
source_path=${source_path%/}
146
source_path_used="yes"
147
if test -z "$source_path" -o "$source_path" = "." ; then
142
source_path=`dirname "$0"`
143
if [ -z "$source_path" ]; then
148 144
    source_path=`pwd`
145
else
146
    source_path=`cd "$source_path"; pwd`
147
fi
148
if test "$source_path" = `pwd` ; then
149 149
    source_path_used="no"
150
else
151
    source_path_used="yes"
150 152
fi
151 153

  
152 154
for opt do
......
158 160
  --interp-prefix=*) interp_prefix=`echo $opt | cut -d '=' -f 2`
159 161
  ;;
160 162
  --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
163
  source_path_used="yes"
161 164
  ;;
162 165
  --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
163 166
  ;;
......
615 618
echo "\"" >> $config_h
616 619

  
617 620
echo "SRC_PATH=$source_path" >> $config_mak
621
if [ "$source_path_used" = "yes" ]; then
622
  echo "VPATH=$source_path" >> $config_mak
623
fi
618 624
echo "TARGET_DIRS=$target_list" >> $config_mak
619 625

  
620 626
# XXX: suppress that

Also available in: Unified diff