From: Ralf Wildenhues Date: Fri, 12 Aug 2005 20:20:04 +0000 (+0000) Subject: * tests/defs.m4sh (func_configure): Rename to .. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6342f066b45bd8312cc1d1b1145ebc1747c1b08;p=thirdparty%2Flibtool.git * tests/defs.m4sh (func_configure): Rename to .. (func_configure_nofail): this, call from old. * tests/fcdemo-conf.test, tests/fcdemo-shared.test, tests/fcdemo-static.test: Use. Do not fail gratuitously but SKIP on compilers that look like they could be Fortran 77-only. Reported by Patrick Welche . --- diff --git a/ChangeLog b/ChangeLog index 81ac6e288..fae9c46ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2005-08-12 Ralf Wildenhues + * tests/defs.m4sh (func_configure): Rename to .. + (func_configure_nofail): this, call from old. + * tests/fcdemo-conf.test, tests/fcdemo-shared.test, + tests/fcdemo-static.test: Use. Do not fail gratuitously but + SKIP on compilers that look like they could be Fortran 77-only. + Reported by Patrick Welche . + * config/ltmain.m4sh (mode): Do not initialize, for nicer error messages. diff --git a/tests/defs.m4sh b/tests/defs.m4sh index 37a7c8d6a..a6acfc946 100644 --- a/tests/defs.m4sh +++ b/tests/defs.m4sh @@ -171,14 +171,15 @@ func_require () done } -# func_configure [args ...] +# func_configure_nofail [args ...] # Configure the demonstration. -func_configure () +func_configure_nofail () { $opt_debug my_args=${1+"$@"} my_dir=`pwd | $SED "$basename"` my_testdir="$srcdir/tests/$my_dir" + conf_status=$EXIT_FAILURE test -n "$my_args" && my_args=" $my_args" my_args="--srcdir="\""$my_testdir"\"" --prefix="\""$prefix"\""$my_args" @@ -187,14 +188,26 @@ func_configure () func_msg "Configuring in $my_dir" test -f "$my_testdir/configure" || autoreconf --force --install $my_testdir - test -f "$my_testdir/configure" || exit $EXIT_FAILURE - - eval func_msg $SHELL "$my_testdir/configure" $my_args - eval $SHELL "$my_testdir/configure" $my_args || \ - { func_msg "FAILED: Configuring in $my_testdir" - ls -ltr $my_testdir - exit $EXIT_FAILURE; - } + if test -f "$my_testdir/configure"; then + + eval func_msg $SHELL "$my_testdir/configure" $my_args + if eval $SHELL "$my_testdir/configure" $my_args; then + conf_status=$EXIT_SUCCESS + else + func_msg "FAILED: Configuring in $my_testdir" + ls -ltr $my_testdir + fi + fi +} + +# func_configure [args ...] +# Configure the demonstration, fail on error. +func_configure () +{ + func_configure_nofail + if test "$conf_status" -eq "$EXIT_FAILURE"; then + exit $EXIT_FAILURE + fi } # func_check_static_shared staticp sharedp diff --git a/tests/fcdemo-conf.test b/tests/fcdemo-conf.test index 2b3e4748f..497f7654d 100755 --- a/tests/fcdemo-conf.test +++ b/tests/fcdemo-conf.test @@ -26,7 +26,15 @@ func_mkprefixdir func_cd "tests/fcdemo" func_make_distclean -func_configure +# We do not want to fail if all we got was a Fortran 77 compiler. +func_configure_nofail +if test "$conf_status" -eq "$EXIT_FAILURE"; then + case `echo $FC | $SED $basename` in + g77* | f77* | xlf | xlf[_-]* | frt* | pgf77* | cf77* | fort77* | fl32* | af77*) + func_skip "The FC fortran tests do not work with Fortran 77 compilers" ;; + *) exit $EXIT_FAILURE + esac +fi func_check_static_shared "yes" "yes" exit 0 diff --git a/tests/fcdemo-shared.test b/tests/fcdemo-shared.test index ce2b68e53..8026c83cb 100755 --- a/tests/fcdemo-shared.test +++ b/tests/fcdemo-shared.test @@ -26,7 +26,15 @@ func_mkprefixdir func_cd "tests/fcdemo" func_make_distclean -func_configure "--disable-static" +# We do not want to fail if all we got was a Fortran 77 compiler. +func_configure_nofail "--disable-static" +if test "$conf_status" -eq "$EXIT_FAILURE"; then + case `echo $FC | $SED $basename` in + g77* | f77* | xlf | xlf[_-]* | frt* | pgf77* | cf77* | fort77* | fl32* | af77*) + func_skip "The FC fortran tests do not work with Fortran 77 compilers" ;; + *) exit $EXIT_FAILURE + esac +fi func_check_static_shared "no" "yes" exit 0 diff --git a/tests/fcdemo-static.test b/tests/fcdemo-static.test index 2f960b81a..0e84b0b4d 100755 --- a/tests/fcdemo-static.test +++ b/tests/fcdemo-static.test @@ -26,7 +26,15 @@ func_mkprefixdir func_cd "tests/fcdemo" func_make_distclean -func_configure "--disable-shared" +# We do not want to fail if all we got was a Fortran 77 compiler. +func_configure_nofail "--disable-shared" +if test "$conf_status" -eq "$EXIT_FAILURE"; then + case `echo $FC | $SED $basename` in + g77* | f77* | xlf | xlf[_-]* | frt* | pgf77* | cf77* | fort77* | fl32* | af77*) + func_skip "The FC fortran tests do not work with Fortran 77 compilers" ;; + *) exit $EXIT_FAILURE + esac +fi func_check_static_shared "yes" "no" exit 0