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_ID], m4_esyscmd([build-aux/get-vcs-id]))
12 AC_SUBST([PACKAGE_VCS_TYPE], [git])
13 AC_SUBST([PACKAGE_VCS_URL], [https://git.dpkg.org/git/dpkg/dpkg.git])
14 AC_SUBST([PACKAGE_VCS_WEB], [https://git.dpkg.org/cgit/dpkg/dpkg.git])
15 AC_SUBST([PACKAGE_BUG_WEB], [https://bugs.debian.org/src:dpkg])
16 AC_SUBST([PACKAGE_CPAN_NAME], [Dpkg])
17 AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
18 AC_CONFIG_MACRO_DIR([m4])
19 AC_CONFIG_AUX_DIR([build-aux])
21 AC_USE_SYSTEM_EXTENSIONS
29 [tar-ustar no-dist-gzip dist-xz]
31 AM_SILENT_RULES([yes])
33 # Require at least this gettext version, but will take any later version too.
34 AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])
35 # XXX: We cannot remove the following macro due to backwards compatibility
36 # reasons. The above macro is set unconditionally to the minimal version
37 # required, and the below is set to 0.19.6, the first version introducing
38 # the AM_GNU_GETTEXT_REQUIRE_VERSION macro.
39 AM_GNU_GETTEXT_VERSION([0.19.6])
40 AM_GNU_GETTEXT([external])
41 DPKG_DIST_CHECK([test "$GMSGFMT" = ":" && test "$USE_NLS" = "yes"],
42 [gettext required when NLS support enabled])
44 # Shared libraries are disabled on purpose, currently there is no ABI stability
45 # guarantee, and it will be broken at will. The infrastructure is in place just
46 # to be able to test that its future activation will work.
48 LT_INIT([disable-shared])
49 DPKG_BUILD_SHARED_LIBS
51 DPKG_LINKER_VERSION_SCRIPT
53 # Allow compilation without optional programs
54 DPKG_BUILD_PROG([dselect])
55 DPKG_BUILD_PROG([start-stop-daemon])
56 DPKG_BUILD_PROG([update-alternatives])
58 DPKG_BUILD_RELEASE_DATE
61 # Allow alternate directories
62 DPKG_WITH_DIR([devlibdir], [${libdir}],
63 [dpkg development library directory [LIBDIR]])
64 DPKG_WITH_DIR([pkgconfdir], [${sysconfdir}/${PACKAGE_TARNAME}],
65 [dpkg configuration directory [SYSCONFDIR/dpkg]])
66 DPKG_WITH_DIR([docspecdir], [${docdir}/spec],
67 [dpkg specifications directory [DOCDIR/spec]])
68 DPKG_WITH_DIR([methodsdir], [${libexecdir}/${PACKAGE_TARNAME}/methods],
69 [dpkg download methods directory [LIBEXECDIR/dpkg/methods]])
70 DPKG_WITH_DIR([admindir], [${localstatedir}/lib/${PACKAGE_TARNAME}],
71 [dpkg database directory [LOCALSTATEDIR/lib/dpkg]])
72 DPKG_WITH_DIR([backupsdir], [${localstatedir}/backups],
73 [dpkg database backups directory [LOCALSTATEDIR/backups]])
74 DPKG_WITH_DIR([logdir], [${localstatedir}/log],
75 [system logging directory [LOCALSTATEDIR/log]])
76 DPKG_WITH_DIR([pkgconfigdir], [${devlibdir}/pkgconfig],
77 [pkg-config .pc fragments directory [DEVLIBDIR/pkgconfig]])
78 DPKG_WITH_DIR([aclocaldir], [${datadir}/aclocal],
79 [aclocal m4 fragments files directory [DATADIR/aclocal]])
80 DPKG_WITH_DIR([polkitactionsdir], [${datadir}/polkit-1/actions],
81 [polkit .policy actions directory [DATADIR/polkit-1/actions]])
82 DPKG_WITH_DIR([bashcompletionsdir], [${datadir}/bash-completion/completions],
83 [bash completions directory [DATADIR/bash-completion/completions]])
84 DPKG_WITH_DIR([zshcompletionsdir], [${datadir}/zsh/vendor-completions],
85 [zsh vendor completions directory [DATADIR/zsh/vendor-completions]])
87 # Set default dpkg-deb values
88 DPKG_DEB_COMPRESSOR([xz])
90 # Checks for programs.
101 AC_CHECK_PROGS([DOXYGEN], [doxygen])
102 AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
109 # Checks for operating system services and capabilities.
112 # Checks for libraries.
120 AS_IF([test "x$build_dselect" = "xyes"], [
123 AS_IF([test "x$build_start_stop_daemon" = "xyes"], [
129 # Checks for header files.
147 # The glibc project has deprecated the <sys/sysctl.h> header and emits
148 # warnings on its usage, and removed it in 2.32. The Linux kernel removed
149 # support for it in 5.5.
151 # On other systems, we need to check whether to use it.
157 DPKG_CHECK_HEADER_SYS_PROCFS
158 AC_CHECK_HEADERS([sys/proc.h], [], [], [
159 #ifdef HAVE_SYS_PARAM_H
160 #include <sys/param.h>
164 AS_IF([test "x$build_dselect" = "xyes"], [
166 AC_CHECK_HEADERS([cxxabi.h])
170 # Checks for typedefs, structures, and compiler characteristics.
179 DPKG_TYPE_STRUCT_PSINFO
180 DPKG_DECL_SYS_SIGLIST
181 DPKG_DECL_SYS_ERRLIST
183 # Checks for library functions.
185 DPKG_FUNC_C99_SNPRINTF
187 DPKG_CHECK_DECL([offsetof], [stddef.h])
188 DPKG_CHECK_DECL([makedev], [sys/types.h])
189 DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
190 DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
191 DPKG_CHECK_DECL([O_NOFOLLOW], [fcntl.h])
192 DPKG_CHECK_DECL([F_ALLOCSP64], [fcntl.h])
193 DPKG_CHECK_DECL([F_PREALLOCATE], [fcntl.h])
194 DPKG_CHECK_DECL([P_tmpdir], [stdio.h])
196 DPKG_CHECK_COMPAT_FUNCS([\
212 ], [], [AC_MSG_ERROR([missing required function])])
226 AS_IF([test "x$build_dselect" = "xyes"], [
228 AC_CHECK_FUNCS([__cxa_pure_virtual])
233 DPKG_USE_DISK_PREALLOCATE
235 # Checks for the build machinery.
236 AC_DEFINE([LIBDPKG_VOLATILE_API], [1], [Acknowledge the volatility of the API.])
237 DPKG_COMPILER_WARNINGS
238 DPKG_COMPILER_SANITIZER
239 DPKG_COMPILER_ANALYZER
240 DPKG_COMPILER_OPTIMIZATIONS
241 DPKG_LINKER_OPTIMIZATIONS
243 AC_DEFINE([PACKAGE_RELEASE], [PACKAGE_VERSION " (" ARCHITECTURE ")"],
244 [Define the project release information, version and architecture])
246 AC_CONFIG_TESTDIR([src/at])
247 AM_MISSING_PROG([AUTOM4TE], [autom4te])
252 dselect/methods/Makefile
253 dselect/po/Makefile.in
265 scripts/po/Makefile.in
270 AC_CONFIG_HEADERS([config.h])
273 # Print the current configuration
277 Version . . . . . : $PACKAGE_VERSION
278 VCS id . . . . . : $PACKAGE_VCS_ID
282 cpu name . . . . . . . . . . : ${cpu_type}
283 os name . . . . . . . . . . . : ${os_type}
284 arch name . . . . . . . . . . : ${dpkg_arch}
285 arch bits . . . . . . . . . . : ${dpkg_arch_bits}
286 arch endian . . . . . . . . . : ${dpkg_arch_endian}
287 char bits . . . . . . . . . . : ${dpkg_char_bits}
288 char sign . . . . . . . . . . : ${dpkg_char_sign}
289 sizeof(short) . . . . . . . . : ${ac_cv_sizeof_short}
290 sizeof(int) . . . . . . . . . : ${ac_cv_sizeof_int}
291 sizeof(long) . . . . . . . . : ${ac_cv_sizeof_long}
292 sizeof(long long) . . . . . . : ${ac_cv_sizeof_long_long}
293 sizeof(float) . . . . . . . . : ${ac_cv_sizeof_float}
294 sizeof(double) . . . . . . . : ${ac_cv_sizeof_double}
295 sizeof(long double) . . . . . : ${ac_cv_sizeof_long_double}
296 sizeof(void *) . . . . . . . : ${ac_cv_sizeof_void_p}
297 sizeof(off_t) . . . . . . . . : ${ac_cv_sizeof_off_t}
298 sizeof(time_t) . . . . . . . : ${ac_cv_sizeof_time_t}
299 alignof(max_align_t) . . . . : ${ac_cv_alignof_max_align_t}
302 native language support . . . : $USE_NLS
303 unicode support . . . . . . . : $USE_UNICODE
304 development documentation . . : $build_devel_docs
305 code coverage . . . . . . . . : $enable_coverage
306 build shared libraries . . . : $enable_shared
307 mmap loaders . . . . . . . . : $enable_mmap
308 disk pre-allocation . . . . . : $enable_disk_preallocate
309 default dpkg-deb compressor . : $with_deb_compressor
310 default shell interpreter . . : $DPKG_SHELL
311 default pager program . . . . : $DPKG_PAGER
314 devlibdir . . . . . . . . . . : $devlibdir
315 pkgconfdir . . . . . . . . . : $pkgconfdir
316 docspecdir . . . . . . . . . : $docspecdir
317 methodsdir . . . . . . . . . : $methodsdir
318 admindir . . . . . . . . . . : $admindir
319 backupsdir . . . . . . . . . : $backupsdir
320 logdir . . . . . . . . . . . : $logdir
321 pkg-config dir . . . . . . . : $pkgconfigdir
322 aclocal dir . . . . . . . . : $aclocaldir
323 polkit actions dir . . . . . : $polkitactionsdir
324 bash completions dir . . . . : $bashcompletionsdir
325 zsh completions dir . . . . . : $zshcompletionsdir
326 perl interpreter . . . . . . : $PERL
327 perl libdir . . . . . . . . . : $PERL_LIBDIR
330 update-alternatives . . . . . : $build_update_alternatives
331 start-stop-daemon . . . . . . : $build_start_stop_daemon
332 dselect . . . . . . . . . . . : $build_dselect
335 librt . . . . . . . . . . . . : $have_librt
336 libsocket . . . . . . . . . . : ${have_libsocket:-no}
337 libps . . . . . . . . . . . . : ${have_libps:-no}
338 libkvm . . . . . . . . . . . : ${have_libkvm:-no}
339 libselinux . . . . . . . . . : $have_libselinux
340 libmd . . . . . . . . . . . . : $have_libmd
341 libz . . . . . . . . . . . . : $have_libz_impl
342 liblzma . . . . . . . . . . . : $have_liblzma
343 libzstd . . . . . . . . . . . : $have_libzstd
344 libbz2 . . . . . . . . . . . : $have_libbz2
345 libcurses . . . . . . . . . . : ${have_libcurses:-no}