(read_makefile, parse_file_seq) [__MS_DOS__]: Don't see : as separator in
[make.git] / configure.in
blobbef1ae6bbf72f3ddde9840a02531727dd1ad12c5
1 dnl Process this file with autoconf to produce a configure script.
2 AC_REVISION([$Id: configure.in,v 1.47 1995/02/22 03:18:18 roland Alpha $])
3 AC_PREREQ(2.1)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_GETGROUPS
19 AC_TYPE_PID_T
20 AC_TYPE_SIGNAL
21 AC_CHECK_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
22                  sys/timeb.h)
23 AC_PROG_CC_C_O
24 AC_C_CONST                      dnl getopt needs this.
25 AC_HEADER_STAT
27 AC_SUBST(LIBOBJS)
29 AC_DEFUN(AC_CHECK_SYMBOL, [dnl
30 AC_MSG_CHECKING(for $1)
31 AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
32 AC_TRY_LINK(, [extern char *sys_siglist[]; puts(*sys_siglist);],
33             ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)])
34 if test "$ac_cv_check_symbol_$1" = yes; then
35 changequote(,)dnl
36   ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'`
37 changequote([,])dnl
38   AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol})
40 AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
42 AC_CHECK_FUNCS(getdtablesize psignal mktemp \
43                dup2 getcwd sigsetmask getgroups setlinebuf \
44                seteuid setegid setreuid setregid strerror strsignal)
45 AC_CHECK_SYMBOL(sys_siglist)
46 AC_CHECK_SYMBOL(_sys_siglist)
47 AC_FUNC_ALLOCA
48 AC_FUNC_VFORK
49 AC_FUNC_SETVBUF_REVERSED
50 AC_FUNC_GETLOADAVG
51 AC_FUNC_STRCOLL
53 if test $ac_cv_func_getdtablesize = no; then
54   AC_MSG_CHECKING(for sysconf (_SC_OPEN_MAX))
55   AC_CACHE_VAL(make_cv_sysconf_open_max, [dnl
56   AC_TRY_LINK([#include <unistd.h>], [int max = sysconf (_SC_OPEN_MAX);],
57               [make_cv_sysconf_open_max=yes], [make_cv_sysconf_open_max=no])])
58   if test $make_cv_sysconf_open_max = yes; then
59     AC_DEFINE(HAVE_SYSCONF_OPEN_MAX)
60   fi
61   AC_MSG_RESULT($make_cv_sysconf_open_max)
64 # Check out the wait reality.
65 AC_CHECK_HEADERS(sys/wait.h) AC_CHECK_FUNCS(waitpid wait3)
66 AC_MSG_CHECKING(for union wait)
67 AC_CACHE_VAL(make_cv_union_wait, [dnl
68 AC_TRY_LINK([#include <sys/types.h>
69 #include <sys/wait.h>],
70             [union wait status; int pid; pid = wait (&status);
71 #ifdef WEXITSTATUS
72 /* Some POSIXoid systems have both the new-style macros and the old
73    union wait type, and they do not work together.  If union wait
74    conflicts with WEXITSTATUS et al, we don't want to use it at all.  */
75 if (WEXITSTATUS (status) != 0) pid = -1;
76 #ifdef WTERMSIG
77 /* If we have WEXITSTATUS and WTERMSIG, just use them on ints.  */
78 -- blow chunks here --
79 #endif
80 #endif
81 #ifdef HAVE_WAITPID
82 /* Make sure union wait works with waitpid.  */
83 pid = waitpid (-1, &status, 0);
84 #endif
86             [make_cv_union_wait=yes], [make_cv_union_wait=no])])
87 if test "$make_cv_union_wait" = yes; then
88   AC_DEFINE(HAVE_UNION_WAIT)
90 AC_MSG_RESULT($make_cv_union_wait)
92 AC_DECL_SYS_SIGLIST
94 # The presence of the following is not meant to imply
95 # that make necessarily works on those systems.
96 AC_CHECK_LIB(sun, getpwnam)
98 AC_SUBST(REMOTE) REMOTE=stub
99 AC_ARG_WITH(customs, [export jobs with the Customs daemon (NOT SUPPORTED)],
100 [REMOTE=cstms LIBS="$LIBS libcustoms.a"])
102 echo checking for location of SCCS get command
103 if test -f /usr/sccs/get; then
104   SCCS_GET=/usr/sccs/get
105   AC_DEFINE(SCCS_GET, "/usr/sccs/get")
106 else
107   SCCS_GET=get
108   AC_DEFINE(SCCS_GET, "get")
110 ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
111 if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
112    test -f s.conftest; then
113   # We successfully created an SCCS file.
114   echo checking if SCCS get command understands -G
115   if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
116      test -f conftoast; then
117     AC_DEFINE(SCCS_GET_MINUS_G)
118   fi
120 rm -f s.conftest conftoast
122 AC_OUTPUT(Makefile build.sh, [
123 # Makefile uses this timestamp file to know when to remake Makefile,
124 # build.sh, and glob/Makefile.
125 touch stamp-config])
127 dnl Local Variables:
128 dnl comment-start: "dnl "
129 dnl comment-end: ""
130 dnl comment-start-skip: "\\bdnl\\b\\s *"
131 dnl compile-command: "make configure config.h.in"
132 dnl End: