Formerly default.c.~31~
[make.git] / configure.in
blob4fbe258b41a268d27dc518a241f471fb004c10e3
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(vpath.c)                dnl A distinctive file to look for in srcdir.
3 AC_CONFIG_HEADER(config.h)
5 # We want these before the checks, so the checks can modify their values.
6 test -z "$CFLAGS" && CFLAGS=-g AC_SUBST(CFLAGS)
7 test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)
9 AC_PROG_CC
10 AC_PROG_INSTALL
11 AC_PROG_RANLIB
12 AC_PROG_CPP                     dnl Later checks need this.
13 AC_AIX
14 AC_ISC_POSIX
15 AC_MINIX
16 AC_STDC_HEADERS
17 AC_DIR_HEADER
18 AC_UID_T                        dnl Also does gid_t.
19 AC_GETGROUPS_T
20 AC_PID_T
21 AC_RETSIGTYPE
22 AC_HAVE_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
23                 sys/timeb.h)
24 AC_MINUS_C_MINUS_O
25 AC_CONST                        dnl getopt needs this.
26 AC_STAT_MACROS_BROKEN
28 AC_SUBST(LIBOBJS)
30 AC_HAVE_FUNCS(getdtablesize sys_siglist _sys_siglist psignal \
31               dup2 getcwd sigsetmask getgroups setlinebuf \
32               setreuid setregid strerror)
33 AC_ALLOCA
34 AC_VFORK
35 AC_SETVBUF_REVERSED
36 AC_GETLOADAVG
37 AC_STRCOLL
39 dnl Check out the wait reality.
40 AC_HAVE_HEADERS(sys/wait.h) AC_HAVE_FUNCS(waitpid wait3)
41 AC_COMPILE_CHECK(union wait, [#include <sys/types.h>
42 #include <sys/wait.h>],
43                  [union wait status; int pid; pid = wait (&status);
44 #ifdef WEXITSTATUS
45 /* Some POSIXoid systems have both the new-style macros and the old
46    union wait type, and they do not work together.  If union wait
47    conflicts with WEXITSTATUS et al, we don't want to use it at all.  */
48 if (WEXITSTATUS (status) != 0) pid = -1;
49 #endif
50 #ifdef HAVE_WAITPID
51 /* Make sure union wait works with waitpid.  */
52 pid = waitpid (-1, &status, 0);
53 #endif
55                  AC_DEFINE(HAVE_UNION_WAIT))
57 AC_COMPILE_CHECK(sys_siglist declaration in signal.h or unistd.h,
58                  [#include <signal.h>
59 /* NetBSD declares sys_siglist in <unistd.h>.  */
60 #ifdef HAVE_UNISTD_H
61 #include <unistd.h>
62 #endif], [char *msg = *(sys_siglist + 1);],
63                  AC_DEFINE(SYS_SIGLIST_DECLARED))
65 # The presence of the following is not meant to imply
66 # that make necessarily works on those systems.
67 AC_DYNIX_SEQ
68 AC_XENIX_DIR
69 AC_IRIX_SUN
71 AC_SUBST(REMOTE) REMOTE=stub
72 AC_WITH(customs, [REMOTE=cstms
73 LIBS="$LIBS libcustoms.a"])
75 echo checking for location of SCCS get command
76 if test -f /usr/sccs/get; then
77   AC_DEFINE(SCCS_GET, "/usr/sccs/get")
78 else
79   AC_DEFINE(SCCS_GET, "get")
81 ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
82 if { /usr/sccs/admin -n s.conftest >/dev/null 2>&1 ||
83      admin -n s.conftest >/dev/null 2>&1 } && test -f s.conftest; then
84   # We successfully created an SCCS file.
85   echo checking if SCCS get command understands -G
86   if $SCCS_GET -Gconftoast s.conftest && test -f conftoast; then
87     : # All is well.
88   else
89     AC_DEFINE(SCCS_GET_MINUS_G)
90   fi
92 rm -f s.conftest conftoast
94 AC_OUTPUT(Makefile build.sh glob/Makefile, [
95 # Makefile uses this timestamp file to know when to remake Makefile,
96 # build.sh, and glob/Makefile.
97 touch stamp-config])
99 dnl Local Variables:
100 dnl comment-start: "dnl "
101 dnl comment-end: ""
102 dnl comment-start-skip: "\\bdnl\\b\\s *"
103 dnl compile-command: "make configure config.h.in"
104 dnl End: