]> gcc.gnu.org Git - gcc.git/blame - libf2c/configure.in
Daily bump.
[gcc.git] / libf2c / configure.in
CommitLineData
81fea2b1 1# Process this file with autoconf to produce a configure script.
3508525e 2# Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
81fea2b1
JL
3# Contributed by Dave Love (d.love@dl.ac.uk).
4#
5#This file is part of GNU Fortran.
6#
7#GNU Fortran is free software; you can redistribute it and/or modify
8#it under the terms of the GNU General Public License as published by
9#the Free Software Foundation; either version 2, or (at your option)
10#any later version.
11#
12#GNU Fortran is distributed in the hope that it will be useful,
13#but WITHOUT ANY WARRANTY; without even the implied warranty of
14#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15#GNU General Public License for more details.
16#
17#You should have received a copy of the GNU General Public License
18#along with GNU Fortran; see the file COPYING. If not, write to
19#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20#02111-1307, USA.
21
3508525e 22AC_PREREQ(2.13)
81fea2b1
JL
23AC_INIT(libF77/Version.c)
24
ab300375
RL
25if test "${srcdir}" = "." ; then
26 if test "${with_target_subdir}" != "." ; then
27 topsrcdir=${with_multisrctop}../..
28 else
29 topsrcdir=${with_multisrctop}..
30 fi
31else
32 topsrcdir=${srcdir}/..
33fi
495e6ebb
DL
34dnl This is needed for a multilibbed build in the source tree so
35dnl that install-sh and config.sub get found.
36AC_CONFIG_AUX_DIR($topsrcdir)
ab300375 37
3508525e
MK
38# If the language specific compiler does not exist, but the "gcc" directory
39# does, we do not build anything. Note, $r is set by the top-level Makefile.
40# Note that when we look for the compiler, we search both with and without
41# extension to handle cross and canadian cross builds.
71205e0b
MH
42compiler_name=f771
43rm -f skip-this-dir
44AC_MSG_CHECKING(if compiler $compiler_name has been built)
d76e5e59
DL
45AC_CACHE_VAL(g77_cv_compiler_exists,
46[g77_cv_compiler_exists=yes
3508525e
MK
47if test -n "$r"; then
48 if test -d "$r"/gcc; then
49 if test -f "$r"/gcc/$compiler_name \
6de94858 50 || test -f "$r"/gcc/$compiler_name.exe; then
3508525e
MK
51 true
52 else
d76e5e59 53 g77_cv_compiler_exists=no
3508525e
MK
54 echo "rm -f config.cache config.log multilib.out" > skip-this-dir
55 fi
56 fi
57fi
58])
d76e5e59
DL
59AC_MSG_RESULT($g77_cv_compiler_exists)
60if test x$g77_cv_compiler_exists = xno
71205e0b 61then
3508525e
MK
62 rm -f Makefile conftest* confdefs* core
63 exit 0
71205e0b
MH
64fi
65
f30bc2e7
CB
66dnl Checks for programs.
67# For g77 we'll set CC to point at the built gcc, but this will get it into
68# the makefiles
69AC_PROG_CC
81fea2b1
JL
70
71dnl These should be inherited in the recursive make, but ensure they are
72dnl defined:
73test "$AR" || AR=ar
74AC_SUBST(AR)
75if test "$RANLIB"; then :
76 AC_SUBST(RANLIB)
81fea2b1 77else
81fea2b1
JL
78 AC_PROG_RANLIB
79fi
b53c05f5
DL
80AC_PROG_INSTALL
81AC_PROG_MAKE_SET
81fea2b1
JL
82
83dnl Checks for header files.
84# Sanity check for the cross-compilation case:
85AC_CHECK_HEADER(stdio.h,:,
86 [AC_MSG_ERROR([Can't find stdio.h.
87You must have a usable C system for the target already installed, at least
88including headers and, preferably, the library, before you can configure
89the G77 runtime system. If necessary, install gcc now with \`LANGUAGES=c',
90then the target library, then build with \`LANGUAGES=f77'.])])
91
3eb10f8a
CD
92dnl Checks for g77 integer types built into gcc's C front end.
93AC_MSG_CHECKING(for built-in g77 integer types)
94AC_CACHE_VAL(libf2c_cv_has_g77_builtin_types,
95[AC_TRY_COMPILE(,
96 [__g77_integer g77i;
97__g77_uinteger g77ui;
98__g77_longint g77l;
99__g77_ulongint g77ul;],
100 libf2c_cv_has_g77_builtin_types=yes,
101 libf2c_cv_has_g77_builtin_types=no)])
102AC_MSG_RESULT($libf2c_cv_has_g77_builtin_types)
103if test $libf2c_cv_has_g77_builtin_types = no; then
104 AC_MSG_ERROR([gcc doesn't define all of the built in types __g77_integer,
105__g77_uinteger, __g77_longint, and __g77_ulongint. You may not be using
106a new enough version of gcc, or your target may not have type sizes which
107accommodate those types.])
81fea2b1 108fi
81fea2b1 109
81fea2b1
JL
110# avoid confusion in case the `makefile's from the f2c distribution have
111# got put here
112test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori
113test -f libI77/makefile && mv libI77/makefile libI77/makefile.ori
114test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori
115
f1943b77
MH
116# Get the version trigger filename from the toplevel
117if [[ "${with_gcc_version_trigger+set}" = set ]]; then
118 gcc_version_trigger=$with_gcc_version_trigger
4746ee26 119 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
6174dcf3 120else
f1943b77
MH
121 gcc_version_trigger=
122 gcc_version=UNKNOWN
6174dcf3 123fi
f1943b77 124
6174dcf3 125AC_SUBST(gcc_version)
f1943b77 126AC_SUBST(gcc_version_trigger)
7982430b 127AC_CANONICAL_SYSTEM
487eb4b8 128AC_SUBST(target_alias)
b53c05f5 129AC_CONFIG_SUBDIRS(libU77 libI77 libF77)
9eb3f9c9 130# Do Makefile first since g2c.h depends on it and shouldn't get an
e7294982
DL
131# earlier timestamp. Of course, it does when the multilib gunk below
132# edits Makefile, sigh; see additional touch below.
9eb3f9c9 133AC_OUTPUT(Makefile g2c.h:g2c.hin,
ab300375
RL
134 [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
135if test -n "$CONFIG_FILES"; then
136 if test -n "${with_target_subdir}"; then
137 # FIXME: We shouldn't need to set ac_file
138 ac_file=Makefile
139 . ${topsrcdir}/config-ml.in
e7294982 140 touch g2c.h # to keep it more recent than Makefile
ab300375
RL
141 fi
142fi],
143srcdir=${srcdir}
144host=${host}
145target=${target}
146with_target_subdir=${with_target_subdir}
147with_multisubdir=${with_multisubdir}
148ac_configure_args="--enable-multilib ${ac_configure_args}"
149CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
150topsrcdir=${topsrcdir}
151)
152
81fea2b1
JL
153
154dnl Local Variables:
155dnl comment-start: "dnl "
156dnl comment-end: ""
157dnl comment-start-skip: "\\bdnl\\b\\s *"
158dnl End:
This page took 0.203038 seconds and 5 git commands to generate.