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) <noreply@anthropic.com>
This commit is contained in:
Darryl L. Miles 2026-07-22 12:19:33 +00:00 committed by R. Timothy Edwards
parent 7d11b8e51b
commit 0518b6914a
1 changed files with 2 additions and 1 deletions

3
configure vendored
View File

@ -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 "$@" )