specified by the user.
Fix a bug: use the cached value to set FLIBS.
+2000-06-08 Steven G. Johnson <stevenj@alum.mit.edu>
+
+ * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Don't override FLIBS if
+ specified by the user.
+ Fix a bug: use the cached value to set FLIBS.
+
2000-06-07 Dave Love <fx@gnu.org>
* aclang.m4 (AC_PROG_F77): Check for f95 and fc too.
AC_REQUIRE([AC_CYGWIN])dnl
AC_CACHE_CHECK([for Fortran 77 libraries],
ac_cv_flibs,
-[AC_LANG_PUSH(Fortran 77)
+[if test "x$FLIBS" != "x"; then
+ ac_cv_flibs="$FLIBS" # Let the user override the test.
+else
+AC_LANG_PUSH(Fortran 77)
# This is the simplest of all Fortran 77 programs.
cat >conftest.$ac_ext <<EOF
sed -n -e 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%\1%p'`
test "x$ac_ld_run_path" != x && FLIBS="$ac_ld_run_path $FLIBS"
ac_cv_flibs=$FLIBS
+fi # test "x$FLIBS" = "x"
])
+FLIBS="$ac_cv_flibs"
AC_SUBST(FLIBS)
])# AC_F77_LIBRARY_LDFLAGS
AC_REQUIRE([AC_CYGWIN])dnl
AC_CACHE_CHECK([for Fortran 77 libraries],
ac_cv_flibs,
-[AC_LANG_PUSH(Fortran 77)
+[if test "x$FLIBS" != "x"; then
+ ac_cv_flibs="$FLIBS" # Let the user override the test.
+else
+AC_LANG_PUSH(Fortran 77)
# This is the simplest of all Fortran 77 programs.
cat >conftest.$ac_ext <<EOF
sed -n -e 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%\1%p'`
test "x$ac_ld_run_path" != x && FLIBS="$ac_ld_run_path $FLIBS"
ac_cv_flibs=$FLIBS
+fi # test "x$FLIBS" = "x"
])
+FLIBS="$ac_cv_flibs"
AC_SUBST(FLIBS)
])# AC_F77_LIBRARY_LDFLAGS
AC_REQUIRE([AC_CYGWIN])dnl
AC_CACHE_CHECK([for Fortran 77 libraries],
ac_cv_flibs,
-[AC_LANG_PUSH(Fortran 77)
+[if test "x$FLIBS" != "x"; then
+ ac_cv_flibs="$FLIBS" # Let the user override the test.
+else
+AC_LANG_PUSH(Fortran 77)
# This is the simplest of all Fortran 77 programs.
cat >conftest.$ac_ext <<EOF
sed -n -e 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%\1%p'`
test "x$ac_ld_run_path" != x && FLIBS="$ac_ld_run_path $FLIBS"
ac_cv_flibs=$FLIBS
+fi # test "x$FLIBS" = "x"
])
+FLIBS="$ac_cv_flibs"
AC_SUBST(FLIBS)
])# AC_F77_LIBRARY_LDFLAGS
AC_REQUIRE([AC_CYGWIN])dnl
AC_CACHE_CHECK([for Fortran 77 libraries],
ac_cv_flibs,
-[AC_LANG_PUSH(Fortran 77)
+[if test "x$FLIBS" != "x"; then
+ ac_cv_flibs="$FLIBS" # Let the user override the test.
+else
+AC_LANG_PUSH(Fortran 77)
# This is the simplest of all Fortran 77 programs.
cat >conftest.$ac_ext <<EOF
sed -n -e 's%^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$%\1%p'`
test "x$ac_ld_run_path" != x && FLIBS="$ac_ld_run_path $FLIBS"
ac_cv_flibs=$FLIBS
+fi # test "x$FLIBS" = "x"
])
+FLIBS="$ac_cv_flibs"
AC_SUBST(FLIBS)
])# AC_F77_LIBRARY_LDFLAGS