configure.ac 4.0 KB

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