Updated from libc
[make.git] / configure.in
blob40c0552ea99e6f278ff8dece340718461e8edb18
1 dnl Process this file with autoconf to produce a configure script.
2 AC_REVISION([$Id: configure.in,v 1.52 1996/07/20 09:30:04 roland Exp $])
3 AC_PREREQ(2.10)dnl              dnl Minimum Autoconf version required.
4 AC_INIT(vpath.c)dnl             dnl A distinctive file to look for in srcdir.
5 AC_CONFIG_HEADER(config.h)
6 AC_CONFIG_SUBDIRS(glob)         dnl Run configure in glob subdirectory.
8 AC_PROG_MAKE_SET
9 AC_PROG_CC
10 AC_PROG_INSTALL
11 AC_PROG_CPP                     dnl Later checks need this.
12 AC_AIX
13 AC_ISC_POSIX
14 AC_MINIX
15 AC_HEADER_STDC
16 AC_HEADER_DIRENT
17 AC_TYPE_UID_T                   dnl Also does gid_t.
18 AC_TYPE_PID_T
19 AC_TYPE_SIGNAL
20 AC_CHECK_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
21                  sys/timeb.h)
22 AC_PROG_CC_C_O
23 AC_C_CONST                      dnl getopt needs this.
24 AC_HEADER_STAT
26 AC_SUBST(LIBOBJS)
28 AC_DEFUN(AC_CHECK_SYMBOL, [dnl
29 AC_MSG_CHECKING(for $1)
30 AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
31 AC_TRY_LINK(, [extern char *sys_siglist[]; puts(*sys_siglist);],
32             ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)])
33 if test "$ac_cv_check_symbol_$1" = yes; then
34 changequote(,)dnl
35   ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'`
36 changequote([,])dnl
37   AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol})
39 AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
41 AC_CHECK_FUNCS(psignal mktemp \
42                dup2 getcwd sigsetmask getgroups setlinebuf \
43                seteuid setegid setreuid setregid strerror strsignal)
44 AC_CHECK_SYMBOL(sys_siglist)
45 AC_FUNC_ALLOCA
46 AC_FUNC_VFORK
47 AC_FUNC_SETVBUF_REVERSED
48 AC_FUNC_GETLOADAVG
49 AC_FUNC_STRCOLL
51 # Check out the wait reality.
52 AC_CHECK_HEADERS(sys/wait.h) AC_CHECK_FUNCS(waitpid wait3)
53 AC_MSG_CHECKING(for union wait)
54 AC_CACHE_VAL(make_cv_union_wait, [dnl
55 AC_TRY_LINK([#include <sys/types.h>
56 #include <sys/wait.h>],
57             [union wait status; int pid; pid = wait (&status);
58 #ifdef WEXITSTATUS
59 /* Some POSIXoid systems have both the new-style macros and the old
60    union wait type, and they do not work together.  If union wait
61    conflicts with WEXITSTATUS et al, we don't want to use it at all.  */
62 if (WEXITSTATUS (status) != 0) pid = -1;
63 #ifdef WTERMSIG
64 /* If we have WEXITSTATUS and WTERMSIG, just use them on ints.  */
65 -- blow chunks here --
66 #endif
67 #endif
68 #ifdef HAVE_WAITPID
69 /* Make sure union wait works with waitpid.  */
70 pid = waitpid (-1, &status, 0);
71 #endif
73             [make_cv_union_wait=yes], [make_cv_union_wait=no])])
74 if test "$make_cv_union_wait" = yes; then
75   AC_DEFINE(HAVE_UNION_WAIT)
77 AC_MSG_RESULT($make_cv_union_wait)
79 AC_DECL_SYS_SIGLIST
81 # The presence of the following is not meant to imply
82 # that make necessarily works on those systems.
83 AC_CHECK_LIB(sun, getpwnam)
85 AC_SUBST(REMOTE) REMOTE=stub
86 AC_ARG_WITH(customs, [export jobs with the Customs daemon (NOT SUPPORTED)],
87 [REMOTE=cstms LIBS="$LIBS libcustoms.a"])
89 echo checking for location of SCCS get command
90 if test -f /usr/sccs/get; then
91   SCCS_GET=/usr/sccs/get
92   AC_DEFINE(SCCS_GET, "/usr/sccs/get")
93 else
94   SCCS_GET=get
95   AC_DEFINE(SCCS_GET, "get")
97 ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
98 if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
99    test -f s.conftest; then
100   # We successfully created an SCCS file.
101   echo checking if SCCS get command understands -G
102   if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
103      test -f conftoast; then
104     AC_DEFINE(SCCS_GET_MINUS_G)
105   fi
107 rm -f s.conftest conftoast
109 AC_OUTPUT(Makefile build.sh, [
110 # Makefile uses this timestamp file to know when to remake Makefile,
111 # build.sh, and glob/Makefile.
112 touch stamp-config])
114 dnl Local Variables:
115 dnl comment-start: "dnl "
116 dnl comment-end: ""
117 dnl comment-start-skip: "\\bdnl\\b\\s *"
118 dnl compile-command: "make configure config.h.in"
119 dnl End: