File: configure.in

package info (click to toggle)
cpio 2.4.2-23
  • links: PTS
  • area: main
  • in suites: slink
  • size: 836 kB
  • ctags: 704
  • sloc: ansic: 7,997; makefile: 208; sh: 176
file content (67 lines) | stat: -rw-r--r-- 1,792 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
dnl Process this file with autoconf to produce a configure script.
AC_INIT(cpio.h)
PROGS="cpio"
AC_SUBST(PROGS)dnl
AC_PROG_CC
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL
AC_AIX
AC_MINIX
AC_ISC_POSIX
AC_TYPE_SIGNAL
AC_HEADER_MAJOR

AC_CHECKING(for remote tape and socket header files)
AC_CHECK_HEADER(sys/mtio.h,
[AC_DEFINE(HAVE_SYS_MTIO_H)
PROGS="$PROGS mt"
AC_TRY_CPP([#include <sgtty.h>
#include <sys/socket.h>], PROGS="$PROGS rmt")])

AC_CHECKING(for remote shell)
if test -f /usr/ucb/rsh || test -f /usr/bin/remsh || test -f /usr/bin/rsh ||
  test -f /usr/bsd/rsh || test -f /usr/bin/nsh; then
  RTAPELIB=rtapelib.o
else
  AC_CHECK_HEADER(netdb.h, AC_DEFINE(HAVE_NETDB_H) RTAPELIB=rtapelib.o,
    AC_DEFINE(NO_REMOTE))
fi
AC_SUBST(RTAPELIB)dnl

AC_C_CONST
AC_TYPE_UID_T
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h string.h fcntl.h sys/io/trioctl.h)
AC_REPLACE_FUNCS(bcopy mkdir strdup)

AC_MSG_CHECKING(for utime.h)
AC_TRY_COMPILE([#include <sys/types.h>
#include <utime.h>], [struct utimbuf foo],
  [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UTIME_H)], [AC_MSG_RESULT(no)])

dnl Checks for fnmatch
have_fnmatch=no
AC_MSG_CHECKING(for working fnmatch)
dnl Some versions of Soalris have a fnmatch() function, but it doesn't work!
dnl So we run a test program.  If we're cross-compiling, do it th old way.
AC_TRY_RUN([
main() {
if (fnmatch ("a*", "abc", 0) == 0) return 0;
else return 1; }],
have_fnmatch=yes, have_fnmatch=no, have_fnmatch=no)
if test $have_fnmatch = yes ; then
  AC_MSG_RESULT(yes)
  FNMATCH=""
else
  AC_MSG_RESULT(no)
  FNMATCH="fnmatch.o"
fi
AC_SUBST(FNMATCH)
AC_CHECK_FUNCS(strerror lchown)
AC_FUNC_VPRINTF
AC_FUNC_ALLOCA
AC_HEADER_DIRENT
AC_CHECK_LIB(nsl, gethostname, [LIBS="$LIBS -lnsl"])
AC_CHECK_LIB(socket, setsockopt, [LIBS="$LIBS -lsocket"])
AC_OUTPUT(Makefile)