configure: simplify source_path setup
authorMans Rullgard <mans@mansr.com>
Mon, 6 Jun 2011 11:56:26 +0000 (12:56 +0100)
committerMans Rullgard <mans@mansr.com>
Mon, 6 Jun 2011 14:16:23 +0000 (15:16 +0100)
Signed-off-by: Mans Rullgard <mans@mansr.com>
configure

index d680337..34c1ed6 100755 (executable)
--- a/configure
+++ b/configure
@@ -1684,13 +1684,12 @@ DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)
 DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
 
 # find source path
-source_path="$(dirname "$0")"
-enable source_path_used
 if test -f configure; then
     source_path="$(pwd)"
     disable source_path_used
 else
-    source_path="$(cd "$source_path"; pwd)"
+    source_path=$(cd $(dirname "$0"); pwd)
+    enable source_path_used
     echo "$source_path" | grep -q '[[:blank:]]' &&
         die "Out of tree builds are impossible with whitespace in source path."
     test -e "$source_path/config.h" &&