-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Mike Frysinger wrote: > On 15 Oct 2023 02:04, KO Myung-Hun wrote: >> Some OSes such as OS/2, uses ';' as a path separator. So using >> $PATH_SEPARATOR instead of hard-coded ':' is more proper. >> >> * build-aux-ltmain.in: replace : with $PATH_SEPARATOR. * >> m4/libtool.m4: Likewise. > > this doesn't work for me > > 544675d6b538 2024-01-14 18:06:03 -0500 gnulib: update submodule to > current versions > > $ ./bootstrap $ ./configure ... checking for mt... no checking if : > is a manifest tool... no ./configure: 1: Syntax error: Unterminated > quoted string $ -mike How about this? - -- KO Myung-Hun Korean OS/2 User Community : https://www.os2.kr/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (OS/2) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFlpSHTE9YstvghgroRAhS0AJoDOLC7CqgIxDOIjauhO3TW0TGvbACghk6m pHAtNYl5XnpC4Pptph8j3sE= =kxUR -----END PGP SIGNATURE-----
From 23812414244882e7a7dbe790de648318643e66e6 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun <komh@chollian.net> Date: Thu, 3 Nov 2022 23:32:37 +0900 Subject: [PATCH v2] libtool: replace : with $PATH_SEPARATOR Some OSes such as OS/2, uses ';' as a path separator. So using $PATH_SEPARATOR instead of hard-coded ':' is more proper. * build-aux-ltmain.in: replace : with $PATH_SEPARATOR. * m4/libtool.m4: Likewise. --- build-aux/ltmain.in | 76 ++++++++++++++++++++++----------------------- m4/libtool.m4 | 16 +++++----- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in index d5157a8d..4ad97c40 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in @@ -733,8 +733,8 @@ func_resolve_sysroot () # store the result into func_replace_sysroot_result. func_replace_sysroot () { - case $lt_sysroot:$1 in - ?*:"$lt_sysroot"*) + case "$lt_sysroot$PATH_SEPARATOR$1" in + ?*"$PATH_SEPARATOR$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; @@ -2007,7 +2007,7 @@ func_mode_execute () if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + eval "$shlibpath_var=\"\$dir\$PATH_SEPARATOR\$$shlibpath_var\"" fi done @@ -3579,7 +3579,7 @@ func_exec_program () if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH + PATH=\"$dllsearchpath$PATH_SEPARATOR\$PATH\" " fi @@ -3591,7 +3591,7 @@ func_exec_program () # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/$PATH_SEPARATOR$PATH_SEPARATOR*\$//'\` export $shlibpath_var " @@ -3802,7 +3802,7 @@ EOF fi if test -n "$dllsearchpath"; then - func_to_host_path "$dllsearchpath:" + func_to_host_path "$dllsearchpath$PATH_SEPARATOR" cat <<EOF const char * EXE_PATH_VARNAME = "PATH"; const char * EXE_PATH_VALUE = "$func_to_host_path_result"; @@ -5108,15 +5108,15 @@ func_mode_link () case $host in *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; + case "$PATH_SEPARATOR$dllsearchpath$PATH_SEPARATOR" in + *"$PATH_SEPARATOR$dir$PATH_SEPARATOR"*) ;; + "$PATH_SEPARATOR$PATH_SEPARATOR") dllsearchpath=$dir;; + *) func_append dllsearchpath "$PATH_SEPARATOR$dir";; esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; + case "$PATH_SEPARATOR$dllsearchpath$PATH_SEPARATOR" in + *"$PATH_SEPARATOR$testbindir$PATH_SEPARATOR"*) ;; + "$PATH_SEPARATOR$PATH_SEPARATOR") dllsearchpath=$testbindir;; + *) func_append dllsearchpath "$PATH_SEPARATOR$testbindir";; esac ;; esac @@ -5600,7 +5600,7 @@ func_mode_link () if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/$PATH_SEPARATOR/ /g\'\` else shlib_search_path= fi @@ -6231,9 +6231,9 @@ func_mode_link () # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. - case $temp_rpath: in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; + case "$temp_rpath$PATH_SEPARATOR" in + *"$absdir$PATH_SEPARATOR"*) ;; + *) func_append temp_rpath "$absdir$PATH_SEPARATOR" ;; esac fi @@ -6458,9 +6458,9 @@ func_mode_link () fi if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; + case "$PATH_SEPARATOR$compile_shlibpath$PATH_SEPARATOR" in + *"$PATH_SEPARATOR$add_shlibpath$PATH_SEPARATOR"*) ;; + *) func_append compile_shlibpath "$add_shlibpath$PATH_SEPARATOR" ;; esac fi if test prog = "$linkmode"; then @@ -6472,9 +6472,9 @@ func_mode_link () if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; + case "$PATH_SEPARATOR$finalize_shlibpath$PATH_SEPARATOR" in + *"$PATH_SEPARATOR$libdir$PATH_SEPARATOR"*) ;; + *) func_append finalize_shlibpath "$libdir$PATH_SEPARATOR" ;; esac fi fi @@ -6492,9 +6492,9 @@ func_mode_link () add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; + case "$PATH_SEPARATOR$finalize_shlibpath$PATH_SEPARATOR" in + *"$PATH_SEPARATOR$libdir$PATH_SEPARATOR"*) ;; + *) func_append finalize_shlibpath "$libdir$PATH_SEPARATOR" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then @@ -7721,7 +7721,7 @@ EOF # We should set the runpath_var. rpath= for dir in $perm_rpath; do - func_append rpath "$dir:" + func_append rpath "$dir$PATH_SEPARATOR" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi @@ -8443,15 +8443,15 @@ EOF case $host in *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; + case "$PATH_SEPARATOR$dllsearchpath$PATH_SEPARATOR" in + *"$PATH_SEPARATOR$libdir$PATH_SEPARATOR"*) ;; + "$PATH_SEPARATOR$PATH_SEPARATOR") dllsearchpath=$libdir;; + *) func_append dllsearchpath "$PATH_SEPARATOR$libdir";; esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; + case "$PATH_SEPARATOR$dllsearchpath$PATH_SEPARATOR" in + *"$PATH_SEPARATOR$testbindir$PATH_SEPARATOR"*) ;; + "$PATH_SEPARATOR$PATH_SEPARATOR") dllsearchpath=$testbindir;; + *) func_append dllsearchpath "$PATH_SEPARATOR$testbindir";; esac ;; esac @@ -8565,7 +8565,7 @@ EOF # We should set the runpath_var. rpath= for dir in $perm_rpath; do - func_append rpath "$dir:" + func_append rpath "$dir$PATH_SEPARATOR" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -8573,7 +8573,7 @@ EOF # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" + func_append rpath "$dir$PATH_SEPARATOR" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 695ccac4..c184d3b4 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -2275,18 +2275,18 @@ func_munge_path_list () case x@S|@2 in x) ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + *"$PATH_SEPARATOR") + eval @S|@1=\"`$ECHO @S|@2 | $SED "s/$PATH_SEPARATOR/ /g"` \@S|@@S|@1\" ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + "x$PATH_SEPARATOR"*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED "s/$PATH_SEPARATOR/ /g"`\" ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + *"$PATH_SEPARATOR$PATH_SEPARATOR"*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e "s/.*$PATH_SEPARATOR$PATH_SEPARATOR//" -e "s/$PATH_SEPARATOR/ /g"`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e "s/$PATH_SEPARATOR$PATH_SEPARATOR.*//" -e "s/$PATH_SEPARATOR/ /g"`\ \@S|@@S|@1\" ;; *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED "s/$PATH_SEPARATOR/ /g"`\" ;; esac } -- 2.42.0