OSDN Git Service

6caf4e31a399389ddbadc51a68ec0bac02231e63
[pf3gnuchains/gcc-fork.git] / libf2c / libU77 / configure.in
1 # Process this file with autoconf to produce a configure script.
2 #   Copyright (C) 1995 Free Software Foundation, Inc.
3 #   Contributed by Dave Love (d.love@dl.ac.uk).
4 #
5 #This file is part of the GNU Fortran libU77 library.
6 #
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.
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 Library General Public License for more details.
16 #
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.
21
22 AC_INIT(access_.c)
23 AC_CONFIG_HEADER(config.h)
24
25 dnl Checks for programs.
26 # For g77 we'll set CC to point at the built gcc, but this will get it into
27 # the makefiles
28 AC_PROG_CC
29 dnl AC_C_CROSS
30 dnl Gives misleading `(cached)' message from the check.
31 if test "$CROSS";then
32   ac_cv_c_cross=yes
33 else
34   ac_cv_c_cross=no
35 fi
36
37 dnl This is only because we (horribly) punt the chmod job to the program at
38 dnl present.  Note that the result of this test could be wrong in the cross
39 dnl case.
40 AC_PATH_PROG(ac_cv_prog_chmod, chmod, no)
41 if test "$ac_cv_prog_chmod" != no || test "$CROSS"; then
42   MAYBES=chmod_.o
43   AC_DEFINE_UNQUOTED(CHMOD_PATH,"$ac_cv_prog_chmod")
44 else
45   MAYBES=""
46 fi
47
48 dnl for g77 build maybe use $(RANLIB_FOR_TARGET) always (like wise AR)
49 if test "$ac_cv_c_cross" = yes; then
50   RANLIB=$RANLIB_FOR_TARGET
51   AR=$AR_FOR_TARGET
52   AC_SUBST(RANLIB)
53 else
54   AC_PROG_RANLIB
55   AR=ar
56   RANLIB_TEST=true
57 fi
58 AC_SUBST(AR)
59 dnl not needed for g77
60 dnl AC_SUBST(AR_FOR_TARGET)
61 dnl AC_SUBST(RANLIB_FOR_TARGET)
62 dnl AC_SUBST(RANLIB_TEST_FOR_TARGET)
63 dnl not needed for g77?
64 dnl AC_PROG_MAKE_SET
65
66 dnl Checks for libraries.
67
68 dnl Checks for header files.
69 AC_HEADER_STDC
70 dnl We could do this if we didn't know we were using gcc
71 dnl AC_MSG_CHECKING(for prototype-savvy compiler)
72 dnl AC_CACHE_VAL(ac_cv_sys_proto,                
73 dnl   [AC_TRY_LINK(,                             
74 dnl dnl looks screwy because TRY_LINK expects a function body
75 dnl    [return 0;} int foo (int * bar) {],       
76 dnl    ac_cv_sys_proto=yes,                      
77 dnl    [ac_cv_sys_proto=no                       
78 dnl     AC_DEFINE(KR_headers)])])                
79 dnl AC_MSG_RESULT($ac_cv_sys_proto)              
80
81 AC_HEADER_TIME
82 AC_CHECK_HEADERS(limits.h unistd.h sys/time.h string.h stdlib.h \
83   sys/param.h sys/times.h)
84
85 dnl Checks for typedefs, structures, and compiler characteristics.
86 AC_C_CONST
87 AC_TYPE_SIZE_T
88 AC_TYPE_MODE_T
89
90 AC_TYPE_PID_T
91 dnl The next 3 demand a dummy fileblocks.o (added to LIBOJS).  We don't use
92 dnl LIBOJS, though.
93 AC_STRUCT_ST_BLKSIZE
94 AC_STRUCT_ST_BLOCKS
95 AC_STRUCT_ST_RDEV
96 AC_STRUCT_TM
97
98 dnl Checks for library functions.
99
100 AC_CHECK_FUNCS(symlink getcwd getwd lstat gethostname strerror clock \
101   getrusage times alarm getlogin getgid getuid kill link ttyname)
102 test $ac_cv_func_symlink = yes && MAYBES="$MAYBES symlnk_.o"
103 test $ac_cv_func_lstat = yes && MAYBES="$MAYBES lstat_.o"
104 test $ac_cv_func_gethostname = yes && MAYBES="$MAYBES hostnm_.o"
105 test $ac_cv_func_clock = yes && MAYBES="$MAYBES mclock_.o"
106 AC_SUBST(MAYBES)
107
108
109 AC_SUBST(CROSS)
110 AC_SUBST(RANLIB)
111 AC_SUBST(RANLIB_TEST)
112
113 AC_OUTPUT(Makefile)