diff options
author | Doug Evans <dje@gnu.org> | 1997-07-19 02:37:36 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1997-07-19 02:37:36 +0000 |
commit | 2f51182ac3209817ffcea613aa84a0a60de287ae (patch) | |
tree | d83876238768d45bde3aca18b67b9f4b464feb4b /gcc | |
parent | 571a8de585db7ec6c03a846b87a1091e498640fb (diff) | |
download | gcc-2f51182ac3209817ffcea613aa84a0a60de287ae.zip gcc-2f51182ac3209817ffcea613aa84a0a60de287ae.tar.gz gcc-2f51182ac3209817ffcea613aa84a0a60de287ae.tar.bz2 |
Initial revision
From-SVN: r14486
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/acconfig.h | 14 | ||||
-rw-r--r-- | gcc/aclocal.m4 | 27 |
2 files changed, 41 insertions, 0 deletions
diff --git a/gcc/acconfig.h b/gcc/acconfig.h new file mode 100644 index 0000000..690a213 --- /dev/null +++ b/gcc/acconfig.h @@ -0,0 +1,14 @@ + +/* Include the old config.h as config2.h to simplify the transition + to autoconf. */ +#include "config2.h" + +/* Whether malloc must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_MALLOC + +/* Whether realloc must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_REALLOC + +/* Whether free must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_FREE +@TOP@ diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 new file mode 100644 index 0000000..6a45a4c --- /dev/null +++ b/gcc/aclocal.m4 @@ -0,0 +1,27 @@ +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], +[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 |