summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc/aclocal.m4
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-14 19:12:00 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-14 19:12:00 +0000
commitdf96e1901c8f6b0f125702972a33f062d4c00179 (patch)
treedfe9429b4514f8fb7a993da328e10843f3cc0567 /gnu/usr.bin/gcc/aclocal.m4
parentaff5322427b69c6098ef28e5b51155683046fcc4 (diff)
Diffstat (limited to 'gnu/usr.bin/gcc/aclocal.m4')
-rw-r--r--gnu/usr.bin/gcc/aclocal.m433
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/aclocal.m4 b/gnu/usr.bin/gcc/aclocal.m4
new file mode 100644
index 00000000000..07424f1e9a0
--- /dev/null
+++ b/gnu/usr.bin/gcc/aclocal.m4
@@ -0,0 +1,33 @@
+dnl See whether we need a declaration for a function.
+AC_DEFUN(GCC_NEED_DECLARATION,
+[AC_MSG_CHECKING([whether $1 must be declared])
+AC_CACHE_VAL(gcc_cv_decl_needed_$1,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef HAVE_RINDEX
+#define rindex strrchr
+#endif
+#ifndef HAVE_INDEX
+#define index strchr
+#endif],
+[char *(*pfn) = (char *(*)) $1],
+gcc_cv_decl_needed_$1=no, gcc_cv_decl_needed_$1=yes)])
+AC_MSG_RESULT($gcc_cv_decl_needed_$1)
+if test $gcc_cv_decl_needed_$1 = yes; then
+ gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($gcc_tr_decl)
+fi
+])dnl