configure.ac 3.5 KB

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