(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 <prlw1@newn.cam.ac.uk>.
2005-08-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * 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 <prlw1@newn.cam.ac.uk>.
+
* config/ltmain.m4sh (mode): Do not initialize, for nicer error
messages.
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"
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
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
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
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