xref: /386bsd/usr/src/usr.bin/tar/junk/configure.in (revision a2142627)
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(tar.h)
3PROGS="tar"
4AC_SUBST(PROGS)dnl
5AC_PROG_CC
6AC_PROG_CPP
7AC_GCC_TRADITIONAL
8AC_PROG_INSTALL
9AC_PROG_YACC
10AC_AIX
11AC_MINIX
12AC_ISC_POSIX
13AC_RETSIGTYPE
14AC_SIZE_T
15AC_MAJOR_HEADER
16AC_DIR_HEADER
17# The 3-argument open happens to go along with the O_* defines,
18# which are easier to check for.
19AC_HEADER_CHECK(fcntl.h, open_header=fcntl.h, open_header=sys/file.h)
20AC_COMPILE_CHECK(3-argument open,
21[#include <$open_header>], [int x = O_RDONLY;], , AC_DEFINE(EMUL_OPEN3))
22AC_REMOTE_TAPE
23AC_RSH
24AC_STDC_HEADERS
25AC_UNISTD_H
26echo checking for getgrgid declaration
27AC_HEADER_EGREP(getgrgid, grp.h, AC_DEFINE(HAVE_GETGRGID))
28echo checking for getpwuid declaration
29AC_HEADER_EGREP(getpwuid, pwd.h, AC_DEFINE(HAVE_GETPWUID))
30AC_HAVE_HEADERS(string.h limits.h)
31echo checking default archive
32# This might guess wrong, but it's not very important.
33for dev in rmt8 rmt0 rmt0h rct0 rst0 tape rct/c7d0s2
34do
35  if test -n "`ls /dev/$dev 2>/dev/null`"; then
36    DEF_AR_FILE=/dev/$dev
37    break
38  fi
39done
40if test -z "$DEF_AR_FILE"; then
41  DEF_AR_FILE=-
42fi
43
44AC_SUBST(DEF_AR_FILE)dnl
45AC_HAVE_FUNCS(strstr valloc mkdir mknod rename ftruncate ftime getcwd)
46AC_VPRINTF
47AC_ALLOCA
48echo checking for BSD
49( test -f /vmunix || test -f /sdmach || test -f /../../mach ) && AC_DEFINE(BSD42)
50echo checking for HP-UX
51test -f /hp-ux && test ! -f /vmunix && MALLOC=malloc.o
52AC_SUBST(MALLOC)
53AC_XENIX_DIR
54AC_HAVE_LIBRARY(socket, [LIBS="$LIBS -lsocket"])
55AC_HAVE_LIBRARY(nsl, [LIBS="$LIBS -lnsl"])
56AC_OUTPUT(Makefile)
57