configure.ac 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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 alternate admin directory
  36. admindir="${localstatedir}/${PACKAGE_NAME}"
  37. AC_ARG_WITH(admindir,
  38. AS_HELP_STRING([--with-admindir=DIR],
  39. [dpkg database directory [[LOCALSTATEDIR/dpkg]]]),
  40. [case "$with_admindir" in
  41. "") AC_MSG_ERROR([invalid admindir specified]) ;;
  42. *) admindir="$with_admindir" ;;
  43. esac])
  44. AC_SUBST(admindir)
  45. # Checks for programs.
  46. AC_PROG_CC
  47. AC_PROG_CXX
  48. AC_PROG_LEX
  49. AC_PROG_RANLIB
  50. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  51. AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
  52. DPKG_PROG_PO4A
  53. DPKG_PROG_PERL
  54. # Checks for operating system services and capabilities.
  55. AC_SYS_LARGEFILE
  56. # Checks for libraries.
  57. DPKG_LIB_ZLIB
  58. DPKG_LIB_BZ2
  59. DPKG_LIB_SELINUX
  60. if test "x$build_dselect" = "xyes"; then
  61. DPKG_LIB_CURSES
  62. fi
  63. if test "x$build_start_stop_daemon" = "xyes"; then
  64. DPKG_LIB_SSD
  65. fi
  66. # Checks for header files.
  67. AC_HEADER_STDC
  68. AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h kvm.h \
  69. sys/cdefs.h sys/syscall.h])
  70. DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
  71. # Checks for typedefs, structures, and compiler characteristics.
  72. AC_C_BIGENDIAN
  73. AC_C_CONST
  74. AC_C_INLINE
  75. AC_C_VOLATILE
  76. DPKG_C_C99
  77. AC_TYPE_MODE_T
  78. AC_TYPE_PID_T
  79. AC_TYPE_SIZE_T
  80. DPKG_TYPE_PTRDIFF_T
  81. AC_CHECK_SIZEOF([unsigned int])
  82. AC_CHECK_SIZEOF([unsigned long])
  83. DPKG_DECL_SYS_SIGLIST
  84. DPKG_C_ATTRIBUTE
  85. # Checks for library functions.
  86. DPKG_FUNC_VA_COPY
  87. DPKG_FUNC_C99_SNPRINTF
  88. DPKG_CHECK_DECL([offsetof], [stddef.h])
  89. DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
  90. DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
  91. strnlen strerror strsignal \
  92. scandir alphasort unsetenv])
  93. AC_CHECK_FUNCS([strtoul isascii bcopy memcpy lchown setsid getdtablesize])
  94. DPKG_COMPILER_WARNINGS
  95. DPKG_COMPILER_OPTIMISATIONS
  96. DPKG_LINKER_OPTIMISATIONS
  97. AC_CONFIG_FILES([ Makefile
  98. dpkg-deb/Makefile
  99. dpkg-split/Makefile
  100. dselect/Makefile
  101. dselect/methods/Makefile
  102. dselect/po/Makefile.in
  103. lib/Makefile
  104. lib/compat/Makefile
  105. lib/dpkg/Makefile
  106. lib/dpkg/test/Makefile
  107. doc/Doxyfile
  108. man/Makefile
  109. po/Makefile.in
  110. scripts/Makefile
  111. scripts/po/Makefile.in
  112. src/Makefile
  113. utils/Makefile ])
  114. AC_CONFIG_HEADERS([config.h])
  115. AC_OUTPUT