source: trunk/third/gcc/aclocal.m4 @ 11288

Revision 11288, 822 bytes checked in by ghudson, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r11287, which included commits to RCS files with non-trunk default branches.
Line 
1dnl See whether we need a declaration for a function.
2AC_DEFUN(GCC_NEED_DECLARATION,
3[AC_MSG_CHECKING([whether $1 must be declared])
4AC_CACHE_VAL(gcc_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#ifndef HAVE_RINDEX
21#define rindex strrchr
22#endif
23#ifndef HAVE_INDEX
24#define index strchr
25#endif],
26[char *(*pfn) = (char *(*)) $1],
27gcc_cv_decl_needed_$1=no, gcc_cv_decl_needed_$1=yes)])
28AC_MSG_RESULT($gcc_cv_decl_needed_$1)
29if test $gcc_cv_decl_needed_$1 = yes; then
30  gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
31  AC_DEFINE_UNQUOTED($gcc_tr_decl)
32fi
33])dnl
Note: See TracBrowser for help on using the repository browser.