configure.ac 2.9 KB

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