configure.ac 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. # Do not unconditionally use the following macro, as Debian jessie does not
  13. # have a recent enough gettext.
  14. m4_ifdef([AM_GNU_GETTEXT_REQUIRE_VERSION],
  15. [AM_GNU_GETTEXT_REQUIRE_VERSION([0.19])])
  16. # We cannot remove the following macro due to backwards compatibility reasons.
  17. # In the future when the gettext version is bumped, we have to set the above
  18. # macro unconditionally to the minimal version, and set the below to 0.19.6,
  19. # the first version introducing the AM_GNU_GETTEXT_REQUIRE_VERSION macro.
  20. AM_GNU_GETTEXT_VERSION([0.19])
  21. AM_GNU_GETTEXT([external])
  22. DPKG_DIST_CHECK([test "$GMSGFMT" = ":" && test "$USE_NLS" = "yes"],
  23. [gettext required when NLS support enabled])
  24. # Shared libraries are disabled on purpose, currently there is no ABI stability
  25. # guarantee, and it will be broken at will. The infrastructure is in place just
  26. # to be able to test that its future activation will work.
  27. AM_PROG_AR
  28. LT_INIT([disable-shared])
  29. DPKG_BUILD_SHARED_LIBS
  30. DPKG_LINKER_VERSION_SCRIPT
  31. # Allow compilation without optional programs
  32. DPKG_BUILD_PROG([dselect])
  33. DPKG_BUILD_PROG([start-stop-daemon])
  34. DPKG_BUILD_PROG([update-alternatives])
  35. DPKG_BUILD_DEVEL_DOCS
  36. # Allow alternate directories
  37. DPKG_WITH_DIR([devlibdir], [${libdir}],
  38. [dpkg development library directory [LIBDIR]])
  39. DPKG_WITH_DIR([pkgconfdir], [${sysconfdir}/${PACKAGE_NAME}],
  40. [dpkg configuration directory [SYSCONFDIR/dpkg]])
  41. DPKG_WITH_DIR([admindir], [${localstatedir}/lib/${PACKAGE_NAME}],
  42. [dpkg database directory [LOCALSTATEDIR/lib/dpkg]])
  43. DPKG_WITH_DIR([logdir], [${localstatedir}/log],
  44. [system logging directory [LOCALSTATEDIR/log]])
  45. # Set default dpkg-deb values
  46. DPKG_DEB_COMPRESSOR([xz])
  47. DPKG_DEB_PROG_TAR
  48. # Checks for programs.
  49. AC_PROG_CC
  50. DPKG_C_C99
  51. AC_PROG_CXX
  52. DPKG_CXX_CXX11
  53. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  54. AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
  55. DPKG_PROG_PO4A
  56. DPKG_PROG_PERL
  57. DPKG_PROG_POD2MAN
  58. DPKG_CODE_COVERAGE
  59. # Checks for operating system services and capabilities.
  60. AC_SYS_LARGEFILE
  61. # Checks for libraries.
  62. DPKG_LIB_MD
  63. DPKG_LIB_ZLIB
  64. DPKG_LIB_BZ2
  65. DPKG_LIB_LZMA
  66. DPKG_LIB_SELINUX
  67. if test "x$build_dselect" = "xyes"; then
  68. DPKG_LIB_CURSES
  69. fi
  70. if test "x$build_start_stop_daemon" = "xyes"; then
  71. DPKG_LIB_PS
  72. DPKG_LIB_KVM
  73. fi
  74. # Checks for header files.
  75. AC_HEADER_STDC
  76. AC_CHECK_HEADERS([stddef.h error.h err.h locale.h libintl.h kvm.h \
  77. sys/param.h sys/sysctl.h sys/syscall.h sys/user.h \
  78. sys/proc.h sys/pstat.h linux/fiemap.h])
  79. # Checks for typedefs, structures, and compiler characteristics.
  80. AC_C_BIGENDIAN
  81. AC_C_CONST
  82. AC_C_INLINE
  83. AC_C_VOLATILE
  84. AC_TYPE_MODE_T
  85. AC_TYPE_PID_T
  86. AC_TYPE_SIZE_T
  87. DPKG_TYPES_U_INT_T
  88. DPKG_TYPE_PTRDIFF_T
  89. AC_CHECK_SIZEOF([unsigned int])
  90. AC_CHECK_SIZEOF([unsigned long])
  91. DPKG_DECL_SYS_SIGLIST
  92. DPKG_DECL_SYS_ERRLIST
  93. # Checks for library functions.
  94. DPKG_FUNC_VA_COPY
  95. DPKG_FUNC_C99_SNPRINTF
  96. DPKG_CHECK_DECL([offsetof], [stddef.h])
  97. DPKG_CHECK_DECL([makedev], [sys/types.h])
  98. DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
  99. DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
  100. DPKG_CHECK_DECL([O_NOFOLLOW], [fcntl.h])
  101. DPKG_CHECK_DECL([F_ALLOCSP64], [fcntl.h])
  102. DPKG_CHECK_DECL([F_PREALLOCATE], [fcntl.h])
  103. DPKG_CHECK_DECL([P_tmpdir], [stdio.h])
  104. DPKG_CHECK_PROGNAME
  105. DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
  106. strnlen strndup strerror strsignal asprintf \
  107. scandir alphasort unsetenv])
  108. AC_CHECK_FUNCS([memcpy lchown],
  109. [], [AC_MSG_ERROR([missing required function])])
  110. AC_CHECK_FUNCS([strtoimax isascii setsid getdtablesize \
  111. getprogname getexecname lutimes \
  112. fallocate posix_fallocate posix_fadvise])
  113. DPKG_MMAP
  114. # Checks for the build machinery.
  115. AC_DEFINE(LIBDPKG_VOLATILE_API, 1, [Acknowledge the volatility of the API.])
  116. DPKG_COMPILER_WARNINGS
  117. DPKG_COMPILER_OPTIMISATIONS
  118. DPKG_LINKER_OPTIMISATIONS
  119. DPKG_ARCHITECTURE
  120. AC_DEFINE([PACKAGE_RELEASE], [PACKAGE_VERSION " (" ARCHITECTURE ")"],
  121. [Define the project release information, version and architecture])
  122. AC_CONFIG_FILES([ Makefile
  123. dpkg-deb/Makefile
  124. dpkg-split/Makefile
  125. dselect/Makefile
  126. dselect/methods/Makefile
  127. dselect/po/Makefile.in
  128. lib/Makefile
  129. lib/compat/Makefile
  130. lib/dpkg/Makefile
  131. lib/dpkg/libdpkg.pc
  132. lib/dpkg/t/Makefile
  133. doc/Doxyfile
  134. man/Makefile
  135. po/Makefile.in
  136. scripts/Makefile
  137. scripts/mk/Makefile
  138. scripts/po/Makefile.in
  139. src/Makefile
  140. utils/Makefile ])
  141. AC_CONFIG_HEADERS([config.h])
  142. AC_OUTPUT
  143. # Print the current configuration
  144. cat <<CONFIG
  145. Configuration:
  146. Features:
  147. NLS . . . . . . . . . . . . . : $USE_NLS
  148. unicode support . . . . . . . : $USE_UNICODE
  149. development documentation . . : $build_devel_docs
  150. code coverage . . . . . . . . : $enable_coverage
  151. build shared libraries . . . : $enable_shared
  152. mmap loaders . . . . . . . . : $enable_mmap
  153. default dpkg-deb compressor . : $with_dpkg_deb_compressor
  154. Paths:
  155. devlibdir . . . . . . . . . . : $devlibdir
  156. pkgconfdir . . . . . . . . . : $pkgconfdir
  157. admindir . . . . . . . . . . : $admindir
  158. logdir . . . . . . . . . . . : $logdir
  159. perl interpreter . . . . . . : $PERL
  160. perl libdir . . . . . . . . . : $PERL_LIBDIR
  161. Programs:
  162. update-alternatives . . . . . : $build_update_alternatives
  163. start-stop-daemon . . . . . . : $build_start_stop_daemon
  164. dselect . . . . . . . . . . . : $build_dselect
  165. System Libraries:
  166. libps . . . . . . . . . . . . : ${have_libps:-no}
  167. libkvm . . . . . . . . . . . : ${have_libkvm:-no}
  168. libselinux . . . . . . . . . : $with_selinux
  169. libmd . . . . . . . . . . . . : $with_libmd
  170. libz . . . . . . . . . . . . : $with_zlib
  171. liblzma . . . . . . . . . . . : $with_liblzma
  172. libbz2 . . . . . . . . . . . : $with_bz2
  173. libcurses . . . . . . . . . . : ${have_libcurses:-no}
  174. CONFIG