]> git.proxmox.com Git - mirror_zfs-debian.git/blame - config/user-no-format-truncation.m4
gbp-dch: update
[mirror_zfs-debian.git] / config / user-no-format-truncation.m4
CommitLineData
3d248aec
AX
1dnl #
2dnl # Check if gcc supports -Wno-format-truncation option.
3dnl #
4AC_DEFUN([ZFS_AC_CONFIG_USER_NO_FORMAT_TRUNCATION], [
5 AC_MSG_CHECKING([for -Wno-format-truncation support])
6
7 saved_flags="$CFLAGS"
8 CFLAGS="$CFLAGS -Wno-format-truncation"
9
10 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
11 [
12 NO_FORMAT_TRUNCATION=-Wno-format-truncation
13 AC_MSG_RESULT([yes])
14 ],
15 [
16 NO_FORMAT_TRUNCATION=
17 AC_MSG_RESULT([no])
18 ])
19
20 CFLAGS="$saved_flags"
21 AC_SUBST([NO_FORMAT_TRUNCATION])
22])