1 # Process this file with autoconf to produce a configure script.
4 AC_INIT([dpkg], m4_esyscmd([./get-version]), [debian-dpkg@lists.debian.org])
5 AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
6 AC_CONFIG_MACRO_DIR([m4])
7 AC_CONFIG_AUX_DIR([build-aux])
9 AC_USE_SYSTEM_EXTENSIONS
12 AM_INIT_AUTOMAKE([1.8 gnu nostdinc])
14 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
15 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
17 AM_GNU_GETTEXT_VERSION([0.18])
18 AM_GNU_GETTEXT([external])
20 # Allow compilation without dselect
22 AS_HELP_STRING([--without-dselect],
23 [do not build dselect package-management frontend]),
24 [build_dselect=$with_dselect],
26 AM_CONDITIONAL(WITH_DSELECT, [test "x$build_dselect" = "xyes"])
28 # Allow compilation without start-stop-daemon
29 AC_ARG_WITH(start-stop-daemon,
30 AS_HELP_STRING([--without-start-stop-daemon],
31 [do not build or use start-stop-daemon]),
32 [build_start_stop_daemon=$with_start_stop_daemon],
33 [build_start_stop_daemon=yes])
34 AM_CONDITIONAL(WITH_START_STOP_DAEMON,
35 [test "x$build_start_stop_daemon" = "xyes"])
36 if test "x$build_start_stop_daemon" = "xyes"; then
37 AC_DEFINE(WITH_START_STOP_DAEMON, 1,
38 [Define to 1 if start-stop-daemon is compiled.])
40 AC_DEFINE(WITH_START_STOP_DAEMON, 0)
43 # Allow compilation without update-alternatives
44 AC_ARG_WITH(update-alternatives,
45 AS_HELP_STRING([--without-update-alternatives],
46 [do not build or use update-alternatives]),
47 [build_update_alternatives=$with_update_alternatives],
48 [build_update_alternatives=yes])
49 AM_CONDITIONAL(WITH_UPDATE_ALTERNATIVES,
50 [test "x$build_update_alternatives" = "xyes"])
52 # Allow compilation without install-info
53 AC_ARG_WITH(install-info,
54 AS_HELP_STRING([--without-install-info],
55 [do not build or use install-info]),
56 [build_install_info=$with_install_info],
57 [build_install_info=yes])
58 AM_CONDITIONAL(WITH_INSTALL_INFO,
59 [test "x$build_install_info" = "xyes"])
61 # Allow alternate admin directory
62 admindir="${localstatedir}/lib/${PACKAGE_NAME}"
64 AS_HELP_STRING([--with-admindir=DIR],
65 [dpkg database directory [[LOCALSTATEDIR/lib/dpkg]]]),
66 [case "$with_admindir" in
67 "") AC_MSG_ERROR([invalid admindir specified]) ;;
68 *) admindir="$with_admindir" ;;
72 # Allow alternate log directory
73 logdir="${localstatedir}/log"
75 AS_HELP_STRING([--with-logdir=DIR],
76 [system logging directory [[LOCALSTATEDIR/log]]]),
77 [case "$with_logdir" in
78 "") AC_MSG_ERROR([invalid logdir specified]) ;;
79 *) logdir="$with_logdir" ;;
84 # Checks for programs.
89 AC_CHECK_PROGS([DOXYGEN], [doxygen])
90 AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
96 # Checks for operating system services and capabilities.
99 # Checks for libraries.
103 if test "x$build_dselect" = "xyes"; then
106 if test "x$build_start_stop_daemon" = "xyes"; then
110 # Checks for header files.
112 AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h kvm.h \
113 sys/cdefs.h sys/syscall.h linux/fiemap.h])
115 # Checks for typedefs, structures, and compiler characteristics.
125 AC_CHECK_SIZEOF([unsigned int])
126 AC_CHECK_SIZEOF([unsigned long])
127 DPKG_DECL_SYS_SIGLIST
129 # Checks for library functions.
131 DPKG_FUNC_C99_SNPRINTF
133 DPKG_CHECK_DECL([offsetof], [stddef.h])
134 DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
135 DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
136 DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
137 strnlen strerror strsignal asprintf \
138 scandir alphasort unsetenv])
139 AC_CHECK_FUNCS([strtoul isascii bcopy memcpy setsid getdtablesize \
144 AC_DEFINE(LIBDPKG_VOLATILE_API, 1, [Acknowledge the volatility of the API.])
145 DPKG_COMPILER_WARNINGS
146 DPKG_COMPILER_OPTIMISATIONS
147 DPKG_LINKER_OPTIMISATIONS
149 AC_CONFIG_FILES([ Makefile
153 dselect/methods/Makefile
154 dselect/po/Makefile.in
159 lib/dpkg/test/Makefile
164 scripts/po/Makefile.in
167 AC_CONFIG_HEADERS([config.h])