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)
12 AC_PROG_CPP dnl Later checks need this.
18 AC_UID_T dnl Also does gid_t.
22 AC_HAVE_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
25 AC_CONST dnl getopt needs this.
30 AC_HAVE_FUNCS(getdtablesize sys_siglist _sys_siglist psignal \
31 dup2 getcwd sigsetmask getgroups setlinebuf \
32 setreuid setregid strerror)
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);
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;
51 /* Make sure union wait works with waitpid. */
52 pid = waitpid (-1, &status, 0);
55 AC_DEFINE(HAVE_UNION_WAIT))
57 AC_SYS_SIGLIST_DECLARED
59 # The presence of the following is not meant to imply
60 # that make necessarily works on those systems.
65 AC_SUBST(REMOTE) REMOTE=stub
66 AC_WITH(customs, [REMOTE=cstms
67 LIBS="$LIBS libcustoms.a"])
69 echo checking for location of SCCS get command
70 if test -f /usr/sccs/get; then
71 SCCS_GET=/usr/sccs/get
72 AC_DEFINE(SCCS_GET, "/usr/sccs/get")
75 AC_DEFINE(SCCS_GET, "get")
77 ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
78 if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
79 test -f s.conftest; then
80 # We successfully created an SCCS file.
81 echo checking if SCCS get command understands -G
82 if $SCCS_GET s.conftest -Gconftoast >/dev/null 2>&1 &&
83 test -f conftoast; then
84 AC_DEFINE(SCCS_GET_MINUS_G)
87 rm -f s.conftest conftoast
89 AC_OUTPUT(Makefile build.sh glob/Makefile, [
90 # Makefile uses this timestamp file to know when to remake Makefile,
91 # build.sh, and glob/Makefile.
95 dnl comment-start: "dnl "
97 dnl comment-start-skip: "\\bdnl\\b\\s *"
98 dnl compile-command: "make configure config.h.in"