configure.ac 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. # Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.60)
  3. AC_INIT([dpkg], m4_esyscmd([./get-version]), [debian-dpkg@lists.debian.org])
  4. AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_CONFIG_AUX_DIR([build-aux])
  7. AC_USE_SYSTEM_EXTENSIONS
  8. DPKG_ARCHITECTURE
  9. AM_INIT_AUTOMAKE([1.8 gnu nostdinc])
  10. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
  11. [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
  12. AM_GNU_GETTEXT_VERSION([0.16.1])
  13. AM_GNU_GETTEXT([external])
  14. # Allow compilation without dselect
  15. AC_ARG_WITH(dselect,
  16. AS_HELP_STRING([--without-dselect],
  17. [do not build dselect package-management frontend]),
  18. [build_dselect=$with_dselect],
  19. [build_dselect=yes])
  20. AM_CONDITIONAL(WITH_DSELECT, [test "x$build_dselect" = "xyes"])
  21. # Allow compilation without start-stop-daemon
  22. AC_ARG_WITH(start-stop-daemon,
  23. AS_HELP_STRING([--without-start-stop-daemon],
  24. [do not build or use start-stop-daemon]),
  25. [build_start_stop_daemon=$with_start_stop_daemon],
  26. [build_start_stop_daemon=yes])
  27. AM_CONDITIONAL(WITH_START_STOP_DAEMON,
  28. [test "x$build_start_stop_daemon" = "xyes"])
  29. if test "x$build_start_stop_daemon" = "xyes"; then
  30. AC_DEFINE(WITH_START_STOP_DAEMON, 1,
  31. [Define to 1 if start-stop-daemon is compiled.])
  32. else
  33. AC_DEFINE(WITH_START_STOP_DAEMON, 0)
  34. fi
  35. # Allow compilation without update-alternatives
  36. AC_ARG_WITH(update-alternatives,
  37. AS_HELP_STRING([--without-update-alternatives],
  38. [do not build or use update-alternatives]),
  39. [build_update_alternatives=$with_update_alternatives],
  40. [build_update_alternatives=yes])
  41. AM_CONDITIONAL(WITH_UPDATE_ALTERNATIVES,
  42. [test "x$build_update_alternatives" = "xyes"])
  43. # Allow compilation without install-info
  44. AC_ARG_WITH(install-info,
  45. AS_HELP_STRING([--without-install-info],
  46. [do not build or use install-info]),
  47. [build_install_info=$with_install_info],
  48. [build_install_info=yes])
  49. AM_CONDITIONAL(WITH_INSTALL_INFO,
  50. [test "x$build_install_info" = "xyes"])
  51. # Allow alternate admin directory
  52. admindir="${localstatedir}/${PACKAGE_NAME}"
  53. AC_ARG_WITH(admindir,
  54. AS_HELP_STRING([--with-admindir=DIR],
  55. [dpkg database directory [[LOCALSTATEDIR/dpkg]]]),
  56. [case "$with_admindir" in
  57. "") AC_MSG_ERROR([invalid admindir specified]) ;;
  58. *) admindir="$with_admindir" ;;
  59. esac])
  60. AC_SUBST(admindir)
  61. # Checks for programs.
  62. AC_PROG_CC
  63. AC_PROG_CXX
  64. AC_PROG_LEX
  65. AC_PROG_RANLIB
  66. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  67. AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
  68. DPKG_PROG_PO4A
  69. DPKG_PROG_PERL
  70. DPKG_PROG_POD2MAN
  71. # Checks for operating system services and capabilities.
  72. AC_SYS_LARGEFILE
  73. # Checks for libraries.
  74. DPKG_LIB_ZLIB
  75. DPKG_LIB_BZ2
  76. DPKG_LIB_SELINUX
  77. if test "x$build_dselect" = "xyes"; then
  78. DPKG_LIB_CURSES
  79. fi
  80. if test "x$build_start_stop_daemon" = "xyes"; then
  81. DPKG_LIB_SSD
  82. fi
  83. # Checks for header files.
  84. AC_HEADER_STDC
  85. AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h kvm.h \
  86. sys/cdefs.h sys/syscall.h linux/fiemap.h])
  87. DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
  88. # Checks for typedefs, structures, and compiler characteristics.
  89. AC_C_BIGENDIAN
  90. AC_C_CONST
  91. AC_C_INLINE
  92. AC_C_VOLATILE
  93. DPKG_C_C99
  94. AC_TYPE_MODE_T
  95. AC_TYPE_PID_T
  96. AC_TYPE_SIZE_T
  97. DPKG_TYPE_PTRDIFF_T
  98. AC_CHECK_SIZEOF([unsigned int])
  99. AC_CHECK_SIZEOF([unsigned long])
  100. DPKG_DECL_SYS_SIGLIST
  101. # Checks for library functions.
  102. DPKG_FUNC_VA_COPY
  103. DPKG_FUNC_C99_SNPRINTF
  104. DPKG_FUNC_ASYNC_SYNC
  105. DPKG_CHECK_DECL([offsetof], [stddef.h])
  106. DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
  107. DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
  108. strnlen strerror strsignal \
  109. scandir alphasort unsetenv])
  110. AC_CHECK_FUNCS([strtoul isascii bcopy memcpy lchown setsid getdtablesize \
  111. posix_fadvise])
  112. AC_DEFINE(LIBDPKG_VOLATILE_API, 1, [Acknowledge the volatility of the API.])
  113. DPKG_COMPILER_WARNINGS
  114. DPKG_COMPILER_OPTIMISATIONS
  115. DPKG_LINKER_OPTIMISATIONS
  116. AC_CONFIG_FILES([ Makefile
  117. dpkg-deb/Makefile
  118. dpkg-split/Makefile
  119. dselect/Makefile
  120. dselect/methods/Makefile
  121. dselect/po/Makefile.in
  122. lib/Makefile
  123. lib/compat/Makefile
  124. lib/dpkg/Makefile
  125. lib/dpkg/libdpkg.pc
  126. lib/dpkg/test/Makefile
  127. doc/Doxyfile
  128. man/Makefile
  129. po/Makefile.in
  130. scripts/Makefile
  131. scripts/po/Makefile.in
  132. src/Makefile
  133. utils/Makefile ])
  134. AC_CONFIG_HEADERS([config.h])
  135. AC_OUTPUT