]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/defs.m4sh (func_configure): Rename to ..
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 12 Aug 2005 20:20:04 +0000 (20:20 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 12 Aug 2005 20:20:04 +0000 (20:20 +0000)
(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>.

ChangeLog
tests/defs.m4sh
tests/fcdemo-conf.test
tests/fcdemo-shared.test
tests/fcdemo-static.test

index 81ac6e28806985655d4d73cfa435acb7c7722d03..fae9c46ae959417e0374e0c74eff9218292fd490 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 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.
 
index 37a7c8d6a9d092649a0f3849eda75dd0890aaaf5..a6acfc9466b28c5a446c523a95e85029856f10c7 100644 (file)
@@ -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
index 2b3e4748fef153923267cf1f74c002e4b82158c4..497f7654dffc6481c087279601d097d666655388 100755 (executable)
 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
index ce2b68e530b8c16fccc97ea58aa4c5304de503e1..8026c83cb1559e4ab4132b0c3b6ac51616967454 100755 (executable)
 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
index 2f960b81add6f6ecdf86da2418780479131c2b97..0e84b0b4d93abfb4be15b02a928c093bb3bed4bb 100755 (executable)
 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