Initial revision
[official-gcc.git] / gcc / f / config-lang.in
blob7a4f7ece2e7d99849caed067c24e29b15484bb7d
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)
9 #any later version.
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
19 #02111-1307, USA.
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
31 #   else
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."
34 #      echo ""
35 #      exit 1
36 #   fi
37 #else
38 #   if grep put_pending_sizes $srcdir/stor-layout.c >/dev/null; then true
39 #   else
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."
42 #      echo ""
43 #      exit 1
44 #   fi
45 #fi
47 language="f77"
49 compilers="f771\$(exeext)"
51 case "$arguments" in
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" ;;
58 esac
60 diff_excludes="-x \"f/g77.info*\""
62 # Create the runtime library directory tree if necessary.
63 test -d f || mkdir f
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
80 done
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)
92 done
94 case "$srcdir" in
95 .) ;;
96 *) echo
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."
99    echo ;;
100 esac