+--origm
authorlace <>
Thu, 27 Sep 2007 15:21:21 +0000 (15:21 +0000)
committerlace <>
Thu, 27 Sep 2007 15:21:21 +0000 (15:21 +0000)
bin/errs1

index 66fe83c..ab30d3b 100755 (executable)
--- a/bin/errs1
+++ b/bin/errs1
@@ -1,16 +1,24 @@
 #! /bin/sh
 # $Id$
 
-configure="./configure"
-if [ "${1#*/configure}" != "$1" ];then
-       configure="$1"
-       shift
-fi
 customss="--enable-static --disable-shared"
 if [ "$1" = "--origss" ];then
        customss=
        shift
 fi
+
+customm="-m64"
+if [ "$1" = "--origm" ];then
+       customm=
+       shift
+fi
+
+configure="./configure"
+if [ "${1#*/configure}" != "$1" ];then
+       configure="$1"
+       shift
+fi
+
 (
        set -ex
        rm -f config.cache
@@ -27,8 +35,8 @@ fi
                fi
                gcc $flags -c errs1.c -o /dev/null && break
        done
-       if gcc -m64 -c errs1.c -o /dev/null;then
-               flags="-m64 $flags"
+       if test -n "$customm" && gcc $customm -c errs1.c -o /dev/null;then
+               flags="$customm $flags"
        fi
        rm -f errs1.c
        export CFLAGS="$flags"