diff --git a/Build.sh b/Build.sh index 5bd5bb6..5ea2c8d 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.509 2012/02/17 09:49:45 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.510 2012/02/17 13:59:56 tg Exp $' #- # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 @@ -155,7 +155,7 @@ ac_testnnd() { else fr=0 fi - ac_testinit "$@" || return + ac_testinit "$@" || return 1 cat >conftest.c vv ']' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN conftest.c $LIBS $ccpr" test $tcfn = no && test -f a.out && tcfn=a.out @@ -174,9 +174,10 @@ ac_testnnd() { test $ct = sunpro && vscan='-e ignored -e turned.off' fi test -n "$vscan" && grep $vscan vv.out >/dev/null 2>&1 && fv=$fr + return 0 } ac_testn() { - ac_testnnd "$@" + ac_testnnd "$@" || return rmf conftest.c conftest.o ${tcfn}* vv.out ac_testdone } @@ -1265,7 +1266,7 @@ else #define EXTERN #define MKSH_INCLUDES_ONLY #include "sh.h" - __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.509 2012/02/17 09:49:45 tg Exp $"); + __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.510 2012/02/17 13:59:56 tg Exp $"); int main(void) { printf("Hello, World!\n"); return (0); } EOF case $cm in @@ -1550,7 +1551,7 @@ eval test 1 = \$HAVE_COMPILE_TIME_ASSERTS_$$ || exit 1 # $e "${bi}run-time checks follow$ao, please ignore any weird errors" -ac_testnnd silent_idivwrapv '' '(run-time) whether signed integer division overflows wrap silently' <<-'EOF' +if ac_testnnd silent_idivwrapv '' '(run-time) whether signed integer division overflows wrap silently' <<-'EOF' #define MKSH_INCLUDES_ONLY #include "sh.h" #ifdef SIGFPE @@ -1581,19 +1582,21 @@ ac_testnnd silent_idivwrapv '' '(run-time) whether signed integer division overf } #endif EOF -if test $fv = 0; then - echo "| hrm, compiling this failed, but we will just failback" -else - echo "| running test programme; this will fail if cross-compiling" - echo "| in which case we will gracefully degrade to the default" - ./$tcfn >vv.out 2>&1 - rv=$? - echo "| result: `cat vv.out`" - fv=0 - test $rv = 0 && test x"`cat vv.out`" = x"si" && fv=1 +then + if test $fv = 0; then + echo "| hrm, compiling this failed, but we will just failback" + else + echo "| running test programme; this will fail if cross-compiling" + echo "| in which case we will gracefully degrade to the default" + ./$tcfn >vv.out 2>&1 + rv=$? + echo "| result: `cat vv.out`" + fv=0 + test $rv = 0 && test x"`cat vv.out`" = x"si" && fv=1 + fi + rmf conftest.c conftest.o ${tcfn}* vv.out + ac_testdone fi -rmf conftest.c conftest.o ${tcfn}* vv.out -ac_testdone ac_cppflags $e "${bi}end of run-time checks$ao"