1 dnl Process this file with autoconf to produce a configure script.
3 AM_INIT_AUTOMAKE(file, 4.10)
4 AM_CONFIG_HEADER(config.h)
7 AC_MSG_CHECKING(for builtin ELF support)
9 [ --disable-elf disable builtin ELF support],
10 [if test "${enableval}" = yes; then
12 AC_DEFINE(BUILTIN_ELF)
18 AC_DEFINE(BUILTIN_ELF)
21 AC_MSG_CHECKING(for ELF core file support)
22 AC_ARG_ENABLE(elf-core,
23 [ --disable-elf-core disable ELF core file support],
24 [if test "${enableval}" = yes; then
35 AC_MSG_CHECKING(for file formats in man section 5)
36 AC_ARG_ENABLE(fsect-man5,
37 [ --enable-fsect-man5 enable file formats in man section 5],
38 [if test "${enableval}" = yes; then
50 AM_CONDITIONAL(FSECT5, test x$fsect = x5)
52 dnl Checks for programs.
58 dnl Checks for headers
63 AC_CHECK_HEADERS(fcntl.h locale.h)
64 AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h)
65 AC_CHECK_HEADERS(stdint.h inttypes.h)
66 AC_CHECK_HEADERS(unistd.h)
67 AC_CHECK_HEADERS(getopt.h)
68 AC_CHECK_HEADERS(locale.h)
69 AC_CHECK_HEADERS(utime.h)
70 AC_CHECK_HEADERS(sys/utime.h)
71 AC_CHECK_HEADERS(wchar.h)
73 dnl Checks for typedefs, structures, and compiler characteristics.
78 AC_STRUCT_TIMEZONE_DAYLIGHT
82 AC_CHECK_TYPE_STDC(uint8_t, unsigned char)
83 AC_CHECK_TYPE_STDC(uint16_t, unsigned short)
84 AC_CHECK_TYPE_STDC(uint32_t, unsigned int)
85 AC_CHECK_TYPE_STDC(int32_t, int)
87 if test $ac_cv_c_long_long = yes; then
88 long64='unsigned long long';
90 long64='unsigned long';
92 dnl This needs a patch to autoconf 2.13 acgeneral.m4
93 AC_CHECK_TYPE2_STDC(uint64_t, $long64)
95 AC_CHECK_SIZEOF_STDC_HEADERS(uint8_t, 0)
96 AC_CHECK_SIZEOF_STDC_HEADERS(uint16_t, 0)
97 AC_CHECK_SIZEOF_STDC_HEADERS(uint32_t, 0)
98 AC_CHECK_SIZEOF_STDC_HEADERS(uint64_t, 0)
100 dnl Checks for functions
101 AC_CHECK_FUNCS(mmap strerror strtoul mbrtowc mkstemp getopt_long utimes utime wcwidth)
103 dnl Checks for libraries
104 AC_CHECK_LIB(z,gzopen)
106 AC_OUTPUT(Makefile src/Makefile magic/Makefile doc/Makefile)