diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 12:48:14 -0800 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 12:48:14 -0800 |
commit | d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c (patch) | |
tree | ba5654cffacfd2002eefc5bc3764a7971afff1dc /Linux-PAM/acinclude.m4 | |
parent | 4c51da22e068907adb7857d50f5109a467c94d7c (diff) | |
parent | 7cbfa335c57d068d59508c844f3957165cccfb9b (diff) | |
download | pam-d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c.tar.gz pam-d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c.tar.bz2 pam-d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c.zip |
New upstream version 0.99.7.1
Diffstat (limited to 'Linux-PAM/acinclude.m4')
-rw-r--r-- | Linux-PAM/acinclude.m4 | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Linux-PAM/acinclude.m4 b/Linux-PAM/acinclude.m4 new file mode 100644 index 00000000..5318a140 --- /dev/null +++ b/Linux-PAM/acinclude.m4 @@ -0,0 +1,48 @@ +dnl +dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) +dnl +dnl From Japhar. Report changes to japhar@hungry.com +dnl +AC_DEFUN([JAPHAR_GREP_CFLAGS], +[case "$CFLAGS" in +"$1" | "$1 "* | *" $1" | *" $1 "* ) + ifelse($#, 3, [$3], [:]) + ;; +*) + $2 + ;; +esac +]) + +dnl +dnl Test for __attribute__ ((unused)) +dnl Based on code from the tcpdump version 3.7.2 source. +dnl + +AC_DEFUN([AC_C___ATTRIBUTE__], [ +AC_MSG_CHECKING(for __attribute__) +AC_CACHE_VAL(ac_cv___attribute__, [ +AC_TRY_COMPILE([ +#include <stdlib.h> +static void foo (void) __attribute__ ((unused)); + +static void +foo (void) +{ + exit(1); +} +], +[ + exit (0); +], +ac_cv___attribute__=yes, +ac_cv___attribute__=no)]) +if test "$ac_cv___attribute__" = "yes"; then + AC_DEFINE(UNUSED, __attribute__ ((unused)), [define if your compiler has __att +ribute__ ((unused))]) +else + AC_DEFINE(UNUSED,,) +fi +AC_MSG_RESULT($ac_cv___attribute__) +]) + |