configure.ac 3.6 KB

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