configure.ac 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. # Checks for operating system services and capabilities.
  71. AC_SYS_LARGEFILE
  72. # Checks for libraries.
  73. DPKG_LIB_ZLIB
  74. DPKG_LIB_BZ2
  75. DPKG_LIB_SELINUX
  76. if test "x$build_dselect" = "xyes"; then
  77. DPKG_LIB_CURSES
  78. fi
  79. if test "x$build_start_stop_daemon" = "xyes"; then
  80. DPKG_LIB_SSD
  81. fi
  82. # Checks for header files.
  83. AC_HEADER_STDC
  84. AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h kvm.h \
  85. sys/cdefs.h sys/syscall.h])
  86. DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
  87. # Checks for typedefs, structures, and compiler characteristics.
  88. AC_C_BIGENDIAN
  89. AC_C_CONST
  90. AC_C_INLINE
  91. AC_C_VOLATILE
  92. DPKG_C_C99
  93. AC_TYPE_MODE_T
  94. AC_TYPE_PID_T
  95. AC_TYPE_SIZE_T
  96. DPKG_TYPE_PTRDIFF_T
  97. AC_CHECK_SIZEOF([unsigned int])
  98. AC_CHECK_SIZEOF([unsigned long])
  99. DPKG_DECL_SYS_SIGLIST
  100. DPKG_C_ATTRIBUTE
  101. # Checks for library functions.
  102. DPKG_FUNC_VA_COPY
  103. DPKG_FUNC_C99_SNPRINTF
  104. DPKG_CHECK_DECL([offsetof], [stddef.h])
  105. DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
  106. DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
  107. strnlen strerror strsignal \
  108. scandir alphasort unsetenv])
  109. AC_CHECK_FUNCS([strtoul isascii bcopy memcpy lchown setsid getdtablesize])
  110. AC_DEFINE(LIBDPKG_VOLATILE_API, 1, [Acknowledge the volatility of the API.])
  111. DPKG_COMPILER_WARNINGS
  112. DPKG_COMPILER_OPTIMISATIONS
  113. DPKG_LINKER_OPTIMISATIONS
  114. AC_CONFIG_FILES([ Makefile
  115. dpkg-deb/Makefile
  116. dpkg-split/Makefile
  117. dselect/Makefile
  118. dselect/methods/Makefile
  119. dselect/po/Makefile.in
  120. lib/Makefile
  121. lib/compat/Makefile
  122. lib/dpkg/Makefile
  123. lib/dpkg/libdpkg.pc
  124. lib/dpkg/test/Makefile
  125. doc/Doxyfile
  126. man/Makefile
  127. po/Makefile.in
  128. scripts/Makefile
  129. scripts/po/Makefile.in
  130. src/Makefile
  131. utils/Makefile ])
  132. AC_CONFIG_HEADERS([config.h])
  133. AC_OUTPUT