configure.ac 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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.18])
  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}/lib/${PACKAGE_NAME}"
  53. AC_ARG_WITH(admindir,
  54. AS_HELP_STRING([--with-admindir=DIR],
  55. [dpkg database directory [[LOCALSTATEDIR/lib/dpkg]]]),
  56. [case "$with_admindir" in
  57. "") AC_MSG_ERROR([invalid admindir specified]) ;;
  58. *) admindir="$with_admindir" ;;
  59. esac])
  60. AC_SUBST(admindir)
  61. # Allow alternate log directory
  62. logdir="${localstatedir}/log"
  63. AC_ARG_WITH(logdir,
  64. AS_HELP_STRING([--with-logdir=DIR],
  65. [system logging directory [[LOCALSTATEDIR/log]]]),
  66. [case "$with_logdir" in
  67. "") AC_MSG_ERROR([invalid logdir specified]) ;;
  68. *) logdir="$with_logdir" ;;
  69. esac])
  70. AC_SUBST(logdir)
  71. # Checks for programs.
  72. AC_PROG_CC
  73. AC_PROG_CXX
  74. AC_PROG_LEX
  75. AC_PROG_RANLIB
  76. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  77. AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
  78. DPKG_PROG_PO4A
  79. DPKG_PROG_PERL
  80. DPKG_PROG_POD2MAN
  81. # Checks for operating system services and capabilities.
  82. AC_SYS_LARGEFILE
  83. # Checks for libraries.
  84. DPKG_LIB_ZLIB
  85. DPKG_LIB_BZ2
  86. DPKG_LIB_SELINUX
  87. if test "x$build_dselect" = "xyes"; then
  88. DPKG_LIB_CURSES
  89. fi
  90. if test "x$build_start_stop_daemon" = "xyes"; then
  91. DPKG_LIB_SSD
  92. fi
  93. # Checks for header files.
  94. AC_HEADER_STDC
  95. AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h kvm.h \
  96. sys/cdefs.h sys/syscall.h linux/fiemap.h])
  97. # Checks for typedefs, structures, and compiler characteristics.
  98. AC_C_BIGENDIAN
  99. AC_C_CONST
  100. AC_C_INLINE
  101. AC_C_VOLATILE
  102. DPKG_C_C99
  103. AC_TYPE_MODE_T
  104. AC_TYPE_PID_T
  105. AC_TYPE_SIZE_T
  106. DPKG_TYPE_PTRDIFF_T
  107. AC_CHECK_SIZEOF([unsigned int])
  108. AC_CHECK_SIZEOF([unsigned long])
  109. DPKG_DECL_SYS_SIGLIST
  110. # Checks for library functions.
  111. DPKG_FUNC_VA_COPY
  112. DPKG_FUNC_C99_SNPRINTF
  113. DPKG_FUNC_ASYNC_SYNC
  114. DPKG_CHECK_DECL([offsetof], [stddef.h])
  115. DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
  116. DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
  117. DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
  118. strnlen strerror strsignal asprintf \
  119. scandir alphasort unsetenv])
  120. AC_CHECK_FUNCS([strtoul isascii bcopy memcpy setsid getdtablesize \
  121. posix_fadvise])
  122. DPKG_MMAP
  123. AC_DEFINE(LIBDPKG_VOLATILE_API, 1, [Acknowledge the volatility of the API.])
  124. DPKG_COMPILER_WARNINGS
  125. DPKG_COMPILER_OPTIMISATIONS
  126. DPKG_LINKER_OPTIMISATIONS
  127. AC_CONFIG_FILES([ Makefile
  128. dpkg-deb/Makefile
  129. dpkg-split/Makefile
  130. dselect/Makefile
  131. dselect/methods/Makefile
  132. dselect/po/Makefile.in
  133. lib/Makefile
  134. lib/compat/Makefile
  135. lib/dpkg/Makefile
  136. lib/dpkg/libdpkg.pc
  137. lib/dpkg/test/Makefile
  138. doc/Doxyfile
  139. man/Makefile
  140. po/Makefile.in
  141. scripts/Makefile
  142. scripts/po/Makefile.in
  143. src/Makefile
  144. utils/Makefile ])
  145. AC_CONFIG_HEADERS([config.h])
  146. AC_OUTPUT