1 # Process this file with autoconf to produce a configure script.
3 m4_pattern_forbid([^_?DPKG_])
6 AC_INIT([dpkg], m4_esyscmd([build-aux/get-version]),
7 [debian-dpkg@lists.debian.org], [dpkg],
8 [https://wiki.debian.org/Teams/Dpkg])
10 AC_SUBST([PACKAGE_COPYRIGHT_HOLDER], ['Dpkg Developers'])
11 AC_SUBST([PACKAGE_VCS_TYPE], [git])
12 AC_SUBST([PACKAGE_VCS_URL], [https://git.dpkg.org/git/dpkg/dpkg.git])
13 AC_SUBST([PACKAGE_VCS_WEB], [https://git.dpkg.org/cgit/dpkg/dpkg.git])
14 AC_SUBST([PACKAGE_BUG_WEB], [https://bugs.debian.org/src:dpkg])
15 AC_SUBST([PACKAGE_CPAN_NAME], [Dpkg])
16 AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
17 AC_CONFIG_MACRO_DIR([m4])
18 AC_CONFIG_AUX_DIR([build-aux])
20 AC_USE_SYSTEM_EXTENSIONS
28 [tar-ustar no-dist-gzip dist-xz]
30 AM_SILENT_RULES([yes])
32 # Require at least this gettext version, but will take any later version too.
33 AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])
34 # XXX: We cannot remove the following macro due to backwards compatibility
35 # reasons. The above macro is set unconditionally to the minimal version
36 # required, and the below is set to 0.19.6, the first version introducing
37 # the AM_GNU_GETTEXT_REQUIRE_VERSION macro.
38 AM_GNU_GETTEXT_VERSION([0.19.6])
39 AM_GNU_GETTEXT([external])
40 DPKG_DIST_CHECK([test "$GMSGFMT" = ":" && test "$USE_NLS" = "yes"],
41 [gettext required when NLS support enabled])
43 # Shared libraries are disabled on purpose, currently there is no ABI stability
44 # guarantee, and it will be broken at will. The infrastructure is in place just
45 # to be able to test that its future activation will work.
47 LT_INIT([disable-shared])
48 DPKG_BUILD_SHARED_LIBS
50 DPKG_LINKER_VERSION_SCRIPT
52 # Allow compilation without optional programs
53 DPKG_BUILD_PROG([dselect])
54 DPKG_BUILD_PROG([start-stop-daemon])
55 DPKG_BUILD_PROG([update-alternatives])
57 DPKG_BUILD_RELEASE_DATE
60 # Allow alternate directories
61 DPKG_WITH_DIR([devlibdir], [${libdir}],
62 [dpkg development library directory [LIBDIR]])
63 DPKG_WITH_DIR([pkgconfdir], [${sysconfdir}/${PACKAGE_NAME}],
64 [dpkg configuration directory [SYSCONFDIR/dpkg]])
65 DPKG_WITH_DIR([admindir], [${localstatedir}/lib/${PACKAGE_NAME}],
66 [dpkg database directory [LOCALSTATEDIR/lib/dpkg]])
67 DPKG_WITH_DIR([backupsdir], [${localstatedir}/backups],
68 [dpkg database backups directory [LOCALSTATEDIR/backups]])
69 DPKG_WITH_DIR([logdir], [${localstatedir}/log],
70 [system logging directory [LOCALSTATEDIR/log]])
71 DPKG_WITH_DIR([zshcompletionsdir], [${datadir}/zsh/vendor-completions],
72 [zsh vendor completions directory [DATADIR/zsh/vendor-completions]])
74 # Set default dpkg-deb values
75 DPKG_DEB_COMPRESSOR([xz])
77 # Checks for programs.
86 AC_CHECK_PROGS([DOXYGEN], [doxygen])
87 AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
94 # Checks for operating system services and capabilities.
97 # Checks for libraries.
105 AS_IF([test "x$build_dselect" = "xyes"], [
108 AS_IF([test "x$build_start_stop_daemon" = "xyes"], [
114 # Checks for header files.
133 # The glibc project has deprecated the <sys/sysctl.h> header and emits
134 # warnings on its usage, and removed it in 2.32. The Linux kernel removed
135 # support for it in 5.5.
137 # On other systems, we need to check whether to use it.
143 AC_CHECK_HEADERS([sys/proc.h], [], [], [
144 #ifdef HAVE_SYS_PARAM_H
145 #include <sys/param.h>
149 AS_IF([test "x$build_dselect" = "xyes"], [
151 AC_CHECK_HEADERS([cxxabi.h])
155 # Checks for typedefs, structures, and compiler characteristics.
164 DPKG_DECL_SYS_SIGLIST
165 DPKG_DECL_SYS_ERRLIST
167 # Checks for library functions.
169 DPKG_FUNC_C99_SNPRINTF
171 DPKG_CHECK_DECL([offsetof], [stddef.h])
172 DPKG_CHECK_DECL([makedev], [sys/types.h])
173 DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
174 DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
175 DPKG_CHECK_DECL([O_NOFOLLOW], [fcntl.h])
176 DPKG_CHECK_DECL([F_ALLOCSP64], [fcntl.h])
177 DPKG_CHECK_DECL([F_PREALLOCATE], [fcntl.h])
178 DPKG_CHECK_DECL([P_tmpdir], [stdio.h])
180 DPKG_CHECK_COMPAT_FUNCS([\
194 AC_CHECK_FUNCS([memcpy lchown],
195 [], [AC_MSG_ERROR([missing required function])])
211 AS_IF([test "x$build_dselect" = "xyes"], [
213 AC_CHECK_FUNCS([__cxa_pure_virtual])
218 DPKG_USE_DISK_PREALLOCATE
220 # Checks for the build machinery.
221 AC_DEFINE([LIBDPKG_VOLATILE_API], [1], [Acknowledge the volatility of the API.])
222 DPKG_COMPILER_WARNINGS
223 DPKG_COMPILER_SANITIZER
224 DPKG_COMPILER_OPTIMIZATIONS
225 DPKG_LINKER_OPTIMIZATIONS
227 AC_DEFINE([PACKAGE_RELEASE], [PACKAGE_VERSION " (" ARCHITECTURE ")"],
228 [Define the project release information, version and architecture])
230 AC_CONFIG_TESTDIR([src/at])
231 AM_MISSING_PROG([AUTOM4TE], [autom4te])
236 dselect/methods/Makefile
237 dselect/po/Makefile.in
249 scripts/po/Makefile.in
254 AC_CONFIG_HEADERS([config.h])
257 # Print the current configuration
262 cpu name . . . . . . . . . . : ${cpu_type}
263 os name . . . . . . . . . . . : ${os_type}
264 arch name . . . . . . . . . . : ${dpkg_arch}
265 arch bits . . . . . . . . . . : ${dpkg_arch_bits}
266 arch endian . . . . . . . . . : ${dpkg_arch_endian}
267 char bits . . . . . . . . . . : ${dpkg_char_bits}
268 char sign . . . . . . . . . . : ${dpkg_char_sign}
269 sizeof(short) . . . . . . . . : ${ac_cv_sizeof_short}
270 sizeof(int) . . . . . . . . . : ${ac_cv_sizeof_int}
271 sizeof(long) . . . . . . . . : ${ac_cv_sizeof_long}
272 sizeof(long long) . . . . . . : ${ac_cv_sizeof_long_long}
273 sizeof(float) . . . . . . . . : ${ac_cv_sizeof_float}
274 sizeof(double) . . . . . . . : ${ac_cv_sizeof_double}
275 sizeof(long double) . . . . . : ${ac_cv_sizeof_long_double}
276 sizeof(void *) . . . . . . . : ${ac_cv_sizeof_void_p}
277 alignof(max_align_t) . . . . : ${ac_cv_alignof_max_align_t}
280 native language support . . . : $USE_NLS
281 unicode support . . . . . . . : $USE_UNICODE
282 development documentation . . : $build_devel_docs
283 code coverage . . . . . . . . : $enable_coverage
284 build shared libraries . . . : $enable_shared
285 mmap loaders . . . . . . . . : $enable_mmap
286 disk pre-allocation . . . . . : $enable_disk_preallocate
287 default dpkg-deb compressor . : $with_dpkg_deb_compressor
290 devlibdir . . . . . . . . . . : $devlibdir
291 pkgconfdir . . . . . . . . . : $pkgconfdir
292 admindir . . . . . . . . . . : $admindir
293 backupsdir . . . . . . . . . : $backupsdir
294 logdir . . . . . . . . . . . : $logdir
295 perl interpreter . . . . . . : $PERL
296 perl libdir . . . . . . . . . : $PERL_LIBDIR
299 update-alternatives . . . . . : $build_update_alternatives
300 start-stop-daemon . . . . . . : $build_start_stop_daemon
301 dselect . . . . . . . . . . . : $build_dselect
304 librt . . . . . . . . . . . . : $have_librt
305 libsocket . . . . . . . . . . : ${have_libsocket:-no}
306 libps . . . . . . . . . . . . : ${have_libps:-no}
307 libkvm . . . . . . . . . . . : ${have_libkvm:-no}
308 libselinux . . . . . . . . . : $have_libselinux
309 libmd . . . . . . . . . . . . : $have_libmd
310 libz . . . . . . . . . . . . : $have_libz_impl
311 liblzma . . . . . . . . . . . : $have_liblzma
312 libzstd . . . . . . . . . . . : $have_libzstd
313 libbz2 . . . . . . . . . . . : $have_libbz2
314 libcurses . . . . . . . . . . : ${have_libcurses:-no}