Fix two Configure tests when targethost is set
authorJess Robinson <castaway@desert-island.me.uk>
Sat, 29 Dec 2012 21:23:01 +0000 (21:23 +0000)
committerBrian Fraser <fraserbn@gmail.com>
Fri, 17 Jan 2014 14:35:46 +0000 (11:35 -0300)
Configure

index f6fc4c9..2b60149 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -19614,7 +19614,13 @@ EOCP
                 set tryp
                 if eval $compile; then
                     $rm -f tryp.out
-                    $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
+                    # Copy the .c file to the remote host ($to is an ssh-alike if targethost is set)
+                    if $test "X$targethost" != X; then
+                        $to tryp.c
+                        $run ./tryp \< tryp.c 2>/dev/null > tryp.out
+                    else
+                        $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
+                    fi
                     if cmp tryp.c tryp.out >/dev/null 2>&1; then
                        $cat >&4 <<EOM
 fflush(NULL) seems to behave okay with input streams.
@@ -19678,7 +19684,12 @@ EOCP
        set tryp
        if eval $compile; then
            $rm -f tryp.out
-           $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
+            if $test "X$targethost" != X; then
+                $to tryp.c
+                $run ./tryp \< tryp.c 2>/dev/null > tryp.out
+            else
+                $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
+            fi
            if cmp tryp.c tryp.out >/dev/null 2>&1; then
               $cat >&4 <<EOM
 Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.