Add per-device polling support.
[dragonfly.git] / contrib / file / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(file.c)
3 AM_INIT_AUTOMAKE(file, 3.41)
4 AM_CONFIG_HEADER(config.h)
5
6 AC_MSG_CHECKING(for builtin ELF support)
7 AC_ARG_ENABLE(elf,
8 [  --disable-elf            disable builtin ELF support],
9 [if test "${enableval}" = yes; then
10   AC_MSG_RESULT(yes)
11   AC_DEFINE(BUILTIN_ELF)
12 else
13   AC_MSG_RESULT(no)
14 fi], [
15   # enable by default
16   AC_MSG_RESULT(yes)
17   AC_DEFINE(BUILTIN_ELF)
18 ])
19
20 AC_MSG_CHECKING(for ELF core file support)
21 AC_ARG_ENABLE(elf-core,
22 [  --disable-elf-core       disable ELF core file support],
23 [if test "${enableval}" = yes; then
24   AC_MSG_RESULT(yes)
25   AC_DEFINE(ELFCORE)
26 else
27   AC_MSG_RESULT(no)
28 fi], [
29   # enable by default
30   AC_MSG_RESULT(yes)
31   AC_DEFINE(ELFCORE)
32 ])
33
34 AC_MSG_CHECKING(for file formats in man section 5)
35 AC_ARG_ENABLE(fsect-man5,
36 [  --enable-fsect-man5      enable file formats in man section 5],
37 [if test "${enableval}" = yes; then
38   AC_MSG_RESULT(yes)
39   fsect=5
40 else
41   AC_MSG_RESULT(no)
42   fsect=4
43 fi], [
44   # disable by default
45   AC_MSG_RESULT(no)
46   fsect=4
47 ])
48 AC_SUBST(fsect)
49 AM_CONDITIONAL(FSECT5, test x$fsect = x5)
50
51 dnl Checks for programs.
52 AC_PROG_CC
53 AC_PROG_INSTALL
54 AC_PROG_LN_S
55
56 dnl Checks for headers
57 AC_HEADER_STDC
58 AC_HEADER_MAJOR
59 AC_HEADER_SYS_WAIT
60 AC_HEADER_STDINT
61 AC_CHECK_HEADERS(fcntl.h locale.h)
62 AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h)
63 AC_CHECK_HEADERS(stdint.h inttypes.h)
64 AC_CHECK_HEADERS(unistd.h)
65 AC_CHECK_HEADERS(getopt.h)
66 AC_CHECK_HEADERS(locale.h)
67
68 dnl Checks for typedefs, structures, and compiler characteristics.
69 AC_C_CONST
70 AC_TYPE_OFF_T
71 AC_TYPE_SIZE_T
72 AC_STRUCT_ST_RDEV
73 AC_STRUCT_TIMEZONE_DAYLIGHT
74 AC_SYS_LARGEFILE
75
76 AC_CHECK_TYPE_STDC(uint8_t, unsigned char)
77 AC_CHECK_TYPE_STDC(uint16_t, unsigned short)
78 AC_CHECK_TYPE_STDC(uint32_t, unsigned int)
79 AC_CHECK_TYPE_STDC(int32_t, int)
80 AC_C_LONG_LONG
81 if test $ac_cv_c_long_long = yes; then
82   long64='unsigned long long';
83 else
84   long64='unsigned long';
85 fi
86 dnl This needs a patch to autoconf 2.13 acgeneral.m4
87 AC_CHECK_TYPE2_STDC(uint64_t, $long64)
88
89 AC_CHECK_SIZEOF_STDC_HEADERS(uint8_t, 0)
90 AC_CHECK_SIZEOF_STDC_HEADERS(uint16_t, 0)
91 AC_CHECK_SIZEOF_STDC_HEADERS(uint32_t, 0)
92 AC_CHECK_SIZEOF_STDC_HEADERS(uint64_t, 0)
93
94 dnl Checks for functions
95 AC_CHECK_FUNCS(mmap strerror strtoul mkstemp getopt_long)
96
97 dnl Checks for libraries
98 AC_CHECK_LIB(z,gzopen)
99
100 AC_OUTPUT(Makefile)