configure.in 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(file.c)
  3. AM_INIT_AUTOMAKE(file, 3.27)
  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. dnl Checks for programs.
  32. AC_PROG_CC
  33. AC_PROG_INSTALL
  34. AC_PROG_LN_S
  35. dnl Checks for headers
  36. AC_HEADER_STDC
  37. AC_HEADER_MAJOR
  38. AC_HEADER_SYS_WAIT
  39. AC_CHECK_HEADERS(unistd.h)
  40. dnl Checks for typedefs, structures, and compiler characteristics.
  41. AC_C_CONST
  42. AC_TYPE_OFF_T
  43. AC_TYPE_SIZE_T
  44. AC_STRUCT_ST_RDEV
  45. dnl FIXME: only found in standard headers!
  46. AC_CHECK_TYPE(uint8_t, unsigned char)
  47. AC_CHECK_TYPE(uint16_t, unsigned short)
  48. AC_CHECK_TYPE(uint32_t, unsigned int)
  49. AC_C_LONG_LONG
  50. if test $ac_cv_c_long_long = yes; then
  51. long64='unsigned long long';
  52. else
  53. long64='unsigned long';
  54. fi
  55. dnl This needs a patch to autoconf 2.13 acgeneral.m4
  56. AC_CHECK_TYPE2(uint64_t, $long64)
  57. AC_CHECK_SIZEOF_STDC_HEADERS(uint8_t, 0)
  58. AC_CHECK_SIZEOF_STDC_HEADERS(uint16_t, 0)
  59. AC_CHECK_SIZEOF_STDC_HEADERS(uint32_t, 0)
  60. AC_CHECK_SIZEOF_STDC_HEADERS(uint64_t, 0)
  61. dnl Checks for functions
  62. AC_CHECK_FUNCS(strerror strtoul)
  63. AC_OUTPUT(Makefile)