configure.ac 3.5 KB

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