configure.in 2.1 KB

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