diff options
author | Steve Langasek <vorlon@debian.org> | 2009-08-24 03:06:11 -0700 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-08 21:25:43 -0800 |
commit | 78915f5a06936cc24cf7776c8b53d08b6ea3616c (patch) | |
tree | 6325216d4660f2a33d2161d71302b8c3f47c76e5 /m4/japhar_grep_cflags.m4 | |
parent | fdd6439782a15a1abe342044e07e5f7501ae73de (diff) | |
parent | 212b52cf29c06cc209bc8ac0540dbab1acdf1464 (diff) | |
download | pam-78915f5a06936cc24cf7776c8b53d08b6ea3616c.tar.gz pam-78915f5a06936cc24cf7776c8b53d08b6ea3616c.tar.bz2 pam-78915f5a06936cc24cf7776c8b53d08b6ea3616c.zip |
merge upstream version 1.1.0
Diffstat (limited to 'm4/japhar_grep_cflags.m4')
-rw-r--r-- | m4/japhar_grep_cflags.m4 | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/m4/japhar_grep_cflags.m4 b/m4/japhar_grep_cflags.m4 new file mode 100644 index 00000000..5318a140 --- /dev/null +++ b/m4/japhar_grep_cflags.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__) +]) + |