summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-06-22 02:16:16 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-06-22 02:16:16 +0900
commitdd378c5a2483002d50053cf81d00004c1fb3c8bd (patch)
tree93c33c44058c2be5164912942eeef9f04ea03568
parent90763e04ba2200f96a485d2ef3bb56817ae1b2db (diff)
Expand --with-opt-dir arguments
-rw-r--r--configure.ac1
-rwxr-xr-xwin32/configure.bat13
2 files changed, 11 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index fc52679a8b..579ca41a33 100644
--- a/configure.ac
+++ b/configure.ac
@@ -985,6 +985,7 @@ AS_IF([test "x$OPT_DIR" != x], [
val=`IFS="$PATH_SEPARATOR"
for dir in $OPT_DIR; do
test -z "$dir" && continue
+ dir="`$CHDIR "$dir" && pwd` || continue
echo x ${LIBPATHFLAG} ${RPATHFLAG} |
sed "s/^x *//;s${IFS}"'%1\\$-s'"${IFS}${dir}/lib${IFS}g;s${IFS}%s${IFS}${dir}/lib${IFS}g"
done | tr '\012' ' ' | sed 's/ *$//'`
diff --git a/win32/configure.bat b/win32/configure.bat
index dd1a917adc..853f73b5d3 100755
--- a/win32/configure.bat
+++ b/win32/configure.bat
@@ -224,8 +224,14 @@ goto :loop ;
goto :loop ;
:gmp-dir
:opt-dir
- set XINCFLAGS=%XINCFLAGS% -I%2/include
- set XLDFLAGS=%XLDFLAGS% -libpath:%2/lib
+ set opt=%~2
+ for %%I in (%opt:;= %) do (
+ pushd %%I && (
+ call set XINCFLAGS=%%XINCFLAGS%% -I%%CD:\=/%%/include
+ call set XLDFLAGS=%%XLDFLAGS%% -libpath:%%CD:\=/%%/lib
+ popd
+ )
+ )
:witharg
echo>>confargs.tmp %1=%2\
set witharg=1
@@ -249,9 +255,10 @@ goto :loop ;
echo --with-static-linked-ext link external modules statically
echo --with-ext="a,b,..." use extensions a, b, ...
echo --without-ext="a,b,..." ignore extensions a, b, ...
- echo --with-opt-dir=DIR-LIST add optional headers and libraries directories separated by `;'
+ echo --with-opt-dir="DIR-LIST" add optional headers and libraries directories separated by `;'
echo --disable-install-doc do not install rdoc indexes during install
echo --with-ntver=0xXXXX target NT version (shouldn't use with old SDK)
+ echo Note that `,' and `;' need to be enclosed within double quotes in batch file command line.
del *.tmp
del ~tmp~.mak
goto :exit