configure.ac 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.60)
  3. AC_INIT([dpkg], m4_esyscmd([./get-version]), [debian-dpkg@lists.debian.org])
  4. AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_CONFIG_AUX_DIR([build-aux])
  7. AC_USE_SYSTEM_EXTENSIONS
  8. AM_INIT_AUTOMAKE([1.8 foreign nostdinc])
  9. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
  10. [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
  11. AM_GNU_GETTEXT_VERSION([0.18])
  12. AM_GNU_GETTEXT([external])
  13. # Allow compilation without optional programs
  14. DPKG_WITH_PROG([dselect])
  15. DPKG_WITH_PROG([start-stop-daemon])
  16. DPKG_WITH_PROG([update-alternatives])
  17. DPKG_WITH_PROG([install-info])
  18. # Allow alternate directories
  19. DPKG_WITH_DIR([admindir], [${localstatedir}/lib/${PACKAGE_NAME}],
  20. [dpkg database directory [LOCALSTATEDIR/lib/dpkg]])
  21. DPKG_WITH_DIR([logdir], [${localstatedir}/log],
  22. [system logging directory [LOCALSTATEDIR/log]])
  23. # Checks for programs.
  24. AC_PROG_CC
  25. AC_PROG_CXX
  26. AC_PROG_LEX
  27. AC_PROG_RANLIB
  28. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  29. AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
  30. DPKG_PROG_PO4A
  31. DPKG_PROG_PERL
  32. DPKG_PROG_POD2MAN
  33. DPKG_CODE_COVERAGE
  34. # Checks for operating system services and capabilities.
  35. AC_SYS_LARGEFILE
  36. # Checks for libraries.
  37. DPKG_LIB_ZLIB
  38. DPKG_LIB_BZ2
  39. DPKG_LIB_SELINUX
  40. if test "x$build_dselect" = "xyes"; then
  41. DPKG_LIB_CURSES
  42. fi
  43. if test "x$build_start_stop_daemon" = "xyes"; then
  44. DPKG_LIB_SSD
  45. fi
  46. # Checks for header files.
  47. AC_HEADER_STDC
  48. AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h kvm.h \
  49. sys/cdefs.h sys/syscall.h linux/fiemap.h])
  50. # Checks for typedefs, structures, and compiler characteristics.
  51. AC_C_BIGENDIAN
  52. AC_C_CONST
  53. AC_C_INLINE
  54. AC_C_VOLATILE
  55. DPKG_C_C99
  56. AC_TYPE_MODE_T
  57. AC_TYPE_PID_T
  58. AC_TYPE_SIZE_T
  59. DPKG_TYPE_PTRDIFF_T
  60. AC_CHECK_SIZEOF([unsigned int])
  61. AC_CHECK_SIZEOF([unsigned long])
  62. DPKG_DECL_SYS_SIGLIST
  63. # Checks for library functions.
  64. DPKG_FUNC_VA_COPY
  65. DPKG_FUNC_C99_SNPRINTF
  66. DPKG_CHECK_DECL([offsetof], [stddef.h])
  67. DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
  68. DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
  69. DPKG_CHECK_PROGNAME
  70. DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
  71. strnlen strerror strsignal asprintf \
  72. scandir alphasort unsetenv])
  73. AC_CHECK_DECLS([strnlen], [[#include <string.h>]])
  74. AC_CHECK_FUNCS([strtoul strtoimax isascii memcpy setsid getdtablesize \
  75. getprogname getexecname lutimes posix_fadvise])
  76. DPKG_MMAP
  77. # Checks for the build machinery.
  78. AC_DEFINE(LIBDPKG_VOLATILE_API, 1, [Acknowledge the volatility of the API.])
  79. DPKG_COMPILER_WARNINGS
  80. DPKG_COMPILER_OPTIMISATIONS
  81. DPKG_LINKER_OPTIMISATIONS
  82. DPKG_ARCHITECTURE
  83. AC_CONFIG_FILES([ Makefile
  84. dpkg-deb/Makefile
  85. dpkg-split/Makefile
  86. dselect/Makefile
  87. dselect/methods/Makefile
  88. dselect/po/Makefile.in
  89. lib/Makefile
  90. lib/compat/Makefile
  91. lib/dpkg/Makefile
  92. lib/dpkg/libdpkg.pc
  93. lib/dpkg/test/Makefile
  94. doc/Doxyfile
  95. man/Makefile
  96. po/Makefile.in
  97. scripts/Makefile
  98. scripts/mk/Makefile
  99. scripts/po/Makefile.in
  100. src/Makefile
  101. utils/Makefile ])
  102. AC_CONFIG_HEADERS([config.h])
  103. AC_OUTPUT