# Top level configure fragment for GNU FORTRAN.
#   Copyright (C) 1995 Free Software Foundation, Inc.

#This file is part of GNU Fortran.

#GNU Fortran is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2, or (at your option)
#any later version.

#GNU Fortran is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License
#along with GNU Fortran; see the file COPYING.  If not, write to
#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

# Configure looks for the existence of this file to auto-config each language.
# We define several parameters used by configure:
#
# language	- name of language as it would appear in $(LANGUAGES)
# compilers	- value to add to $(COMPILERS)
# stagestuff	- files to add to $(STAGESTUFF)
# diff_excludes	- files to ignore when building diffs between two versions.

language="f77"

compilers="f771"

case "$arguments" in
# *--enable-f2c* | *-enable-f2c*)
#   echo "f77: enabling f2c."
#  stagestuff="g77 g77-cross f771 libf2c.a f2c fc" ;;
#  stagestuff="g77 g77-cross f771 libf2c.a f2c" ;;
*)
  stagestuff="g77 g77-cross f771 libf2c.a" ;;
esac

diff_excludes=""

# Create the runtime library directory tree if necessary.
test -d f || mkdir f
test -d f/runtime || mkdir f/runtime
test -d f/runtime/libI77 || mkdir f/runtime/libI77
test -d f/runtime/libF77 || mkdir f/runtime/libF77

case "$srcdir" in
.) ;;
*) echo
   echo "Building f77 outside the source directory is only guaranteed with"
   echo "GNU make or a compatible VPATH mechanism."
   echo ;;
esac

if grep put_pending_sizes $srcdir/stor-layout.c >/dev/null; then true
else
   echo "You haven't applied the patches to the GCC distribution in"
   echo "$srcdir as described in README.g77 and f/gbe/README."
   echo ""
   exit 1
fi
