File: acinclude.m4

package info (click to toggle)
owfs 2.8p15-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,460 kB
  • sloc: ansic: 56,355; sh: 11,666; tcl: 1,962; makefile: 1,163; python: 1,114; php: 600; perl: 393; cpp: 105
file content (33 lines) | stat: -rw-r--r-- 498 bytes parent folder | download | duplicates (8)
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
31
32
33
# aclocal macros specific to OWFS

dnl
dnl Check to see if the c compiler supports nested functions
dnl
AC_DEFUN([OW_CHECK_NESTED_FUNCTIONS],
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING(if compiler supports nested functions)
AC_TRY_RUN([
f(void (*nested)())
{
    (*nested)();
}

main()
{
    int a = 0;
    void nested()
    {
        a = 1;
    }
    f(nested);
    if(a != 1)
         exit(1);
    exit(0);
}
],
[AC_MSG_RESULT(yes)
],
AC_MSG_RESULT(no)
CFLAGS="$CFLAGS -DNO_NESTED_FUNCTIONS"
)
])