po: Update German manpage translation
[dpkg.git] / configure.ac
blob10d2ad278d0d0efc6f5a8ca486feb8d539b2eeb8
1 # Process this file with autoconf to produce a configure script.
3 m4_pattern_forbid([^_?DPKG_])
5 AC_PREREQ(2.60)
6 AC_INIT([dpkg], m4_esyscmd([./get-version]), [debian-dpkg@lists.debian.org],
7         [dpkg], [https://wiki.debian.org/Teams/Dpkg])
8 DPKG_DIST_IS_RELEASE
9 AC_SUBST([PACKAGE_COPYRIGHT_HOLDER], ['Dpkg Developers'])
10 AC_SUBST([PACKAGE_VCS_TYPE], [git])
11 AC_SUBST([PACKAGE_VCS_URL], [https://git.dpkg.org/git/dpkg/dpkg.git])
12 AC_SUBST([PACKAGE_VCS_WEB], [https://git.dpkg.org/cgit/dpkg/dpkg.git])
13 AC_SUBST([PACKAGE_BUG_WEB], [https://bugs.debian.org/src:dpkg])
14 AC_SUBST([PACKAGE_CPAN_NAME], [Dpkg])
15 AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
16 AC_CONFIG_MACRO_DIR([m4])
17 AC_CONFIG_AUX_DIR([build-aux])
19 AC_USE_SYSTEM_EXTENSIONS
21 AM_INIT_AUTOMAKE(
22   [1.11]
23   [-Wall]
24   [foreign]
25   [nostdinc]
26   [tar-ustar no-dist-gzip dist-xz]
28 AM_SILENT_RULES([yes])
30 # Require at least this gettext version, but will take any later version too.
31 AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])
32 # XXX: We cannot remove the following macro due to backwards compatibility
33 # reasons. The above macro is set unconditionally to the minimal version
34 # required, and the below is set to 0.19.6, the first version introducing
35 # the AM_GNU_GETTEXT_REQUIRE_VERSION macro.
36 AM_GNU_GETTEXT_VERSION([0.19.6])
37 AM_GNU_GETTEXT([external])
38 DPKG_DIST_CHECK([test "$GMSGFMT" = ":" && test "$USE_NLS" = "yes"],
39   [gettext required when NLS support enabled])
41 # Shared libraries are disabled on purpose, currently there is no ABI stability
42 # guarantee, and it will be broken at will. The infrastructure is in place just
43 # to be able to test that its future activation will work.
44 AM_PROG_AR
45 LT_INIT([disable-shared])
46 DPKG_BUILD_SHARED_LIBS
47 DPKG_LINKER_AS_NEEDED
48 DPKG_LINKER_VERSION_SCRIPT
50 # Allow compilation without optional programs
51 DPKG_BUILD_PROG([dselect])
52 DPKG_BUILD_PROG([start-stop-daemon])
53 DPKG_BUILD_PROG([update-alternatives])
55 DPKG_BUILD_RELEASE_DATE
56 DPKG_BUILD_DEVEL_DOCS
58 # Allow alternate directories
59 DPKG_WITH_DIR([devlibdir], [${libdir}],
60   [dpkg development library directory [LIBDIR]])
61 DPKG_WITH_DIR([pkgconfdir], [${sysconfdir}/${PACKAGE_NAME}],
62   [dpkg configuration directory [SYSCONFDIR/dpkg]])
63 DPKG_WITH_DIR([admindir], [${localstatedir}/lib/${PACKAGE_NAME}],
64   [dpkg database directory [LOCALSTATEDIR/lib/dpkg]])
65 DPKG_WITH_DIR([logdir], [${localstatedir}/log],
66   [system logging directory [LOCALSTATEDIR/log]])
68 # Set default dpkg-deb values
69 DPKG_DEB_COMPRESSOR([xz])
70 DPKG_DEB_PROG_TAR
72 # Checks for programs.
73 AC_PROG_CC
74 DPKG_C_C99
75 AC_PROG_CXX
76 DPKG_CXX_CXX11
77 DPKG_PROG_PATCH
78 AC_CHECK_PROGS([DOXYGEN], [doxygen])
79 AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
80 DPKG_PROG_PO4A
81 DPKG_PROG_PERL
82 DPKG_PROG_POD2MAN
83 DPKG_CODE_COVERAGE
85 # Checks for operating system services and capabilities.
86 AC_SYS_LARGEFILE
88 # Checks for libraries.
89 DPKG_LIB_MD
90 DPKG_LIB_Z
91 DPKG_LIB_BZ2
92 DPKG_LIB_LZMA
93 DPKG_LIB_SELINUX
94 AS_IF([test "x$build_dselect" = "xyes"], [
95   DPKG_LIB_CURSES
97 AS_IF([test "x$build_start_stop_daemon" = "xyes"], [
98   DPKG_LIB_PS
99   DPKG_LIB_KVM
102 # Checks for header files.
103 AC_HEADER_STDC
104 AC_CHECK_HEADERS([\
105   stddef.h \
106   error.h \
107   err.h \
108   locale.h \
109   xlocale.h \
110   libintl.h \
111   kvm.h \
112   sys/sysmacros.h \
113   sys/param.h \
114   sys/syscall.h \
115   sys/user.h \
116   sys/procfs.h \
117   sys/pstat.h \
118   linux/fiemap.h \
120 AS_CASE([$host_os],
121   [linux-gnu*], [
122     # The glibc project has deprecated the <sys/sysctl.h> header and emits
123     # warnings on its usage, and removed it in 2.32. The Linux kernel removed
124     # support for it in 5.5.
125   ], [
126     # On other systems, we need to check whether to use it.
127     AC_CHECK_HEADERS([\
128       sys/sysctl.h \
129     ])
130   ]
132 AC_CHECK_HEADERS([sys/proc.h], [], [], [
133 #ifdef HAVE_SYS_PARAM_H
134 #include <sys/param.h>
135 #endif
138 AS_IF([test "x$build_dselect" = "xyes"], [
139   AC_LANG_PUSH([C++])
140   AC_CHECK_HEADERS([cxxabi.h])
141   AC_LANG_POP([C++])
144 # Checks for typedefs, structures, and compiler characteristics.
145 AC_C_BIGENDIAN
146 AC_C_CONST
147 AC_C_INLINE
148 AC_C_VOLATILE
149 AC_TYPE_MODE_T
150 AC_TYPE_PID_T
151 AC_TYPE_SIZE_T
152 DPKG_TYPE_PTRDIFF_T
153 AC_CHECK_SIZEOF([unsigned int])
154 AC_CHECK_SIZEOF([unsigned long])
155 DPKG_DECL_SYS_SIGLIST
156 DPKG_DECL_SYS_ERRLIST
158 # Checks for library functions.
159 DPKG_FUNC_VA_COPY
160 DPKG_FUNC_C99_SNPRINTF
161 DPKG_CHECK_DECL([offsetof], [stddef.h])
162 DPKG_CHECK_DECL([makedev], [sys/types.h])
163 DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
164 DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
165 DPKG_CHECK_DECL([O_NOFOLLOW], [fcntl.h])
166 DPKG_CHECK_DECL([F_ALLOCSP64], [fcntl.h])
167 DPKG_CHECK_DECL([F_PREALLOCATE], [fcntl.h])
168 DPKG_CHECK_DECL([P_tmpdir], [stdio.h])
169 DPKG_CHECK_PROGNAME
170 DPKG_CHECK_COMPAT_FUNCS([\
171   getopt \
172   getopt_long \
173   obstack_free \
174   strchrnul \
175   strnlen \
176   strndup \
177   strerror \
178   strsignal \
179   asprintf \
180   scandir \
181   alphasort \
182   unsetenv \
184 AC_CHECK_FUNCS([memcpy lchown],
185   [], [AC_MSG_ERROR([missing required function])])
186 AC_CHECK_FUNCS([\
187   strtoimax \
188   isascii \
189   setsid \
190   getdtablesize \
191   getprogname \
192   getexecname \
193   lutimes \
194   fallocate \
195   posix_fallocate \
196   posix_fadvise \
197   uselocale \
200 AS_IF([test "x$build_dselect" = "xyes"], [
201   AC_LANG_PUSH([C++])
202   AC_CHECK_FUNCS([__cxa_pure_virtual])
203   AC_LANG_POP([C++])
206 DPKG_USE_MMAP
207 DPKG_USE_DISK_PREALLOCATE
209 # Checks for the build machinery.
210 AC_DEFINE([LIBDPKG_VOLATILE_API], [1], [Acknowledge the volatility of the API.])
211 DPKG_COMPILER_WARNINGS
212 DPKG_COMPILER_OPTIMIZATIONS
213 DPKG_LINKER_OPTIMIZATIONS
214 DPKG_ARCHITECTURE
215 AC_DEFINE([PACKAGE_RELEASE], [PACKAGE_VERSION " (" ARCHITECTURE ")"],
216   [Define the project release information, version and architecture])
218 AC_CONFIG_TESTDIR([t-func])
219 AM_MISSING_PROG([AUTOM4TE], [autom4te])
221 AC_CONFIG_FILES([
222   Makefile
223   t-func/Makefile
224   t-func/atlocal
225   dpkg-deb/Makefile
226   dpkg-split/Makefile
227   dselect/Makefile
228   dselect/methods/Makefile
229   dselect/po/Makefile.in
230   lib/Makefile
231   lib/compat/Makefile
232   lib/dpkg/Makefile
233   lib/dpkg/libdpkg.pc
234   lib/dpkg/t/Makefile
235   doc/Doxyfile
236   man/Makefile
237   po/Makefile.in
238   scripts/Build.PL
239   scripts/Makefile
240   scripts/README.cpan
241   scripts/mk/Makefile
242   scripts/po/Makefile.in
243   src/Makefile
244   utils/Makefile
246 AC_CONFIG_HEADERS([config.h])
247 AC_OUTPUT
249 # Print the current configuration
250 cat <<CONFIG
252 Configuration:
253   Features:
254     native language support . . . : $USE_NLS
255     unicode support . . . . . . . : $USE_UNICODE
256     development documentation . . : $build_devel_docs
257     code coverage . . . . . . . . : $enable_coverage
258     build shared libraries  . . . : $enable_shared
259     mmap loaders  . . . . . . . . : $enable_mmap
260     disk pre-allocation . . . . . : $enable_disk_preallocate
261     default dpkg-deb compressor . : $with_dpkg_deb_compressor
263   Paths:
264     devlibdir . . . . . . . . . . : $devlibdir
265     pkgconfdir  . . . . . . . . . : $pkgconfdir
266     admindir  . . . . . . . . . . : $admindir
267     logdir  . . . . . . . . . . . : $logdir
268     perl interpreter  . . . . . . : $PERL
269     perl libdir . . . . . . . . . : $PERL_LIBDIR
271   Programs:
272     update-alternatives . . . . . : $build_update_alternatives
273     start-stop-daemon . . . . . . : $build_start_stop_daemon
274     dselect . . . . . . . . . . . : $build_dselect
276   System Libraries:
277     libps . . . . . . . . . . . . : ${have_libps:-no}
278     libkvm  . . . . . . . . . . . : ${have_libkvm:-no}
279     libselinux  . . . . . . . . . : $have_libselinux
280     libmd . . . . . . . . . . . . : $have_libmd
281     libz  . . . . . . . . . . . . : $have_libz
282     liblzma . . . . . . . . . . . : $have_liblzma
283     libbz2  . . . . . . . . . . . : $have_libbz2
284     libcurses . . . . . . . . . . : ${have_libcurses:-no}
285 CONFIG