configure.ac 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.59)
  3. AC_INIT([dpkg], [1.15.0~], [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([external])
  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_LEX
  48. AC_PROG_RANLIB
  49. DPKG_PROG_PERL
  50. # Checks for operating system services and capabilities.
  51. AC_SYS_LARGEFILE
  52. # Checks for libraries.
  53. DPKG_LIB_ZLIB
  54. DPKG_LIB_BZ2
  55. DPKG_LIB_SELINUX
  56. if test "x$build_dselect" = "xyes"; then
  57. DPKG_LIB_CURSES
  58. fi
  59. if test "x$build_start_stop_daemon" = "xyes"; then
  60. DPKG_LIB_SSD
  61. fi
  62. # Checks for header files.
  63. AC_HEADER_STDC
  64. AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h sys/cdefs.h kvm.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. SJR_COMPILER_WARNINGS
  87. SJR_COMPILER_OPTIMISATIONS
  88. SJR_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. libcompat/Makefile
  96. lib/Makefile
  97. man/Makefile
  98. origins/Makefile
  99. po/Makefile.in
  100. scripts/Makefile
  101. scripts/po/Makefile.in
  102. src/Makefile
  103. utils/Makefile ])
  104. AC_CONFIG_HEADERS([config.h])
  105. AC_OUTPUT