1 dnl Process this file with autoconf to produce a configure script.
3 AM_INIT_AUTOMAKE(file, 3.41)
4 AM_CONFIG_HEADER(config.h)
6 AC_MSG_CHECKING(for builtin ELF support)
8 [ --disable-elf disable builtin ELF support],
9 [if test "${enableval}" = yes; then
11 AC_DEFINE(BUILTIN_ELF)
17 AC_DEFINE(BUILTIN_ELF)
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
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
49 AM_CONDITIONAL(FSECT5, test x$fsect = x5)
51 dnl Checks for programs.
56 dnl Checks for headers
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)
68 dnl Checks for typedefs, structures, and compiler characteristics.
73 AC_STRUCT_TIMEZONE_DAYLIGHT
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)
81 if test $ac_cv_c_long_long = yes; then
82 long64='unsigned long long';
84 long64='unsigned long';
86 dnl This needs a patch to autoconf 2.13 acgeneral.m4
87 AC_CHECK_TYPE2_STDC(uint64_t, $long64)
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)
94 dnl Checks for functions
95 AC_CHECK_FUNCS(mmap strerror strtoul mkstemp getopt_long)
97 dnl Checks for libraries
98 AC_CHECK_LIB(z,gzopen)