configure.ac 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.60)
  3. AC_INIT([dpkg], [1.15.4~], [debian-dpkg@lists.debian.org])
  4. AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_CONFIG_AUX_DIR([config])
  7. AC_USE_SYSTEM_EXTENSIONS
  8. DPKG_ARCHITECTURE
  9. AM_INIT_AUTOMAKE([1.8 gnu nostdinc])
  10. AM_GNU_GETTEXT_VERSION([0.16.1])
  11. AM_GNU_GETTEXT([external])
  12. # Allow compilation without dselect
  13. AC_ARG_WITH(dselect,
  14. AS_HELP_STRING([--without-dselect],
  15. [don't build dselect package-management frontend]),
  16. [build_dselect=$with_dselect],
  17. [build_dselect=yes])
  18. AM_CONDITIONAL(WITH_DSELECT, [test "x$build_dselect" = "xyes"])
  19. # Allow compilation without start-stop-daemon
  20. AC_ARG_WITH(start-stop-daemon,
  21. AS_HELP_STRING([--without-start-stop-daemon],
  22. [don't build or use start-stop-daemon]),
  23. [build_start_stop_daemon=$with_start_stop_daemon],
  24. [build_start_stop_daemon=yes])
  25. AM_CONDITIONAL(WITH_START_STOP_DAEMON,
  26. [test "x$build_start_stop_daemon" = "xyes"])
  27. if test "x$build_start_stop_daemon" = "xyes"; then
  28. AC_DEFINE(WITH_START_STOP_DAEMON, 1,
  29. [Define to 1 if start-stop-daemon is compiled.])
  30. else
  31. AC_DEFINE(WITH_START_STOP_DAEMON, 0)
  32. fi
  33. # Allow alternate admin directory
  34. admindir="${localstatedir}/${PACKAGE_NAME}"
  35. AC_ARG_WITH(admindir,
  36. AS_HELP_STRING([--with-admindir=DIR],
  37. [dpkg database directory [[LOCALSTATEDIR/dpkg]]]),
  38. [case "$with_admindir" in
  39. "") AC_MSG_ERROR([invalid admindir specified]) ;;
  40. *) admindir="$with_admindir" ;;
  41. esac])
  42. AC_SUBST(admindir)
  43. # Checks for programs.
  44. AC_PROG_CC
  45. AC_PROG_CXX
  46. AC_PROG_LEX
  47. AC_PROG_RANLIB
  48. DPKG_PROG_PERL
  49. # Checks for operating system services and capabilities.
  50. AC_SYS_LARGEFILE
  51. # Checks for libraries.
  52. DPKG_LIB_ZLIB
  53. DPKG_LIB_BZ2
  54. DPKG_LIB_SELINUX
  55. if test "x$build_dselect" = "xyes"; then
  56. DPKG_LIB_CURSES
  57. fi
  58. if test "x$build_start_stop_daemon" = "xyes"; then
  59. DPKG_LIB_SSD
  60. fi
  61. # Checks for header files.
  62. AC_HEADER_STDC
  63. AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h kvm.h \
  64. sys/cdefs.h sys/syscall.h])
  65. DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
  66. # Checks for typedefs, structures, and compiler characteristics.
  67. AC_C_BIGENDIAN
  68. AC_C_CONST
  69. AC_C_INLINE
  70. AC_C_VOLATILE
  71. DPKG_C_C99
  72. AC_TYPE_MODE_T
  73. AC_TYPE_PID_T
  74. AC_TYPE_SIZE_T
  75. DPKG_TYPE_PTRDIFF_T
  76. AC_CHECK_SIZEOF([unsigned int])
  77. AC_CHECK_SIZEOF([unsigned long])
  78. DPKG_DECL_SYS_SIGLIST
  79. DPKG_C_ATTRIBUTE
  80. # Checks for library functions.
  81. DPKG_FUNC_VA_COPY
  82. DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
  83. vsnprintf snprintf strnlen strerror strsignal \
  84. scandir alphasort unsetenv])
  85. AC_CHECK_FUNCS([strtoul isascii bcopy memcpy lchown setsid getdtablesize])
  86. DPKG_COMPILER_WARNINGS
  87. DPKG_COMPILER_OPTIMISATIONS
  88. DPKG_LINKER_OPTIMISATIONS
  89. AC_CONFIG_FILES([ Makefile
  90. dpkg-deb/Makefile
  91. dpkg-split/Makefile
  92. dselect/Makefile
  93. dselect/methods/Makefile
  94. dselect/po/Makefile.in
  95. lib/Makefile
  96. lib/compat/Makefile
  97. lib/dpkg/Makefile
  98. lib/dpkg/test/Makefile
  99. man/Makefile
  100. po/Makefile.in
  101. scripts/Makefile
  102. scripts/po/Makefile.in
  103. src/Makefile
  104. utils/Makefile ])
  105. AC_CONFIG_HEADERS([config.h])
  106. AC_OUTPUT