File: acinclude.m4

package info (click to toggle)
ypserv 4.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,184 kB
  • sloc: ansic: 10,161; xml: 1,872; sh: 915; makefile: 263; awk: 21
file content (30 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 __attribute__ ((unused))])
else
  AC_DEFINE(UNUSED,,)
fi
AC_MSG_RESULT($ac_cv___attribute__)
])