configure.ac 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.60)
  3. AC_INIT([dpkg], [1.15.5~], [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. DPKG_PROG_PERL
  51. # Checks for operating system services and capabilities.
  52. AC_SYS_LARGEFILE
  53. # Checks for libraries.
  54. DPKG_LIB_ZLIB
  55. DPKG_LIB_BZ2
  56. DPKG_LIB_SELINUX
  57. if test "x$build_dselect" = "xyes"; then
  58. DPKG_LIB_CURSES
  59. fi
  60. if test "x$build_start_stop_daemon" = "xyes"; then
  61. DPKG_LIB_SSD
  62. fi
  63. # Checks for header files.
  64. AC_HEADER_STDC
  65. AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h kvm.h \
  66. sys/cdefs.h sys/syscall.h])
  67. DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
  68. # Checks for typedefs, structures, and compiler characteristics.
  69. AC_C_BIGENDIAN
  70. AC_C_CONST
  71. AC_C_INLINE
  72. AC_C_VOLATILE
  73. DPKG_C_C99
  74. AC_TYPE_MODE_T
  75. AC_TYPE_PID_T
  76. AC_TYPE_SIZE_T
  77. DPKG_TYPE_PTRDIFF_T
  78. AC_CHECK_SIZEOF([unsigned int])
  79. AC_CHECK_SIZEOF([unsigned long])
  80. DPKG_DECL_SYS_SIGLIST
  81. DPKG_C_ATTRIBUTE
  82. # Checks for library functions.
  83. DPKG_FUNC_VA_COPY
  84. DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
  85. DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
  86. vsnprintf snprintf strnlen strerror strsignal \
  87. scandir alphasort unsetenv])
  88. AC_CHECK_FUNCS([strtoul isascii bcopy memcpy lchown setsid getdtablesize])
  89. DPKG_COMPILER_WARNINGS
  90. DPKG_COMPILER_OPTIMISATIONS
  91. DPKG_LINKER_OPTIMISATIONS
  92. AC_CONFIG_FILES([ Makefile
  93. dpkg-deb/Makefile
  94. dpkg-split/Makefile
  95. dselect/Makefile
  96. dselect/methods/Makefile
  97. dselect/po/Makefile.in
  98. lib/Makefile
  99. lib/compat/Makefile
  100. lib/dpkg/Makefile
  101. lib/dpkg/test/Makefile
  102. man/Makefile
  103. po/Makefile.in
  104. scripts/Makefile
  105. scripts/po/Makefile.in
  106. src/Makefile
  107. utils/Makefile ])
  108. AC_CONFIG_HEADERS([config.h])
  109. AC_OUTPUT