X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Faclocal.m4;h=c5c71caa31a894cafa7464ab415d3a5e928084dc;hb=a38904360a9b5e258d5011e686ebf58e89399379;hp=e2ed6b505904cd160a273a54be3d96726f16eb6d;hpb=6a8964db4604d7ac292e7f0ee16ec495478e3249;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 index e2ed6b50590..c5c71caa31a 100644 --- a/gcc/aclocal.m4 +++ b/gcc/aclocal.m4 @@ -3,51 +3,6 @@ sinclude(../config/accross.m4) sinclude(../config/gettext.m4) sinclude(../config/progtest.m4) -dnl See if stdbool.h properly defines bool and true/false. -AC_DEFUN([gcc_AC_HEADER_STDBOOL], -[AC_CACHE_CHECK([for working stdbool.h], - ac_cv_header_stdbool_h, -[AC_TRY_COMPILE([#include ], -[bool foo = false;], -ac_cv_header_stdbool_h=yes, ac_cv_header_stdbool_h=no)]) -if test $ac_cv_header_stdbool_h = yes; then - AC_DEFINE(HAVE_STDBOOL_H, 1, - [Define if you have a working header file.]) -fi -]) - -dnl Fixed AC_CHECK_TYPE that doesn't need anything in acconfig.h. -dnl Remove after migrating to 2.5x. -AC_DEFUN([gcc_AC_CHECK_TYPE], -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL(ac_cv_type_$1, -[AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include -#if STDC_HEADERS -#include -#include -#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl -AC_MSG_RESULT($ac_cv_type_$1) -if test $ac_cv_type_$1 = no; then - AC_DEFINE($1, $2, [Define as \`$2' if doesn't define.]) -fi -]) - - -dnl See whether we can include both string.h and strings.h. -AC_DEFUN([gcc_AC_HEADER_STRING], -[AC_CACHE_CHECK([whether string.h and strings.h may both be included], - gcc_cv_header_string, -[AC_TRY_COMPILE([#include -#include ], , gcc_cv_header_string=yes, gcc_cv_header_string=no)]) -if test $gcc_cv_header_string = yes; then - AC_DEFINE(STRING_WITH_STRINGS, 1, [Define if you can safely include both and .]) -fi -]) - dnl See whether we need a declaration for a function. dnl The result is highly dependent on the INCLUDES passed in, so make sure dnl to use a different cache variable name in this macro if it is invoked @@ -73,11 +28,13 @@ dnl Arrange to define HAVE_DECL_ to 0 or 1 as appropriate. dnl gcc_AC_CHECK_DECLS(SYMBOLS, dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]]) AC_DEFUN([gcc_AC_CHECK_DECLS], -[for ac_func in $1 +[AC_FOREACH([gcc_AC_Func], [$1], + [AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_[]gcc_AC_Func), + [Define to 1 if we found a declaration for ']gcc_AC_Func[', otherwise + define to 0.])])dnl +for ac_func in $1 do -changequote(, )dnl - ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` -changequote([, ])dnl + ac_tr_decl=AS_TR_CPP([HAVE_DECL_$ac_func]) gcc_AC_CHECK_DECL($ac_func, [AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2], [AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3], @@ -93,12 +50,6 @@ dnl during this test. $4 ) done -dnl Automatically generate config.h entries via autoheader. -if test x = y ; then - patsubst(translit([$1], [a-z], [A-Z]), [\w+], - [AC_DEFINE([HAVE_DECL_\&], 1, - [Define to 1 if we found this declaration otherwise define to 0.])])dnl -fi ]) dnl 'make compare' can be significantly faster, if cmp itself can @@ -187,50 +138,6 @@ fi AC_SUBST(LN_S)dnl ]) -dnl See if hard links work and if not, try to substitute either symbolic links or simple copy. -AC_DEFUN([gcc_AC_PROG_LN], -[AC_MSG_CHECKING(whether ln works) -AC_CACHE_VAL(gcc_cv_prog_LN, -[rm -f conftestdata_t -echo >conftestdata_f -if ln conftestdata_f conftestdata_t 2>/dev/null -then - gcc_cv_prog_LN="ln" -else - if ln -s conftestdata_f conftestdata_t 2>/dev/null - then - gcc_cv_prog_LN="ln -s" - else - gcc_cv_prog_LN=cp - fi -fi -rm -f conftestdata_f conftestdata_t -])dnl -LN="$gcc_cv_prog_LN" -if test "$gcc_cv_prog_LN" = "ln"; then - AC_MSG_RESULT(yes) -else - if test "$gcc_cv_prog_LN" = "ln -s"; then - AC_MSG_RESULT([no, using ln -s]) - else - AC_MSG_RESULT([no, and neither does ln -s, so using cp]) - fi -fi -AC_SUBST(LN)dnl -]) - -dnl Check whether _Bool is built-in. -AC_DEFUN([gcc_AC_C__BOOL], -[AC_CACHE_CHECK(for built-in _Bool, gcc_cv_c__bool, -[AC_TRY_COMPILE(, -[_Bool foo;], -gcc_cv_c__bool=yes, gcc_cv_c__bool=no) -]) -if test $gcc_cv_c__bool = yes; then - AC_DEFINE(HAVE__BOOL, 1, [Define if the \`_Bool' type is built-in.]) -fi -]) - dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead dnl of the usual 2. AC_DEFUN([gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG], @@ -316,41 +223,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' AC_SUBST(INSTALL_DATA)dnl ]) -dnl Test for GNAT. -dnl We require the gnatbind program, and a compiler driver that -dnl understands Ada. We use the user's CC setting, already found. -dnl -dnl Sets the shell variable have_gnat to yes or no as appropriate, and -dnl substitutes GNATBIND. -AC_DEFUN([gcc_AC_PROG_GNAT], -[AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) -AC_REQUIRE([AC_PROG_CC]) -AC_CHECK_TOOL(GNATBIND, gnatbind, no) -AC_CACHE_CHECK([whether compiler driver understands Ada], - gcc_cv_cc_supports_ada, -[cat >conftest.adb <&1 || echo failure` -if test x"$errors" = x; then - gcc_cv_cc_supports_ada=yes - break -fi -rm -f conftest.*]) - -if test x$GNATBIND != xno && test x$gcc_cv_supports_ada != xno; then - have_gnat=yes -else - have_gnat=no -fi -]) - dnl GCC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]]) dnl like AC_PATH_PROG but use other cache variables AC_DEFUN([GCC_PATH_PROG],