* c-decl.c (grokdeclarator): Make the TREE_TYPE for declarations
[official-gcc.git] / libf2c / libU77 / configure.in
blob03bfe660a5174853adb2a21cfdbf80f201fae7a5
1 # Process this file with autoconf to produce a configure script.
2 #   Copyright (C) 1995, 1998, 1999 Free Software Foundation, Inc.
3 #   Contributed by Dave Love (d.love@dl.ac.uk).
5 #This file is part of the GNU Fortran libU77 library.
7 #This library 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.
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 Library General Public License for more details.
17 #You should have received a copy of the GNU Library General Public
18 #License along with GNU Fortran; see the file COPYING.  If not, write
19 #to Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307,
20 #USA.
22 AC_PREREQ(2.12.1)
23 AC_INIT(access_.c)
24 AC_CONFIG_HEADER(config.h:config.hin)
26 dnl Checks for programs.
28 dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may
29 dnl not be able to.
30 define([AC_PROG_CC_WORKS],[])
32 # For g77 we'll set CC to point at the built gcc, but this will get it into
33 # the makefiles
34 AC_PROG_CC
35 dnl AC_C_CROSS
36 dnl Gives misleading `(cached)' message from the check.
37 if test "$CROSS";then
38   ac_cv_c_cross=yes
39 else
40   ac_cv_c_cross=no
43 test "$AR" || AR=ar
44 AC_SUBST(AR)
45 AC_PROG_MAKE_SET
47 dnl This is only because we (horribly) punt the chmod job to the program at
48 dnl present.  Note that the result of this test could be wrong in the cross
49 dnl case.
50 AC_PATH_PROG(ac_cv_prog_chmod, chmod, no)
51 if test "$ac_cv_prog_chmod" != no || test "$CROSS"; then
52   MAYBES=chmod_.o
53   AC_DEFINE_UNQUOTED(CHMOD_PATH,"$ac_cv_prog_chmod")
54 else
55   MAYBES=""
58 dnl Checks for header files.
59 AC_HEADER_STDC
60 dnl We could do this if we didn't know we were using gcc
61 dnl AC_MSG_CHECKING(for prototype-savvy compiler)
62 dnl AC_CACHE_VAL(ac_cv_sys_proto,                
63 dnl   [AC_TRY_LINK(,                             
64 dnl dnl looks screwy because TRY_LINK expects a function body
65 dnl    [return 0;} int foo (int * bar) {],       
66 dnl    ac_cv_sys_proto=yes,                      
67 dnl    [ac_cv_sys_proto=no                       
68 dnl     AC_DEFINE(KR_headers)])])                
69 dnl AC_MSG_RESULT($ac_cv_sys_proto)              
71 AC_HEADER_TIME
72 AC_CHECK_HEADERS(limits.h unistd.h sys/time.h string.h stdlib.h \
73   sys/param.h sys/times.h)
75 dnl Checks for typedefs, structures, and compiler characteristics.
76 AC_C_CONST
77 AC_TYPE_SIZE_T
78 AC_TYPE_MODE_T
80 AC_TYPE_PID_T
81 dnl The next 3 demand a dummy fileblocks.o (added to LIBOJS).  We don't use
82 dnl LIBOJS, though.
83 AC_STRUCT_ST_BLKSIZE
84 AC_STRUCT_ST_BLOCKS
85 AC_STRUCT_ST_RDEV
86 AC_STRUCT_TM
88 dnl Some systems (SVR4, SCO OpenServer) need -lsocket for gethostname()
89 AC_CHECK_LIB(socket, gethostname, [LIBS="$LIBS -lsocket"])
91 dnl Checks for library functions.
93 AC_CHECK_FUNCS(symlink getcwd getwd lstat gethostname strerror clock \
94   getrusage times alarm getlogin getgid getuid kill link ttyname)
96 dnl The standard autoconf HAVE_STRUCT_TIMEZONE doesn't actually check
97 dnl for struct timezone, as you might think.  We also need to check how
98 dnl to call gettimeofday if we have it.
99 LIBU77_GETTIMEOFDAY
101 test $ac_cv_func_symlink = yes && MAYBES="$MAYBES symlnk_.o"
102 test $ac_cv_func_lstat = yes && MAYBES="$MAYBES lstat_.o"
103 test $ac_cv_func_gethostname = yes && MAYBES="$MAYBES hostnm_.o"
104 test $ac_cv_func_clock = yes && MAYBES="$MAYBES mclock_.o"
105 AC_SUBST(MAYBES)
107 AC_SUBST(CROSS)
108 AC_SUBST(RANLIB)
109 AC_SUBST(RANLIB_TEST)
110 AC_OUTPUT(Makefile)