diff mbox series

[PULL,2/2] configure: Use -ef to compare paths

Message ID 20241118134253.2071319-3-pbonzini@redhat.com (mailing list archive)
State New
Headers show
Series [PULL,1/2] target/i386: hyperv: add stub for hyperv_syndbg_query_options | expand

Commit Message

Paolo Bonzini Nov. 18, 2024, 1:42 p.m. UTC
From: Akihiko Odaki <akihiko.odaki@daynix.com>

configure checks if it is executed in the source directory by comparing
the literal paths, but there may be multiple representations of a
directory due to symbolic links. Use the -ef operator to tell if they
point to the same directory.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Link: https://lore.kernel.org/r/20241111-p-v1-1-001006c68b7e@daynix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/configure b/configure
index 096b1fddb70..18336376bff 100755
--- a/configure
+++ b/configure
@@ -13,7 +13,7 @@  export CCACHE_RECACHE=yes
 # make source path absolute
 source_path=$(cd "$(dirname -- "$0")"; pwd)
 
-if test "$PWD" = "$source_path"
+if test "$PWD" -ef "$source_path"
 then
     echo "Using './build' as the directory for build output"