]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
[mingw] fix cross-compile-with-wine case
authorCharles Wilson <libtool@cwilson.fastmail.fm>
Sat, 31 May 2008 17:11:58 +0000 (13:11 -0400)
committerCharles Wilson <libtool@cwilson.fastmail.fm>
Sun, 1 Jun 2008 13:31:53 +0000 (09:31 -0400)
* libltdl/config/ltmain.m4sh (func_to_host_path)
[host=mingw, build!=mingw|cygwin]: check that winepath
stdout is non-empty and exit code is 0, instead of checking
stderr.
Reported by: Roumen Petrov

ChangeLog
libltdl/config/ltmain.m4sh

index 6dc24f322138e9f405cd98c587217158151e9b97..92b3214802bdb4fe5ec6ddbe7f2699f4aa91c623 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,13 @@
-2006-05-01  Stas Maximov  <smaximov@ieee.org>  (tiny change)
+2008-06-01  Charles Wilson  <libtool@cwilson.fastmail.fm>
+
+       [mingw] fix cross-compile-with-wine case
+       * libltdl/config/ltmain.m4sh (func_to_host_path)
+       [host=mingw, build!=mingw|cygwin]: check that winepath
+       stdout is non-empty and exit code is 0, instead of checking
+       stderr.
+       Reported by: Roumen Petrov
+
+2006-06-01  Stas Maximov  <smaximov@ieee.org>  (tiny change)
 
        Check only regular files, not devices, for lalibs.
        * libltdl/config/ltmain.m4sh (functions func_lalib_p)
index 84977a0a8c7fa00f5e37c783de7e4d0455ef2600..b6fb29b2e1c94c411dc7eb9f6cb417c3fdc9c707 100644 (file)
@@ -2556,17 +2556,19 @@ func_to_host_path ()
             ;;
           * )
             # Unfortunately, winepath does not exit with a non-zero
-            # error code, so we are forced to check stderr for an
-            # error message. On the other hand, if the command is not
-            # found, the shell will set an exit code of 127. So we
-            # must check for both, which explains the odd construction:
-            func_to_host_path_winepath_stderr=`winepath -w "$1" >/dev/null 2>&1`
-            func_to_host_path_winepath_exitcode=$?
-            if test "$func_to_host_path_winepath_exitcode" -eq 0 &&\
-               test -z "${func_to_host_path_winepath_stderr}" ; then
-              func_to_host_path_tmp1=`winepath -w "$1"`
+            # error code, so we are forced to check the contents of
+            # stdout. On the other hand, if the command is not
+            # found, the shell will set an exit code of 127 and print
+            # *an error message* to stdout. So we must check for both
+            # error code of zero AND non-empty stdout, which explains
+            # the odd construction:
+            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+            if test $? -eq 0 && test -n "${func_to_host_path_tmp1}"; then
               func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
                 $SED -e "$lt_sed_naive_backslashify"`
+            else
+              # Allow warning below.
+              func_to_host_path_result=""
             fi
             ;;
         esac