]>
Commit | Line | Data |
---|---|---|
81fea2b1 | 1 | # Process this file with autoconf to produce a configure script. |
9e15ef05 | 2 | # Copyright (C) 1995, 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 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 | ||
168aa1fc | 22 | AC_PREREQ(2.12.1) |
81fea2b1 | 23 | AC_INIT(access_.c) |
e3a03859 | 24 | AC_CONFIG_HEADER(config.h:config.hin) |
81fea2b1 | 25 | |
14efa1dd KG |
26 | # These defines are necessary to get 64-bit file size support. |
27 | ||
28 | AC_DEFINE(_XOPEN_SOURCE, 500L, [Get Single Unix Specification semantics]) | |
29 | # The following is needed by irix6.2 so that struct timeval is declared. | |
30 | AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Get Single Unix Specification semantics]) | |
283c8d8d RE |
31 | # The following is needed by Solaris2.5.1 so that struct timeval is declared. |
32 | AC_DEFINE(__EXTENSIONS__, 1, [Solaris extensions]) | |
14efa1dd KG |
33 | AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support]) |
34 | ||
81fea2b1 | 35 | dnl Checks for programs. |
7c6b0e92 GK |
36 | |
37 | dnl FIXME AC_PROG_CC wants CC to be able to link things, but it may | |
38 | dnl not be able to. | |
39 | define([AC_PROG_CC_WORKS],[]) | |
40 | ||
81fea2b1 JL |
41 | # For g77 we'll set CC to point at the built gcc, but this will get it into |
42 | # the makefiles | |
43 | AC_PROG_CC | |
dedc4a53 JP |
44 | |
45 | LIBTOOL='$(SHELL) ../libtool' | |
46 | AC_SUBST(LIBTOOL) | |
47 | ||
81fea2b1 JL |
48 | dnl AC_C_CROSS |
49 | dnl Gives misleading `(cached)' message from the check. | |
50 | if test "$CROSS";then | |
51 | ac_cv_c_cross=yes | |
52 | else | |
53 | ac_cv_c_cross=no | |
54 | fi | |
55 | ||
b53c05f5 DL |
56 | test "$AR" || AR=ar |
57 | AC_SUBST(AR) | |
58 | AC_PROG_MAKE_SET | |
59 | ||
81fea2b1 JL |
60 | dnl This is only because we (horribly) punt the chmod job to the program at |
61 | dnl present. Note that the result of this test could be wrong in the cross | |
62 | dnl case. | |
63 | AC_PATH_PROG(ac_cv_prog_chmod, chmod, no) | |
64 | if test "$ac_cv_prog_chmod" != no || test "$CROSS"; then | |
65 | MAYBES=chmod_.o | |
66 | AC_DEFINE_UNQUOTED(CHMOD_PATH,"$ac_cv_prog_chmod") | |
67 | else | |
68 | MAYBES="" | |
69 | fi | |
70 | ||
81fea2b1 JL |
71 | dnl Checks for header files. |
72 | AC_HEADER_STDC | |
81fea2b1 JL |
73 | AC_HEADER_TIME |
74 | AC_CHECK_HEADERS(limits.h unistd.h sys/time.h string.h stdlib.h \ | |
75 | sys/param.h sys/times.h) | |
76 | ||
77 | dnl Checks for typedefs, structures, and compiler characteristics. | |
78 | AC_C_CONST | |
79 | AC_TYPE_SIZE_T | |
80 | AC_TYPE_MODE_T | |
81 | ||
82 | AC_TYPE_PID_T | |
83 | dnl The next 3 demand a dummy fileblocks.o (added to LIBOJS). We don't use | |
84 | dnl LIBOJS, though. | |
85 | AC_STRUCT_ST_BLKSIZE | |
86 | AC_STRUCT_ST_BLOCKS | |
87 | AC_STRUCT_ST_RDEV | |
88 | AC_STRUCT_TM | |
89 | ||
a60cb986 DL |
90 | dnl Some systems (SVR4, SCO OpenServer) need -lsocket for gethostname() |
91 | AC_CHECK_LIB(socket, gethostname, [LIBS="$LIBS -lsocket"]) | |
92 | ||
81fea2b1 JL |
93 | dnl Checks for library functions. |
94 | ||
95 | AC_CHECK_FUNCS(symlink getcwd getwd lstat gethostname strerror clock \ | |
9e15ef05 DL |
96 | getrusage times alarm getlogin getgid getuid kill link ttyname) |
97 | ||
98 | dnl The standard autoconf HAVE_STRUCT_TIMEZONE doesn't actually check | |
99 | dnl for struct timezone, as you might think. We also need to check how | |
100 | dnl to call gettimeofday if we have it. | |
101 | LIBU77_GETTIMEOFDAY | |
102 | ||
81fea2b1 JL |
103 | test $ac_cv_func_symlink = yes && MAYBES="$MAYBES symlnk_.o" |
104 | test $ac_cv_func_lstat = yes && MAYBES="$MAYBES lstat_.o" | |
105 | test $ac_cv_func_gethostname = yes && MAYBES="$MAYBES hostnm_.o" | |
106 | test $ac_cv_func_clock = yes && MAYBES="$MAYBES mclock_.o" | |
107 | AC_SUBST(MAYBES) | |
108 | ||
81fea2b1 JL |
109 | AC_SUBST(CROSS) |
110 | AC_SUBST(RANLIB) | |
111 | AC_SUBST(RANLIB_TEST) | |
7e29b261 | 112 | |
81fea2b1 | 113 | AC_OUTPUT(Makefile) |