1 # Top level configure fragment for GNU FORTRAN.
2 # Copyright (C) 1995-1997 Free Software Foundation, Inc.
4 #This file is part of GNU Fortran.
6 #GNU Fortran is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 2, or (at your option)
11 #GNU Fortran is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with GNU Fortran; see the file COPYING. If not, write to
18 #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21 # Configure looks for the existence of this file to auto-config each language.
22 # We define several parameters used by configure:
24 # language - name of language as it would appear in $(LANGUAGES)
25 # compilers - value to add to $(COMPILERS)
26 # stagestuff - files to add to $(STAGESTUFF)
27 # diff_excludes - files to ignore when building diffs between two versions.
29 #if grep DECL_STATIC_CONSTRUCTOR $srcdir/tree.h >/dev/null; then
30 # if grep flag_move_all_movables $srcdir/toplev.c >/dev/null; then true
32 # echo "You haven't applied the patches to the GCC 2.7.x distribution in"
33 # echo "$srcdir as described in g77/README.g77 and gcc/f/gbe/README."
38 # if grep put_pending_sizes $srcdir/stor-layout.c >/dev/null; then true
40 # echo "You haven't applied the patches to the GCC 2.6.x distribution in"
41 # echo "$srcdir as described in g77/README.g77 and gcc/f/gbe/README."
49 compilers="f771\$(exeext)"
52 # *--enable-f2c* | *-enable-f2c*)
53 # echo "f77: enabling f2c."
54 # stagestuff="g77 g77-cross f771 libf2c.a f2c fc" ;;
55 # stagestuff="g77 g77-cross f771 libf2c.a f2c" ;;
57 stagestuff="g77\$(exeext) g77-cross\$(exeext) f771\$(exeext) libf2c.a" ;;
60 diff_excludes="-x \"f/g77.info*\""
62 # Create the runtime library directory tree if necessary.
64 test -d f/runtime || mkdir f/runtime
65 test -d f/runtime/libF77 || mkdir f/runtime/libF77
66 test -d f/runtime/libI77 || mkdir f/runtime/libI77
67 test -d f/runtime/libU77 || mkdir f/runtime/libU77
69 # Need to make top-level stageN directory trees, else if needed
70 # later by gcc/Makefile, it'll make only the first levels and
71 # the language subdirectory levels, not the runtime stuff.
72 for stageN in stage1 stage2 stage3 stage4
74 test -d $stageN || mkdir $stageN
75 test -d $stageN/f || mkdir $stageN/f
76 test -d $stageN/f/runtime || mkdir $stageN/f/runtime
77 test -d $stageN/f/runtime/libF77 || mkdir $stageN/f/runtime/libF77
78 test -d $stageN/f/runtime/libI77 || mkdir $stageN/f/runtime/libI77
79 test -d $stageN/f/runtime/libU77 || mkdir $stageN/f/runtime/libU77
82 # Make links into top-level stageN from target trees.
83 for stageN in stage1 stage2 stage3 stage4 include
85 $remove -f f/$stageN f/runtime/$stageN f/runtime/libF77/$stageN \
86 f/runtime/libI77/$stageN f/runtime/libU77/$stageN
87 (cd f; $symbolic_link ../$stageN . 2>/dev/null)
88 (cd f/runtime; $symbolic_link ../$stageN . 2>/dev/null)
89 (cd f/runtime/libF77; $symbolic_link ../$stageN . 2>/dev/null)
90 (cd f/runtime/libI77; $symbolic_link ../$stageN . 2>/dev/null)
91 (cd f/runtime/libU77; $symbolic_link ../$stageN . 2>/dev/null)
97 echo "Building f77 outside the source directory is likely to not work"
98 echo "unless you are using GNU make or a compatible VPATH mechanism."