aboutsummaryrefslogtreecommitdiff
path: root/gcc/aclocal.m4
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-02-01 00:48:06 +0000
committerJeff Law <law@gcc.gnu.org>1998-01-31 17:48:06 -0700
commita81fb89ebed2978466d24ea372dac5adc36337ec (patch)
tree3ce8146b54371c3e1f123fd38bfcb7b686a4b330 /gcc/aclocal.m4
parentf65a7138c4a7858f606aeaa17c6f7b6abd42d928 (diff)
downloadgcc-a81fb89ebed2978466d24ea372dac5adc36337ec.zip
gcc-a81fb89ebed2978466d24ea372dac5adc36337ec.tar.gz
gcc-a81fb89ebed2978466d24ea372dac5adc36337ec.tar.bz2
aclocal.m4 (GCC_NEED_DECLARATION): Modify macro to accept a shell variable argument instead of only hard coded...
* aclocal.m4 (GCC_NEED_DECLARATION): Modify macro to accept a shell variable argument instead of only hard coded functions. (GCC_NEED_DECLARATIONS): New macro to accept multiple functions. * configure.in: Collapse multiple calls to AC_CHECK_FUNCS into one call. Collapse multiple calls to GCC_NEED_DECLARATION into one call to GCC_NEED_DECLARATIONS (new macro.) Check if we need declarations for bcopy, bcmp and bzero. * acconfig.h: Add stubs for bcopy, bcmp and bzero declarations. * gansidecl.h: If we have bcopy but don't declare it, then do so. Likewise for bcmp and bzero. Only define macros for bcopy, bcmp, bzero, index and rindex if they aren't already present. From-SVN: r17563
Diffstat (limited to 'gcc/aclocal.m4')
-rw-r--r--gcc/aclocal.m416
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4
index d7d14a2..58dcaa6 100644
--- a/gcc/aclocal.m4
+++ b/gcc/aclocal.m4
@@ -24,14 +24,24 @@ AC_CACHE_VAL(gcc_cv_decl_needed_$1,
#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
+eval "gcc_cv_decl_needed_$1=no", eval "gcc_cv_decl_needed_$1=yes")])
+if eval "test \"`echo '$gcc_cv_decl_needed_'$1`\" = yes"; then
+ AC_MSG_RESULT(yes)
gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
AC_DEFINE_UNQUOTED($gcc_tr_decl)
+else
+ AC_MSG_RESULT(no)
fi
])dnl
+dnl Check multiple functions to see whether each needs a declaration.
+AC_DEFUN(GCC_NEED_DECLARATIONS,
+[for ac_func in $1
+do
+GCC_NEED_DECLARATION($ac_func)
+done
+])
+
dnl See if symbolic links work and if not, try to substitute either hard links or simple copy.
AC_DEFUN(GCC_PROG_LN_S,
[AC_MSG_CHECKING(whether ln -s works)