diff -N -u -r nginx-1.6.0.orig/auto/endianness nginx-1.6.0.patched/auto/endianness
--- nginx-1.6.0.orig/auto/endianness	2014-06-30 11:40:38.538948655 +0200
+++ nginx-1.6.0.patched/auto/endianness	2014-06-30 12:17:19.163693514 +0200
@@ -27,7 +27,7 @@
 eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
 
 if [ -x $NGX_AUTOTEST ]; then
-    if $NGX_AUTOTEST >/dev/null 2>&1; then
+    if auto/run $NGX_AUTOTEST >/dev/null 2>&1; then
         echo " little endian"
         have=NGX_HAVE_LITTLE_ENDIAN . auto/have
     else
diff -N -u -r nginx-1.6.0.orig/auto/feature nginx-1.6.0.patched/auto/feature
--- nginx-1.6.0.orig/auto/feature	2014-06-30 11:40:38.538948655 +0200
+++ nginx-1.6.0.patched/auto/feature	2014-06-30 12:17:25.706991399 +0200
@@ -53,7 +53,7 @@
 
         yes)
             # /bin/sh is used to intercept "Killed" or "Abort trap" messages
-            if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
+            if auto/run $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
                 echo " found"
                 ngx_found=yes
 
@@ -68,14 +68,14 @@
 
         value)
             # /bin/sh is used to intercept "Killed" or "Abort trap" messages
-            if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
+            if auto/run $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
                 echo " found"
                 ngx_found=yes
 
                 cat << END >> $NGX_AUTO_CONFIG_H
 
 #ifndef $ngx_feature_name
-#define $ngx_feature_name  `$NGX_AUTOTEST`
+#define $ngx_feature_name  `auto/run $NGX_AUTOTEST`
 #endif
 
 END
@@ -86,7 +86,7 @@
 
         bug)
             # /bin/sh is used to intercept "Killed" or "Abort trap" messages
-            if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
+            if auto/run $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
                 echo " not found"
 
             else
diff -N -u -r nginx-1.6.0.orig/auto/os/linux nginx-1.6.0.patched/auto/os/linux
--- nginx-1.6.0.orig/auto/os/linux	2014-06-30 11:40:38.545615285 +0200
+++ nginx-1.6.0.patched/auto/os/linux	2014-06-30 12:18:38.229931842 +0200
@@ -18,7 +18,7 @@
 
 # Linux kernel version
 
-version=$((`uname -r \
+version=$((`auto/run uname -r \
     | sed -n -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/ \
                                                  \1*256*256+\2*256+\3/p' \
              -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1*256*256+\2*256/p'`))
diff -N -u -r nginx-1.6.0.orig/auto/run nginx-1.6.0.patched/auto/run
--- nginx-1.6.0.orig/auto/run	1970-01-01 01:00:00.000000000 +0100
+++ nginx-1.6.0.patched/auto/run	2014-06-30 11:54:00.744602733 +0200
@@ -0,0 +1,58 @@
+#!/bin/bash
+basedir=$(dirname $(readlink -f $0))
+keyfile=${basedir}/remote-ssh-key
+logfile=${basedir}/run.txt
+verbose=
+
+if [ -f "${basedir}/remote" ] ; then
+	remote=$(<${basedir}/remote)
+else
+	echo -n "Enter remote (username@192.168.1.1): "
+	read remote
+	echo "$remote" > ${basedir}/remote
+fi
+
+if [ "$1" = "-v" ] ; then
+	verbose=1
+	shift
+fi
+
+if [ -z "$1" ] ; then
+	echo "Usage: $0 COMMAND ARG..."
+	exit 1
+fi
+
+set -e -u
+
+if [ ! -f $keyfile ] ; then
+	echo "Generating key file $keyfile" >> ${logfile}
+	ssh-keygen -f ${keyfile} -N ""
+	echo "Transferring key to remote system (type in password please)" >> ${logfile}
+	scp -q ${keyfile}.pub ${remote}:/tmp
+	echo "Adding file to authorized_keys (type in password please)" >> ${logfile}
+	ssh -q ${remote} "mkdir ~/.ssh; chmod 700 ~ ~/.ssh; cat /tmp/remote-ssh-key.pub >> ~/.ssh/authorized_keys;"
+fi
+
+if [ -x "$1" ] ; then
+	if [ -n "$verbose" ] ; then
+	   echo "Copying $1 to $remote" >&2
+	else
+	   echo "$(date) Copying $1 to $remote" >> ${logfile}
+	fi
+	scp -q -i ${keyfile} "$1" ${remote}:/tmp
+	remotename="/tmp/$(basename $1)"
+	shift
+	if [ -n "$verbose" ] ; then
+	   echo "Running remotely: ${remotename} $@" >&2
+	else
+	   echo "$(date) Running remotely: ${remotename} $@" >> ${logfile}
+	fi
+	ssh -q -i ${keyfile} ${remote} "${remotename} $@"
+else
+	if [ -n "$verbose" ] ; then
+	   echo "Running remotely: $@" >&2
+	else
+	   echo "$(date) Running remotely: $@" >> ${logfile}
+	fi
+	ssh -q -i ${keyfile} ${remote} "$@"
+fi
diff -N -u -r nginx-1.6.0.orig/auto/types/sizeof nginx-1.6.0.patched/auto/types/sizeof
--- nginx-1.6.0.orig/auto/types/sizeof	2014-06-30 11:40:38.545615285 +0200
+++ nginx-1.6.0.patched/auto/types/sizeof	2014-06-30 12:19:42.686249318 +0200
@@ -40,7 +40,7 @@
 
 
 if [ -x $NGX_AUTOTEST ]; then
-    ngx_size=`$NGX_AUTOTEST`
+    ngx_size=`auto/run $NGX_AUTOTEST`
     echo " $ngx_size bytes"
 fi
 
