configure.in 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(file.c)
  3. AM_INIT_AUTOMAKE(file, 3.37)
  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. dnl FIXME: only found in standard headers!
  65. AC_CHECK_TYPE(uint8_t, unsigned char)
  66. AC_CHECK_TYPE(uint16_t, unsigned short)
  67. AC_CHECK_TYPE(uint32_t, unsigned int)
  68. AC_C_LONG_LONG
  69. if test $ac_cv_c_long_long = yes; then
  70. long64='unsigned long long';
  71. else
  72. long64='unsigned long';
  73. fi
  74. dnl This needs a patch to autoconf 2.13 acgeneral.m4
  75. AC_CHECK_TYPE2(uint64_t, $long64)
  76. AC_CHECK_SIZEOF_STDC_HEADERS(uint8_t, 0)
  77. AC_CHECK_SIZEOF_STDC_HEADERS(uint16_t, 0)
  78. AC_CHECK_SIZEOF_STDC_HEADERS(uint32_t, 0)
  79. AC_CHECK_SIZEOF_STDC_HEADERS(uint64_t, 0)
  80. dnl Checks for functions
  81. AC_CHECK_FUNCS(mmap strerror strtoul)
  82. AC_OUTPUT(Makefile)