1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-17 21:54:15 +01:00

add --enable-cppcheck

This commit is contained in:
Klas Lindfors 2015-01-29 12:54:02 +01:00
parent 36e10a7ca7
commit 7066011eef
2 changed files with 22 additions and 0 deletions

View File

@ -105,6 +105,11 @@ check:
make cov
endif
if ENABLE_CPPCHECK
cppcheck:
$(CPPCHECK) -q -v -f --enable=all .
endif
# Release
ChangeLog:

View File

@ -112,6 +112,23 @@ AC_ARG_ENABLE([coverage],
[enable_cov=no])
AM_CONDITIONAL([ENABLE_COV],[test '!' "$enable_cov" = no])
AC_ARG_ENABLE([cppcheck],
[AS_HELP_STRING([--enable-cppcheck],
[run cppcheck])],
[enable_cppcheck="$enableval"],
[enable_cppcheck="no"])
have_cppcheck=no
AS_IF([test "x$enable_cppcheck" != xno],
[AC_PATH_PROG([CPPCHECK], [cppcheck], [NONE])
AS_IF([test "x$enable_cppcheck" != xno],
[have_cppcheck=yes
AC_SUBST([CPPCHECK])],
[have_cppcheck=no
AS_IF([test "x$enable_cppcheck" != xauto],
[AC_MSG_ERROR([cannot find cppcheck])])])])
AM_CONDITIONAL([ENABLE_CPPCHECK],[test '!' "$have_cppcheck" = no])
AC_ARG_ENABLE([gcc-warnings],
[AS_HELP_STRING([--enable-gcc-warnings],
[turn on lots of GCC warnings (for developers)])],