test: Pass -T+1 to xz to workaround spurious warning with xz 5.6.0
[dpkg.git] / m4 / dpkg-headers.m4
bloba95c65f703c583717abf25bb95989817e0f25fad
1 # serial 1
2 # Copyright © 2023 Guillem Jover <guillem@debian.org>
4 # DPKG_CHECK_HEADER_SYS_PROCFS
5 # ----------------------------
6 # Check for the <sys/procfs.h> header.
7 AC_DEFUN([DPKG_CHECK_HEADER_SYS_PROCFS], [
8   # On at least Solaris <= 11.3 we cannot use the new structured procfs API
9   # while also using LFS, so we need to check whether including <sys/procfs.h>
10   # is usable, and otherwise undefine _FILE_OFFSET_BITS, but only for the
11   # code using this (that is s-s-d).
12   dpkg_structured_procfs_supports_lfs=1
13   AC_CHECK_HEADERS([sys/procfs.h], [], [
14     # We need to reset the cached value, otherwise we will not be able to
15     # check it again.
16     AS_UNSET([ac_cv_header_sys_procfs_h])
17     # If a bare include failed, check whether we need to disable LFS to be
18     # able to use structured procfs.
19     AC_CHECK_HEADERS([sys/procfs.h], [
20         dpkg_structured_procfs_supports_lfs=0
21       ], [], [[
22 #undef _FILE_OFFSET_BITS
23 #define _STRUCTURED_PROC 1
24     ]])
25   ], [[
26 #define _STRUCTURED_PROC 1
27   ]])
29   AC_DEFINE_UNQUOTED([DPKG_STRUCTURED_PROCFS_SUPPORTS_LFS],
30     [$dpkg_structured_procfs_supports_lfs],
31     [Whether structured procfs supports LFS])
32 ])# DPKG_CHECK_HEADER_SYS_PROCFS