From 0518b6914a3924bb4812cff1bdef0ff9277d735f Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Wed, 22 Jul 2026 12:19:33 +0000 Subject: [PATCH] configure: locate scripts/ relative to the wrapper, not the CWD The top-level ./configure wrapper did `cd scripts`, which is resolved against the caller's current directory. Running it from anywhere other than the source top (e.g. `mkdir build; cd build; ../configure`) failed immediately with: ../configure: line 12: cd: scripts: No such file or directory Derive the script's own location via `dirname "$0"` and cd into "${basedir}/scripts" so the wrapper works regardless of CWD. Co-Authored-By: Claude Opus 4.8 (1M context) --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 367e09a7..6e44966f 100755 --- a/configure +++ b/configure @@ -9,4 +9,5 @@ # script itself. It also sets up CFLAGS without the default optimizer # flag (-O2). -( CFLAGS=${CFLAGS:-"-g"}; export CFLAGS; cd scripts ; ./configure "$@" ) +basedir=$(dirname "$0") +( CFLAGS=${CFLAGS:-"-g"}; export CFLAGS; cd "${basedir}/scripts" ; ./configure "$@" )