From dc4b1db4d3ad5e2ba975647eba230d126b21147f Mon Sep 17 00:00:00 2001 From: KO Myung-Hun Date: Mon, 15 Sep 2014 12:38:49 +0900 Subject: [PATCH 2/5] AC_SITE_LOAD: Convert '\' in PATH to '/' on OS/2 echo of some shells such as pdksh recognizes '\' as an escape character. So when echoing a path, the result can be corrupted. For examples, echo x:\usr\bin will be x:\usin. * lib/autoconf/general.m4 (AC_SITE_LOAD): Convert '\' in PATH to '/' on OS/2. --- lib/autoconf/general.m4 | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 77f71d2..f61520b 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1951,6 +1951,27 @@ do || AC_MSG_FAILURE([failed to load site script $ac_site_file]) fi done + +if test -n "$OS2_SHELL"; then + # Backslashes into forward slashes: + # The following OS/2 specific code is performed AFTER config.site + # has been loaded to allow users to change their environment there. + # This strange code is necessary to deal with handling of backslashes by + # ksh. + ac_save_IFS="$IFS" + IFS="\\" + ac_TEMP_PATH= + for ac_dir in $PATH; do + IFS=$ac_save_IFS + if test -z "$ac_TEMP_PATH"; then + ac_TEMP_PATH="$ac_dir" + else + ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir" + fi + done + export PATH="$ac_TEMP_PATH" + unset ac_TEMP_PATH +fi ]) -- 1.7.3.2