diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-12 14:18:46 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-12 14:18:46 +0000 |
commit | 768691b5889868443d9cf16377c155fea70cc9e1 (patch) | |
tree | 5f5076cfd0449d11f8c8da25a09f3d38c0f49186 /config | |
parent | cc87d0c59d6c0818f8001944b1a93ef1b4949af1 (diff) | |
download | gcc-768691b5889868443d9cf16377c155fea70cc9e1.tar.gz |
toplevel:
2005-08-12 Paolo Bonzini <bonzini@gnu.org>
* configure.in: Replace NCN_STRICT_CHECK_TOOL with
NCN_STRICT_CHECK_TOOLS, and likewise for NCN_STRICT_CHECK_TARGET_TOOLS.
Look for alternate names of the target cc and c++
* configure: Regenerate.
config:
2005-08-12 Paolo Bonzini <bonzini@gnu.org>
* config/acx.m4 (NCN_CHECK_TARGET_TOOL, NCN_STRICT_CHECK_TOOL,
NCN_STRICT_CHECK_TARGET_TOOL): Remove.
(NCN_STRICT_CHECK_TOOLS, NCN_STRICT_CHECK_TARGET_TOOLS): New,
based on the deleted macros.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103036 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 7 | ||||
-rw-r--r-- | config/acx.m4 | 88 |
2 files changed, 44 insertions, 51 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index fcbf31b99ec..c90079c72c8 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,10 @@ +2005-08-12 Paolo Bonzini <bonzini@gnu.org> + + * config/acx.m4 (NCN_CHECK_TARGET_TOOL, NCN_STRICT_CHECK_TOOL, + NCN_STRICT_CHECK_TARGET_TOOL): Remove. + (NCN_STRICT_CHECK_TOOLS, NCN_STRICT_CHECK_TARGET_TOOLS): New, + based on the deleted macros. + 2005-07-27 Mark Mitchell <mark@codesourcery.com> * mt-gnu (CXXFLAGS): Include SYSROOT_CFLAGS_FOR_TARGET. diff --git a/config/acx.m4 b/config/acx.m4 index b52342cf4ed..94e3216367b 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -103,72 +103,58 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias- ]) []dnl # _NCN_TOOL_PREFIXES #### -# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) -# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host. -# Code is pretty much lifted from autoconf2.53. +# NCN_STRICT_CHECK_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path]) +# Like plain AC_CHECK_TOOLS, but require prefix if build!=target. -AC_DEFUN([NCN_CHECK_TARGET_TOOL], +AC_DEFUN([NCN_STRICT_CHECK_TOOLS], [AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl -if test -n "$ncn_target_tool_prefix"; then - AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}$2], - [${ncn_target_tool_prefix}$2], , [$4]) -fi -if test -z "$ac_cv_prog_$1" ; then - ncn_cv_$1=$$1 - AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [$3], [$4]) - $1=$ncn_cv_$1 -else - $1="$ac_cv_prog_$1" -fi -]) []dnl # NCN_CHECK_TARGET_TOOL - - -#### -# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) -# Like AC_CHECK_TOOL, but requires the prefix if build!=host. +for ncn_progname in $2; do + if test -n "$ncn_tool_prefix"; then + AC_CHECK_PROG([$1], [${ncn_tool_prefix}${ncn_progname}], + [${ncn_tool_prefix}${ncn_progname}], , [$4]) + fi + if test -z "$ac_cv_prog_$1" && test $build = $host ; then + AC_CHECK_PROG([$1], [${ncn_progname}], [${ncn_progname}], , [$4]) + fi + test -n "$ac_cv_prog_$1" && break +done -AC_DEFUN([NCN_STRICT_CHECK_TOOL], -[AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl -if test -n "$ncn_tool_prefix"; then - AC_CHECK_PROG([$1], [${ncn_tool_prefix}$2], - [${ncn_tool_prefix}$2], , [$4]) -fi if test -z "$ac_cv_prog_$1" ; then + ifelse([$3],[], [set dummy $2 if test $build = $host ; then - ncn_cv_$1=$$1 - AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4]) - $1=$ncn_cv_$1 + $1="[$]2" else - $1="ifelse([$3],[],[${ncn_tool_prefix}$2],[$3])" - fi -else - $1="$ac_cv_prog_$1" + $1="${ncn_tool_prefix}[$]2" + fi], [$1="$3"]) fi -]) []dnl # NCN_STRICT_CHECK_TOOL - +]) []dnl # NCN_STRICT_CHECK_TOOLS #### -# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path]) -# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target. +# NCN_STRICT_CHECK_TARGET_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path]) +# Like CVS Autoconf AC_CHECK_TARGET_TOOLS, but require prefix if build!=target. -AC_DEFUN([NCN_STRICT_CHECK_TARGET_TOOL], +AC_DEFUN([NCN_STRICT_CHECK_TARGET_TOOLS], [AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl -if test -n "$ncn_target_tool_prefix"; then - AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}$2], - [${ncn_target_tool_prefix}$2], , [$4]) -fi +for ncn_progname in $2; do + if test -n "$ncn_target_tool_prefix"; then + AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}${ncn_progname}], + [${ncn_target_tool_prefix}${ncn_progname}], , [$4]) + fi + if test -z "$ac_cv_prog_$1" && test $build = $target ; then + AC_CHECK_PROG([$1], [${ncn_progname}], [${ncn_progname}], , [$4]) + fi + test -n "$ac_cv_prog_$1" && break +done + if test -z "$ac_cv_prog_$1" ; then + ifelse([$3],[], [set dummy $2 if test $build = $target ; then - ncn_cv_$1=$$1 - AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4]) - $1=$ncn_cv_$1 + $1="[$]2" else - $1="ifelse([$3],[],[${ncn_target_tool_prefix}$2],[$3])" - fi -else - $1="$ac_cv_prog_$1" + $1="${ncn_target_tool_prefix}[$]2" + fi], [$1="$3"]) fi -]) []dnl # NCN_STRICT_CHECK_TARGET_TOOL +]) []dnl # NCN_STRICT_CHECK_TARGET_TOOLS ### # AC_PROG_CPP_WERROR |