configure.ac 3.7 KB

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