summaryrefslogtreecommitdiffstats
path: root/m4/warn_lang_flags.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:22:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:22:51 +0000
commit9ada0093e92388590c7368600ca4e9e3e376f0d0 (patch)
treea56fe41110023676d7082028cbaa47ca4b6e6164 /m4/warn_lang_flags.m4
parentInitial commit. (diff)
downloadpam-9ada0093e92388590c7368600ca4e9e3e376f0d0.tar.xz
pam-9ada0093e92388590c7368600ca4e9e3e376f0d0.zip
Adding upstream version 1.5.2.upstream/1.5.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--m4/warn_lang_flags.m433
1 files changed, 33 insertions, 0 deletions
diff --git a/m4/warn_lang_flags.m4 b/m4/warn_lang_flags.m4
new file mode 100644
index 0000000..7c4871d
--- /dev/null
+++ b/m4/warn_lang_flags.m4
@@ -0,0 +1,33 @@
+#!/usr/bin/m4
+
+AC_DEFUN([pam_WARN_LANG_FLAGS], [dnl
+gl_WARN_ADD([-W])
+gl_WARN_ADD([-Wall])
+gl_WARN_ADD([-Wbad-function-cast])
+gl_WARN_ADD([-Wcast-align])
+gl_WARN_ADD([-Wcast-align=strict])
+gl_WARN_ADD([-Wcast-qual])
+gl_WARN_ADD([-Wdeprecated])
+gl_WARN_ADD([-Winline])
+gl_WARN_ADD([-Wmain])
+gl_WARN_ADD([-Wmissing-declarations])
+gl_WARN_ADD([-Wmissing-format-attribute])
+gl_WARN_ADD([-Wmissing-prototypes])
+gl_WARN_ADD([-Wp64])
+gl_WARN_ADD([-Wpointer-arith])
+gl_WARN_ADD([-Wreturn-type])
+gl_WARN_ADD([-Wshadow])
+gl_WARN_ADD([-Wstrict-prototypes])
+gl_WARN_ADD([-Wuninitialized])
+gl_WARN_ADD([-Wwrite-strings])
+AC_ARG_ENABLE([Werror],
+ [AS_HELP_STRING([--enable-Werror], [turn on -Werror compiler option])],
+ [case $enableval in
+ yes) gl_WARN_ADD([-Werror]) ;;
+ no) ;;
+ *) AC_MSG_ERROR([bad value $enableval for Werror option]) ;;
+ esac])
+AS_VAR_PUSHDEF([pam_WARN_FLAGS], [WARN_[]_AC_LANG_PREFIX[]FLAGS])dnl
+AC_SUBST(pam_WARN_FLAGS)
+AS_VAR_POPDEF([pam_WARN_FLAGS])dnl
+])