(read_makefile): For bogus line starting with tab, ignore it if blank after
[make.git] / configure.in
blobea35a6096fafe8d3ab176a1e2b601bb888b1945b
1 dnl Process this file with autoconf to produce a configure script.
2 AC_REVISION([$Id: configure.in,v 1.45 1995/02/05 23:50:12 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 # We want these before the checks, so the checks can modify their values.
9 test -z "$CFLAGS" && CFLAGS=-g AC_SUBST(CFLAGS)
10 test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)
12 AC_PROG_MAKE_SET
13 AC_PROG_CC
14 AC_PROG_INSTALL
15 AC_PROG_CPP                     dnl Later checks need this.
16 AC_AIX
17 AC_ISC_POSIX
18 AC_MINIX
19 AC_HEADER_STDC
20 AC_HEADER_DIRENT
21 AC_TYPE_UID_T                   dnl Also does gid_t.
22 AC_TYPE_GETGROUPS
23 AC_TYPE_PID_T
24 AC_TYPE_SIGNAL
25 AC_CHECK_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
26                  sys/timeb.h)
27 AC_PROG_CC_C_O
28 AC_C_CONST                      dnl getopt needs this.
29 AC_HEADER_STAT
31 AC_SUBST(LIBOBJS)
33 AC_DEFUN(AC_CHECK_SYMBOL, [dnl
34 AC_MSG_CHECKING(for $1)
35 AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
36 AC_TRY_LINK(, [extern char *sys_siglist[]; puts(*sys_siglist);],
37             ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)])
38 if test "$ac_cv_check_symbol_$1" = yes; then
39 changequote(,)dnl
40   ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'`
41 changequote([,])dnl
42   AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol})
44 AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
46 AC_CHECK_FUNCS(getdtablesize psignal mktemp \
47                dup2 getcwd sigsetmask getgroups setlinebuf \
48                seteuid setegid setreuid setregid strerror)
49 AC_CHECK_SYMBOL(sys_siglist)
50 AC_CHECK_SYMBOL(_sys_siglist)
51 AC_FUNC_ALLOCA
52 AC_FUNC_VFORK
53 AC_FUNC_SETVBUF_REVERSED
54 AC_FUNC_GETLOADAVG
55 AC_FUNC_STRCOLL
57 if test $ac_cv_func_getdtablesize = no; then
58   AC_MSG_CHECKING(for sysconf (_SC_OPEN_MAX))
59   AC_CACHE_VAL(make_cv_sysconf_open_max, [dnl
60   AC_TRY_LINK([#include <unistd.h>], [int max = sysconf (_SC_OPEN_MAX);],
61               [make_cv_sysconf_open_max=yes], [make_cv_sysconf_open_max=no])])
62   if test $make_cv_sysconf_open_max = yes; then
63     AC_DEFINE(HAVE_SYSCONF_OPEN_MAX)
64   fi
65   AC_MSG_RESULT($make_cv_sysconf_open_max)
68 # Check out the wait reality.
69 AC_CHECK_HEADERS(sys/wait.h) AC_CHECK_FUNCS(waitpid wait3)
70 AC_MSG_CHECKING(for union wait)
71 AC_CACHE_VAL(make_cv_union_wait, [dnl
72 AC_TRY_LINK([#include <sys/types.h>
73 #include <sys/wait.h>],
74             [union wait status; int pid; pid = wait (&status);
75 #ifdef WEXITSTATUS
76 /* Some POSIXoid systems have both the new-style macros and the old
77    union wait type, and they do not work together.  If union wait
78    conflicts with WEXITSTATUS et al, we don't want to use it at all.  */
79 if (WEXITSTATUS (status) != 0) pid = -1;
80 #ifdef WTERMSIG
81 /* If we have WEXITSTATUS and WTERMSIG, just use them on ints.  */
82 -- blow chunks here --
83 #endif
84 #endif
85 #ifdef HAVE_WAITPID
86 /* Make sure union wait works with waitpid.  */
87 pid = waitpid (-1, &status, 0);
88 #endif
90             [make_cv_union_wait=yes], [make_cv_union_wait=no])])
91 if test "$make_cv_union_wait" = yes; then
92   AC_DEFINE(HAVE_UNION_WAIT)
94 AC_MSG_RESULT($make_cv_union_wait)
96 AC_DECL_SYS_SIGLIST
98 # The presence of the following is not meant to imply
99 # that make necessarily works on those systems.
100 AC_CHECK_LIB(sun, getpwnam)
102 AC_SUBST(REMOTE) REMOTE=stub
103 AC_ARG_WITH(customs, [export jobs with the Customs daemon (NOT SUPPORTED)],
104 [REMOTE=cstms LIBS="$LIBS libcustoms.a"])
106 echo checking for location of SCCS get command
107 if test -f /usr/sccs/get; then
108   SCCS_GET=/usr/sccs/get
109   AC_DEFINE(SCCS_GET, "/usr/sccs/get")
110 else
111   SCCS_GET=get
112   AC_DEFINE(SCCS_GET, "get")
114 ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
115 if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
116    test -f s.conftest; then
117   # We successfully created an SCCS file.
118   echo checking if SCCS get command understands -G
119   if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
120      test -f conftoast; then
121     AC_DEFINE(SCCS_GET_MINUS_G)
122   fi
124 rm -f s.conftest conftoast
126 AC_OUTPUT(Makefile build.sh, [
127 # Makefile uses this timestamp file to know when to remake Makefile,
128 # build.sh, and glob/Makefile.
129 touch stamp-config])
131 dnl Local Variables:
132 dnl comment-start: "dnl "
133 dnl comment-end: ""
134 dnl comment-start-skip: "\\bdnl\\b\\s *"
135 dnl compile-command: "make configure config.h.in"
136 dnl End: