--- a/configure	2017-01-04 16:25:04.000000000 -0500
+++ b/configure	2017-01-04 17:26:03.000000000 -0500
@@ -42,8 +42,8 @@
 do
 case "$1" in
-    -h* | --h*)
+    -h | -help | --help)
       echo 'usage:'
       echo '  configure [--shared] [--prefix=PREFIX]  [--exec_prefix=EXPREFIX]'
-      echo '     [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
+      echo '     [--libdir=LIBDIR] [--includedir=INCLUDEDIR] [--host=HOST]'
         exit 0;;
     -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
@@ -56,4 +56,6 @@
     -i* | --i*) includedir="$2"; shift; shift;;
     -s* | --s*) shared=1; shift;;
+    -host=* | --host=*) host=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
+    -host | --host) host="$2"; shift; shift;;
     *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;;
     esac
@@ -67,5 +69,6 @@
 
 test -z "$CC" && echo Checking for gcc...
-cc=${CC-gcc}
+test -n "$host" && cross_gcc=$host-gcc
+cc=${CC-${cross_gcc-gcc}}
 cflags=${CFLAGS-"-O3"}
 # to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
@@ -75,5 +78,9 @@
 
 BUILDPLATFORM=`(uname -s || echo unknown) 2>/dev/null`;
-TARGETPLATFORM=${target-${BUILDPLATFORM}}
+HOSTPLATFORM=${host-${BUILDPLATFORM}}
+cat << EOF
+BUILDPLATFORM : $BUILDPLATFORM
+HOSTPLATFORM  : $HOSTPLATFORM
+EOF
 
 if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
@@ -81,5 +88,5 @@
   SFLAGS=${CFLAGS-"-fPIC -O3"}
   CFLAGS="$cflags"
-  case ${TARGETPLATFORM} in
+  case ${HOSTPLATFORM} in
   Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
   OS/2* )
@@ -185,5 +192,5 @@
   esac
 fi
-case ${TARGETPLATFORM} in
+case ${HOSTPLATFORM} in
   *CYGWIN* | *Cygwin* | *cygwin* )
     # On cygwin, we always build both shared and static libs
@@ -195,5 +202,5 @@
     # On Mingw-cygwin-special, we always build both shared and static libs
     LIBS="${SHAREDLIB} ${STATICLIB}"
-    SHAREDLIBPOST='/bin/true'
+    SHAREDLIBPOST='true'
     SHAREDTARGET=${SHAREDLIB}
     ;;
