[PATCH 2/2] AC_SITE_LOAD: append '.exe' to ac_executable_extensions on OS/2

KO Myung-Hun <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <[email protected]>
Codes searching for the executables uses '' and
$ac_executable_extensions as extensions of the executables. But it is
used without any initializing. That is, it is an empty string by
default. As a result, without appending '.exe' to it on OS/2,
searching for the executables fails on OS/2.

* lib/autoconf/general.m4 (AC_SITE_LOAD): Append '.exe' to
ac_executable_extensions if it does not contain '.exe' on OS/2.
---
 lib/autoconf/general.m4 | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 6173b83..d4a05e3 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1959,6 +1959,15 @@ if test -n "$OS2_SHELL"; then
   # This strange code is necessary to deal with handling of backslashes by
   # ksh.
   export PATH=$(expr "$PATH" | tr '\\' /)
+
+  # Append .exe to ac_executable_extensions if it does not contain .exe
+  for ac_exec_ext in $ac_executable_extensions
+  do
+    test "$ac_exec_ext" = ".exe" && break
+  done
+  if test "$ac_exec_ext" != ".exe"; then
+    ac_executable_extensions="$ac_executable_extensions .exe"
+  fi
 fi
 ])
 
-- 
1.9.5
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.