Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove test of metaxml which is not compatible with the new parser.
[simgrid.git] / acmacro / bfd_need_declarations.m4
1 dnl See whether we need a declaration for a function.
2 AC_DEFUN([BFD_NEED_DECLARATION],
3 [AC_MSG_CHECKING([whether $1 must be declared])
4 AC_CACHE_VAL(bfd_cv_decl_needed_$1,
5 [AC_TRY_COMPILE([
6 #include <stdio.h>
7 #ifdef HAVE_STRING_H
8 #include <string.h>
9 #else
10 #ifdef HAVE_STRINGS_H
11 #include <strings.h>
12 #endif
13 #endif
14 #ifdef HAVE_STDLIB_H
15 #include <stdlib.h>
16 #endif
17 #ifdef HAVE_UNISTD_H
18 #include <unistd.h>
19 #endif],
20 [char *(*pfn) = (char *(*)) $1],
21 bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
22 AC_MSG_RESULT($bfd_cv_decl_needed_$1)
23 if test $bfd_cv_decl_needed_$1 = yes; then
24   AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
25             [Define if $1 is not declared in system header files.])
26 fi
27 ])dnl
28