configure.ac 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.59)
  3. AC_INIT([dpkg], [1.13.14~], [debian-dpkg@lists.debian.org])
  4. AC_CONFIG_SRCDIR([lib/dpkg.h])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_CANONICAL_SYSTEM
  7. AC_GNU_SOURCE
  8. DPKG_ARCHITECTURE
  9. AM_INIT_AUTOMAKE([1.8 gnu])
  10. AM_GNU_GETTEXT_VERSION(0.14.1)
  11. AM_GNU_GETTEXT()
  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_RANLIB
  47. DPKG_PROG_PERL
  48. # Checks for operating system services and capabilities.
  49. AC_SYS_LARGEFILE
  50. # Checks for libraries.
  51. DPKG_LIB_ZLIB
  52. DPKG_LIB_BZ2
  53. DPKG_LIB_SELINUX
  54. if test "x$build_dselect" = "xyes"; then
  55. DPKG_LIB_CURSES
  56. fi
  57. if test "x$build_start_stop_daemon" = "xyes"; then
  58. DPKG_LIB_SSD
  59. fi
  60. # Checks for header files.
  61. AC_HEADER_STDC
  62. AC_CHECK_HEADERS([error.h sys/cdefs.h kvm.h])
  63. DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
  64. # Checks for typedefs, structures, and compiler characteristics.
  65. AC_C_BIGENDIAN
  66. AC_C_CONST
  67. AC_C_INLINE
  68. AC_C_VOLATILE
  69. DPKG_C_C99
  70. AC_TYPE_MODE_T
  71. AC_TYPE_PID_T
  72. AC_TYPE_SIZE_T
  73. DPKG_TYPE_PTRDIFF_T
  74. AC_CHECK_SIZEOF(unsigned int)
  75. AC_CHECK_SIZEOF(unsigned long)
  76. DPKG_DECL_SYS_SIGLIST
  77. DPKG_C_ATTRIBUTE
  78. # Checks for library functions.
  79. DPKG_FUNC_VA_COPY
  80. AC_CHECK_FUNCS([vsnprintf snprintf strerror strsignal scandir alphasort])
  81. AC_CHECK_FUNCS([unsetenv lchown setsid bcopy isascii memcpy])
  82. SJR_COMPILER_WARNINGS
  83. SJR_COMPILER_OPTIMISATIONS
  84. SJR_LINKER_OPTIMISATIONS
  85. AC_CONFIG_FILES([ Makefile
  86. dpkg-deb/Makefile
  87. dpkg-split/Makefile
  88. dselect/Makefile
  89. getopt/Makefile
  90. intl/Makefile
  91. lib/Makefile
  92. man/Makefile
  93. man/C/Makefile
  94. man/de/Makefile
  95. man/es/Makefile
  96. man/fr/Makefile
  97. man/ja/Makefile
  98. man/pt_BR/Makefile
  99. man/ru/Makefile
  100. man/sv/Makefile
  101. methods/Makefile
  102. origins/Makefile
  103. po/Makefile.in
  104. scripts/Makefile
  105. src/Makefile
  106. utils/Makefile ])
  107. AC_CONFIG_HEADERS([config.h])
  108. AC_OUTPUT