configure.ac 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.59)
  3. AC_INIT([dpkg], [1.14.5~], [debian-dpkg@lists.debian.org])
  4. AC_CONFIG_SRCDIR([lib/dpkg.h])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_CONFIG_AUX_DIR([config])
  7. AC_CANONICAL_SYSTEM
  8. AC_GNU_SOURCE
  9. DPKG_ARCHITECTURE
  10. AM_INIT_AUTOMAKE([1.8 gnu])
  11. AM_GNU_GETTEXT_VERSION([0.16.1])
  12. AM_GNU_GETTEXT()
  13. # Allow compilation without dselect
  14. AC_ARG_WITH(dselect,
  15. AS_HELP_STRING([--without-dselect],
  16. [don't build dselect package-management frontend]),
  17. [build_dselect=$with_dselect],
  18. [build_dselect=yes])
  19. AM_CONDITIONAL(WITH_DSELECT, [test "x$build_dselect" = "xyes"])
  20. # Allow compilation without start-stop-daemon
  21. AC_ARG_WITH(start-stop-daemon,
  22. AS_HELP_STRING([--without-start-stop-daemon],
  23. [don't build or use start-stop-daemon]),
  24. [build_start_stop_daemon=$with_start_stop_daemon],
  25. [build_start_stop_daemon=yes])
  26. AM_CONDITIONAL(WITH_START_STOP_DAEMON,
  27. [test "x$build_start_stop_daemon" = "xyes"])
  28. if test "x$build_start_stop_daemon" = "xyes"; then
  29. AC_DEFINE(WITH_START_STOP_DAEMON, 1,
  30. [Define to 1 if start-stop-daemon is compiled.])
  31. else
  32. AC_DEFINE(WITH_START_STOP_DAEMON, 0)
  33. fi
  34. # Allow alternate admin directory
  35. admindir="${localstatedir}/${PACKAGE_NAME}"
  36. AC_ARG_WITH(admindir,
  37. AS_HELP_STRING([--with-admindir=DIR],
  38. [dpkg database directory [[LOCALSTATEDIR/dpkg]]]),
  39. [case "$with_admindir" in
  40. "") AC_MSG_ERROR([invalid admindir specified]) ;;
  41. *) admindir="$with_admindir" ;;
  42. esac])
  43. AC_SUBST(admindir)
  44. # Checks for programs.
  45. AC_PROG_CC
  46. AC_PROG_CXX
  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([error.h locale.h sys/cdefs.h kvm.h])
  64. DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
  65. # Checks for typedefs, structures, and compiler characteristics.
  66. AC_C_BIGENDIAN
  67. AC_C_CONST
  68. AC_C_INLINE
  69. AC_C_VOLATILE
  70. DPKG_C_C99
  71. AC_TYPE_MODE_T
  72. AC_TYPE_PID_T
  73. AC_TYPE_SIZE_T
  74. DPKG_TYPE_PTRDIFF_T
  75. AC_CHECK_SIZEOF(unsigned int)
  76. AC_CHECK_SIZEOF(unsigned long)
  77. DPKG_DECL_SYS_SIGLIST
  78. DPKG_C_ATTRIBUTE
  79. # Checks for library functions.
  80. DPKG_FUNC_VA_COPY
  81. AC_CHECK_FUNCS([vsnprintf snprintf strerror strsignal scandir alphasort])
  82. AC_CHECK_FUNCS([unsetenv lchown setsid bcopy isascii memcpy])
  83. SJR_COMPILER_WARNINGS
  84. SJR_COMPILER_OPTIMISATIONS
  85. SJR_LINKER_OPTIMISATIONS
  86. AC_CONFIG_FILES([ Makefile
  87. dpkg-deb/Makefile
  88. dpkg-split/Makefile
  89. dselect/Makefile
  90. dselect/methods/Makefile
  91. dselect/po/Makefile.in
  92. getopt/Makefile
  93. intl/Makefile
  94. lib/Makefile
  95. man/Makefile
  96. origins/Makefile
  97. po/Makefile.in
  98. scripts/Makefile
  99. scripts/po/Makefile.in
  100. src/Makefile
  101. utils/Makefile ])
  102. AC_CONFIG_HEADERS([config.h])
  103. AC_OUTPUT