X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=config%2Facx.m4;h=b559c03ebdf2dff5ff0aaf7b1f916dd47a62e806;hp=d2d227d2de0becc7b1e3b63b300c4f9fd28bcce3;hb=2e8ba7b3acf00cbf99ecb468322ee8f298d9eb68;hpb=95a0573209bf27c61ffd0e4f74c3f5690ac06b50 diff --git a/config/acx.m4 b/config/acx.m4 index d2d227d2de0..b559c03ebdf 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -211,6 +211,8 @@ if test -z "$ac_cv_prog_$1" ; then else $1="${ncn_target_tool_prefix}[$]2" fi], [$1="$3"]) +else + $1="$ac_cv_prog_$1" fi ]) []dnl # NCN_STRICT_CHECK_TARGET_TOOLS @@ -324,8 +326,8 @@ if test -z "$ac_cv_path_$1" ; then fi elif test $build != $host && test $have_gcc_for_target = yes; then $1=`$GCC_FOR_TARGET --print-prog-name=$2` - test [$]$1=$2 && $1= - ac_cv_path_$1=[$]$1 + test [$]$1 = $2 && $1= + test -n "[$]$1" && ac_cv_path_$1=[$]$1 fi fi if test -z "$ac_cv_path_$1" && test -n "$gcc_cv_tool_dirs"; then @@ -355,7 +357,8 @@ ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR # Test for GNAT. # We require the gnatbind program, and a compiler driver that -# understands Ada. We use the user's CC setting, already found. +# understands Ada. We use the user's CC setting, already found, +# and possibly add $1 to the command-line parameters. # # Sets the shell variable have_gnat to yes or no as appropriate, and # substitutes GNATBIND and GNATMAKE. @@ -378,7 +381,7 @@ acx_cv_cc_gcc_supports_ada=no # Other compilers, like HP Tru64 UNIX cc, exit successfully when # given a .adb file, but produce no object file. So we must check # if an object file was really produced to guard against this. -errors=`(${CC} -c conftest.adb) 2>&1 || echo failure` +errors=`(${CC} $1[]m4_ifval([$1], [ ])-c conftest.adb) 2>&1 || echo failure` if test x"$errors" = x && test -f conftest.$ac_objext; then acx_cv_cc_gcc_supports_ada=yes fi @@ -485,7 +488,8 @@ AC_DEFUN([GCC_TARGET_TOOL], if test "x${build}" != "x${host}" ; then if expr "x[$]$2" : "x/" > /dev/null; then # We already found the complete path - AC_MSG_RESULT(pre-installed in `dirname [$]$2`) + ac_dir=`dirname [$]$2` + AC_MSG_RESULT(pre-installed in $ac_dir) else # Canadian cross, just use what we found AC_MSG_RESULT(pre-installed) @@ -508,7 +512,8 @@ else AC_MSG_RESULT(just compiled) el])if expr "x[$]$2" : "x/" > /dev/null; then # We already found the complete path - AC_MSG_RESULT(pre-installed in `dirname [$]$2`) + ac_dir=`dirname [$]$2` + AC_MSG_RESULT(pre-installed in $ac_dir) elif test "x$target" = "x$host"; then # We can use an host tool $2='$($3)' @@ -538,10 +543,6 @@ AC_DEFUN([ACX_CHECK_PROG_VER],[ $5) gcc_cv_prog_$2_modern=yes;; *) gcc_cv_prog_$2_modern=no;; esac] - - if test $gcc_cv_prog_$2_modern = no; then - $1="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing $2" - fi ]) else gcc_cv_prog_$2_modern=no @@ -550,3 +551,71 @@ AC_DEFUN([ACX_CHECK_PROG_VER],[ $1="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing $2" fi ]) + +dnl Support the --with-pkgversion configure option. +dnl ACX_PKGVERSION(default-pkgversion) +AC_DEFUN([ACX_PKGVERSION],[ + AC_ARG_WITH(pkgversion, + AS_HELP_STRING([--with-pkgversion=PKG], + [Use PKG in the version string in place of "$1"]), + [case "$withval" in + yes) AC_MSG_ERROR([package version not specified]) ;; + no) PKGVERSION= ;; + *) PKGVERSION="($withval) " ;; + esac], + PKGVERSION="($1) " + ) + AC_SUBST(PKGVERSION) +]) + +dnl Support the --with-bugurl configure option. +dnl ACX_BUGURL(default-bugurl) +AC_DEFUN([ACX_BUGURL],[ + AC_ARG_WITH(bugurl, + AS_HELP_STRING([--with-bugurl=URL], + [Direct users to URL to report a bug]), + [case "$withval" in + yes) AC_MSG_ERROR([bug URL not specified]) ;; + no) BUGURL= + ;; + *) BUGURL="$withval" + ;; + esac], + BUGURL="$1" + ) + case ${BUGURL} in + "") + REPORT_BUGS_TO= + REPORT_BUGS_TEXI= + ;; + *) + REPORT_BUGS_TO="<$BUGURL>" + REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} + ;; + esac; + AC_SUBST(REPORT_BUGS_TO) + AC_SUBST(REPORT_BUGS_TEXI) +]) + +dnl #### +dnl # ACX_CHECK_CYGWIN_CAT_WORKS +dnl # On Cygwin hosts, check that the cat command ignores +dnl # carriage returns as otherwise builds will not work. +dnl # See binutils PR 4334 for more details. +AC_DEFUN([ACX_CHECK_CYGWIN_CAT_WORKS],[ +AC_MSG_CHECKING([to see if cat works as expected]) +echo a >cygwin-cat-check +if test `cat cygwin-cat-check` = a ; then + rm cygwin-cat-check + AC_MSG_RESULT(yes) +else + rm cygwin-cat-check + AC_MSG_RESULT(no) + AC_MSG_ERROR([The cat command does not ignore carriage return characters. + Please either mount the build directory in binary mode or run the following + commands before running any configure script: +set -o igncr +export SHELLOPTS + ]) +fi +])