configure.ac 4.4 KB

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