Merge from vendor branch LIBSTDC++:
[dragonfly.git] / contrib / libf2c / libU77 / configure.in
1 # Process this file with autoconf to produce a configure script.
2 #   Copyright (C) 1995, 1998 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_PREREQ(2.12.1)
23 AC_INIT(access_.c)
24 AC_CONFIG_HEADER(config.h:config.hin)
25
26 dnl Checks for programs.
27 # For g77 we'll set CC to point at the built gcc, but this will get it into
28 # the makefiles
29 AC_PROG_CC
30 dnl AC_C_CROSS
31 dnl Gives misleading `(cached)' message from the check.
32 if test "$CROSS";then
33   ac_cv_c_cross=yes
34 else
35   ac_cv_c_cross=no
36 fi
37
38 test "$AR" || AR=ar
39 AC_SUBST(AR)
40 AC_PROG_MAKE_SET
41
42 dnl This is only because we (horribly) punt the chmod job to the program at
43 dnl present.  Note that the result of this test could be wrong in the cross
44 dnl case.
45 AC_PATH_PROG(ac_cv_prog_chmod, chmod, no)
46 if test "$ac_cv_prog_chmod" != no || test "$CROSS"; then
47   MAYBES=chmod_.o
48   AC_DEFINE_UNQUOTED(CHMOD_PATH,"$ac_cv_prog_chmod")
49 else
50   MAYBES=""
51 fi
52
53 dnl Checks for header files.
54 AC_HEADER_STDC
55 dnl We could do this if we didn't know we were using gcc
56 dnl AC_MSG_CHECKING(for prototype-savvy compiler)
57 dnl AC_CACHE_VAL(ac_cv_sys_proto,                
58 dnl   [AC_TRY_LINK(,                             
59 dnl dnl looks screwy because TRY_LINK expects a function body
60 dnl    [return 0;} int foo (int * bar) {],       
61 dnl    ac_cv_sys_proto=yes,                      
62 dnl    [ac_cv_sys_proto=no                       
63 dnl     AC_DEFINE(KR_headers)])])                
64 dnl AC_MSG_RESULT($ac_cv_sys_proto)              
65
66 AC_HEADER_TIME
67 AC_CHECK_HEADERS(limits.h unistd.h sys/time.h string.h stdlib.h \
68   sys/param.h sys/times.h)
69
70 dnl Checks for typedefs, structures, and compiler characteristics.
71 AC_C_CONST
72 AC_TYPE_SIZE_T
73 AC_TYPE_MODE_T
74
75 AC_TYPE_PID_T
76 dnl The next 3 demand a dummy fileblocks.o (added to LIBOJS).  We don't use
77 dnl LIBOJS, though.
78 AC_STRUCT_ST_BLKSIZE
79 AC_STRUCT_ST_BLOCKS
80 AC_STRUCT_ST_RDEV
81 AC_STRUCT_TM
82
83 dnl Some systems (SVR4, SCO OpenServer) need -lsocket for gethostname()
84 AC_CHECK_LIB(socket, gethostname, [LIBS="$LIBS -lsocket"])
85
86 dnl Checks for library functions.
87
88 AC_CHECK_FUNCS(symlink getcwd getwd lstat gethostname strerror clock \
89   getrusage times alarm getlogin getgid getuid kill link ttyname \
90   gettimeofday)
91 test $ac_cv_func_symlink = yes && MAYBES="$MAYBES symlnk_.o"
92 test $ac_cv_func_lstat = yes && MAYBES="$MAYBES lstat_.o"
93 test $ac_cv_func_gethostname = yes && MAYBES="$MAYBES hostnm_.o"
94 test $ac_cv_func_clock = yes && MAYBES="$MAYBES mclock_.o"
95 AC_SUBST(MAYBES)
96
97 LIBU77_HAVE_STRUCT_TIMEZONE
98
99 AC_SUBST(CROSS)
100 AC_SUBST(RANLIB)
101 AC_SUBST(RANLIB_TEST)
102 AC_OUTPUT(Makefile)