]> granicus.if.org Git - linux-pam/blob - m4/japhar_grep_cflags.m4
pam_unix: Change the salt length for new hashes to 16 characters
[linux-pam] / m4 / japhar_grep_cflags.m4
1 dnl
2 dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
3 dnl
4 dnl From Japhar.  Report changes to japhar@hungry.com
5 dnl
6 AC_DEFUN([JAPHAR_GREP_CFLAGS],
7 [case "$CFLAGS" in
8 "$1" | "$1 "* | *" $1" | *" $1 "* )
9   ifelse($#, 3, [$3], [:])
10   ;;
11 *)
12   $2
13   ;;
14 esac
15 ])
16
17 dnl
18 dnl Test for __attribute__ ((unused))
19 dnl Based on code from the tcpdump version 3.7.2 source.
20 dnl
21
22 AC_DEFUN([AC_C___ATTRIBUTE__], [
23 AC_MSG_CHECKING(for __attribute__)
24 AC_CACHE_VAL(ac_cv___attribute__, [
25 AC_TRY_COMPILE([
26 #include <stdlib.h>
27 static void foo (void) __attribute__ ((unused));
28
29 static void
30 foo (void)
31 {
32   exit(1);
33 }
34 ],
35 [
36   exit (0);
37 ],
38 ac_cv___attribute__=yes,
39 ac_cv___attribute__=no)])
40 if test "$ac_cv___attribute__" = "yes"; then
41   AC_DEFINE(UNUSED, __attribute__ ((unused)), [define if your compiler has __att
42 ribute__ ((unused))])
43 else
44   AC_DEFINE(UNUSED,,)
45 fi
46 AC_MSG_RESULT($ac_cv___attribute__)
47 ])