]> git.sesse.net Git - ffmpeg/commitdiff
configure: Do not overwrite src symlink if it already exists.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Wed, 24 Apr 2019 22:42:48 +0000 (00:42 +0200)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Sun, 5 May 2019 00:50:08 +0000 (02:50 +0200)
Allows running fate from out-of-tree builds on wsl.

configure

index 8af41fde9a5816d9e25d57a6747dae0186528e67..d644a5b1d465a6c73432647e67572838d4fef9c0 100755 (executable)
--- a/configure
+++ b/configure
@@ -3742,6 +3742,8 @@ mkdir -p ffbuild
 # find source path
 if test -f configure; then
     source_path=.
+elif test -f src/configure; then
+    source_path=src
 else
     source_path=$(cd $(dirname "$0"); pwd)
     case "$source_path" in
@@ -5416,7 +5418,7 @@ link_name=$(mktemp -u $TMPDIR/name_XXXXXXXX)
 mkdir "$link_dest"
 $ln_s "$link_dest" "$link_name"
 touch "$link_dest/test_file"
-if [ "$source_path" != "." ] && ([ ! -d src ] || [ -L src ]) && [ -e "$link_name/test_file" ]; then
+if [ "$source_path" != "." ] && [ "$source_path" != "src" ] && ([ ! -d src ] || [ -L src ]) && [ -e "$link_name/test_file" ]; then
     # create link to source path
     [ -e src ] && rm src
     $ln_s "$source_path" src