configure.ac 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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_SUBST([PACKAGE_COPYRIGHT_HOLDER], ['Dpkg Developers'])
  6. AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
  7. AC_CONFIG_MACRO_DIR([m4])
  8. AC_CONFIG_AUX_DIR([build-aux])
  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. # Shared libraries are disabled on purpose, currently there is no ABI stability
  17. # guarantee, and it will be broken at will. The infrastructure is in place just
  18. # to be able to test that its future activation will work.
  19. LT_INIT([disable-shared])
  20. DPKG_BUILD_SHARED_LIBS
  21. DPKG_LINKER_VERSION_SCRIPT
  22. # Allow compilation without optional programs
  23. DPKG_BUILD_PROG([dselect])
  24. DPKG_BUILD_PROG([start-stop-daemon])
  25. DPKG_BUILD_PROG([update-alternatives])
  26. # Allow alternate directories
  27. DPKG_WITH_DIR([pkgconfdir], [${sysconfdir}/${PACKAGE_NAME}],
  28. [dpkg configuration directory [SYSCONFDIR/dpkg]])
  29. DPKG_WITH_DIR([admindir], [${localstatedir}/lib/${PACKAGE_NAME}],
  30. [dpkg database directory [LOCALSTATEDIR/lib/dpkg]])
  31. DPKG_WITH_DIR([logdir], [${localstatedir}/log],
  32. [system logging directory [LOCALSTATEDIR/log]])
  33. # Set default dpkg-deb values
  34. DPKG_DEB_COMPRESSOR([xz])
  35. DPKG_DEB_PROG_TAR
  36. # Checks for programs.
  37. AC_PROG_CC
  38. DPKG_C_C99
  39. AC_PROG_CXX
  40. DPKG_CXX_CXX11
  41. AC_PROG_LEX
  42. DPKG_DIST_CHECK([test "$LEX" = ":"], [lex program required])
  43. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  44. AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
  45. DPKG_PROG_PO4A
  46. DPKG_PROG_PERL
  47. DPKG_PROG_POD2MAN
  48. DPKG_CODE_COVERAGE
  49. # Checks for operating system services and capabilities.
  50. AC_SYS_LARGEFILE
  51. # Checks for libraries.
  52. DPKG_LIB_ZLIB
  53. DPKG_LIB_BZ2
  54. DPKG_LIB_LZMA
  55. DPKG_LIB_SELINUX
  56. if test "x$build_dselect" = "xyes"; then
  57. DPKG_LIB_CURSES
  58. fi
  59. if test "x$build_start_stop_daemon" = "xyes"; then
  60. DPKG_LIB_SSD
  61. fi
  62. # Checks for header files.
  63. AC_HEADER_STDC
  64. AC_CHECK_HEADERS([stddef.h error.h err.h locale.h libintl.h kvm.h \
  65. sys/param.h sys/sysctl.h sys/syscall.h sys/user.h \
  66. sys/proc.h sys/pstat.h linux/fiemap.h])
  67. # Checks for typedefs, structures, and compiler characteristics.
  68. AC_C_BIGENDIAN
  69. AC_C_CONST
  70. AC_C_INLINE
  71. AC_C_VOLATILE
  72. AC_TYPE_MODE_T
  73. AC_TYPE_PID_T
  74. AC_TYPE_SIZE_T
  75. DPKG_TYPES_U_INT_T
  76. DPKG_TYPE_PTRDIFF_T
  77. AC_CHECK_SIZEOF([unsigned int])
  78. AC_CHECK_SIZEOF([unsigned long])
  79. DPKG_DECL_SYS_SIGLIST
  80. DPKG_DECL_SYS_ERRLIST
  81. # Checks for library functions.
  82. DPKG_FUNC_VA_COPY
  83. DPKG_FUNC_C99_SNPRINTF
  84. DPKG_CHECK_DECL([offsetof], [stddef.h])
  85. DPKG_CHECK_DECL([makedev], [sys/types.h])
  86. DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
  87. DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
  88. DPKG_CHECK_DECL([O_NOFOLLOW], [fcntl.h])
  89. DPKG_CHECK_DECL([F_ALLOCSP64], [fcntl.h])
  90. DPKG_CHECK_DECL([F_PREALLOCATE], [fcntl.h])
  91. DPKG_CHECK_DECL([P_tmpdir], [stdio.h])
  92. DPKG_CHECK_PROGNAME
  93. DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
  94. strnlen strndup strerror strsignal asprintf \
  95. scandir alphasort unsetenv])
  96. AC_CHECK_DECLS([strnlen], [[#include <string.h>]])
  97. AC_CHECK_FUNCS([memcpy lchown],
  98. [], [AC_MSG_ERROR([missing required function])])
  99. AC_CHECK_FUNCS([strtoimax isascii setsid getdtablesize \
  100. getprogname getexecname lutimes \
  101. fallocate posix_fallocate posix_fadvise])
  102. DPKG_MMAP
  103. # Checks for the build machinery.
  104. AC_DEFINE(LIBDPKG_VOLATILE_API, 1, [Acknowledge the volatility of the API.])
  105. DPKG_COMPILER_WARNINGS
  106. DPKG_COMPILER_OPTIMISATIONS
  107. DPKG_LINKER_OPTIMISATIONS
  108. DPKG_ARCHITECTURE
  109. AC_CONFIG_FILES([ Makefile
  110. dpkg-deb/Makefile
  111. dpkg-split/Makefile
  112. dselect/Makefile
  113. dselect/methods/Makefile
  114. dselect/po/Makefile.in
  115. lib/Makefile
  116. lib/compat/Makefile
  117. lib/dpkg/Makefile
  118. lib/dpkg/libdpkg.pc
  119. lib/dpkg/t/Makefile
  120. doc/Doxyfile
  121. man/Makefile
  122. po/Makefile.in
  123. scripts/Makefile
  124. scripts/mk/Makefile
  125. scripts/po/Makefile.in
  126. src/Makefile
  127. utils/Makefile ])
  128. AC_CONFIG_HEADERS([config.h])
  129. AC_OUTPUT