Re: [PATCH 2/4] AC_SITE_LOAD: add OS/2-specific initialization

KO Myung-Hun <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi/2.

I split into two patches.

Eric Blake wrote:
> On 09/22/2014 08:39 PM, KO Myung-Hun wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> Hi/2.
>> 
>> Eric Blake wrote:
>>> On 09/22/2014 12:59 AM, KO Myung-Hun wrote:

[snip]

>> This might be better as two separate patches, since it
>>> is doing two unrelated changes.
>>> 
>> 
>> I thought both these were OS/2 init codes. Anyway, I'll split.
> 
> They are both related to OS/2, but tackling different items.
> 

- -- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (OS/2)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFUIQ+XE9YstvghgroRAgagAJwNJFDyKIhQJKJha5tecUHmy6ZTNgCgqYXl
K0DAvx8LS6zlmfyv3WsvDho=
=S/xI
-----END PGP SIGNATURE-----
0002-AC_SITE_LOAD-Convert-in-PATH-to-on-OS-2.patch (text/plain, 1.4 KB)
From dc4b1db4d3ad5e2ba975647eba230d126b21147f Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <[email protected]>
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
0003-AC_SITE_LOAD-add-.exe-to-ac_executable_extensions-on.patch (text/plain, 1 KB)
From 2babf3c89da6dcfdaa32e6b8b2dd4b569aec5539 Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <[email protected]>
Date: Tue, 23 Sep 2014 14:31:06 +0900
Subject: [PATCH 3/5] AC_SITE_LOAD: add '.exe' to ac_executable_extensions on OS/2

Many codes searching the executables depend on
ac_executable_extensions and $EXEEXT. But without this patch, the
searches fail.

* lib/autoconf/general.m4 (AC_SITE_LOAD): Add '.exe' to
ac_executable_extensions on OS/2.
---
 lib/autoconf/general.m4 |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index f61520b..fd8e046 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1971,6 +1971,12 @@ if test -n "$OS2_SHELL"; then
   done
   export PATH="$ac_TEMP_PATH"
   unset ac_TEMP_PATH
+
+  # add .exe to ac_executable_extensions
+  if test -z "$ac_executable_extensions"; then
+    AC_MSG_WARN([ac_executable_extensions not set, assuming .exe])
+  fi
+  ac_executable_extensions="$ac_executable_extensions .exe"
 fi
 ])
 
-- 
1.7.3.2
0002-AC_SITE_LOAD-Convert-in-PATH-to-on-OS-2.patch.sig (application/octet-stream, 65 B) - not displayed
0003-AC_SITE_LOAD-add-.exe-to-ac_executable_extensions-on.patch.sig (application/octet-stream, 65 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.