From ae322a1285602b350bd32390244b1c1ef6a2187e Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Tue, 15 May 2007 14:23:29 -0400 Subject: Fix the GNU assembler configuration check --- m4/gas.m4 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'm4') diff --git a/m4/gas.m4 b/m4/gas.m4 index 248057abd..a3c600793 100644 --- a/m4/gas.m4 +++ b/m4/gas.m4 @@ -37,11 +37,12 @@ AC_DEFUN([CC_PROG_AS], [ fi dnl Try to figure out the assembler command. Fallback to as. - if test -z "$AS"; then + ac_prog="" + if test x"$AS" = x""; then AC_MSG_CHECKING([for as used by $CCAS]) - if test x"$ccas_is_gnu" != x"yes"; then + if test x"$ccas_is_gnu" = x"yes"; then # Check if gcc -print-prog-name=as gives a path. - case $host in + case "$host_or_hostalias" in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CCAS -print-prog-name=as) 2>&5 | tr -d '\015'` @@ -60,8 +61,8 @@ AC_DEFUN([CC_PROG_AS], [ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done - AC_MSG_RESULT([$ac_prog]) ;; + *) ac_prog="" ;; esac fi fi @@ -71,8 +72,8 @@ AC_DEFUN([CC_PROG_AS], [ for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_prog="$ac_dir/$ac_prog" + if test -f "$ac_dir/as" || test -f "$ac_dir/as$ac_exeext"; then + ac_prog="$ac_dir/as" break fi done -- cgit v1.2.3