bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [configure bus while building] flex beta version 2.5.15


From: Akim Demaille
Subject: Re: [configure bus while building] flex beta version 2.5.15
Date: 29 Aug 2002 12:03:57 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

| More configure/autoconf bugs:
| 
| 1. configure frequently tests $?, which is usually unnecessary and
|     always error-prone in a non-interactive shell. 

That's a good one!  Where did you actually find a shell where $?
cannot be trusted the way Autoconf does?  It's funny that after years
of use of this feature, nobody would have noticed.


|    Additionally, configure should
| export PS1=""
|    to ensure that there are no executable commands embedded in the
|    prompt (which is a source of error when testing $?).

I fail to see the relationship between PS1 and configure, which is a
noninteractive, non prompt using script.


| 2. configure uses the following in a failed attempt to determine the
|     default compiler output file name:
| 
| # Be careful to initialize this variable, since it used to be cached.
| # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
| ac_cv_exeext=
| for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
|                  ls a.out conftest 2>/dev/null;
|                  ls a.* conftest.* 2>/dev/null`; do
|    case $ac_file in
|      *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
|      a.out ) # We found the default executable, but exeext='' is most
|              # certainly right.
|              break;;
|      *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
|            # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
|            export ac_cv_exeext
|            break;;
|      * ) break;;
|    esac
| done
| 
| That's:
| a: non-portable (in some cases, ls reports something like
|     a_out.exe not found
|     on stdout, which configure misinterprets as an indication that
|     a_out.exe exists...)

Great!  Please, show where you observed this, so that we can document
this problem (an `ls' that reports errors on stdout).


| and
| b: inefficient
| 
| It should be something like:
| 
| # Be careful to initialize this variable, since it used to be cached.
| # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
| ac_cv_exeext=
| for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* ; do
|    if test -x $ac_file ; then
|      case $ac_file in
|        *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
|        a.out ) # We found the default executable, but exeext='' is most
|                # certainly right.
|                break;;
|        *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
|              # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
|              export ac_cv_exeext
|              break;;
|        * ) break;;
|      esac
|      break
|    fi
| done
| 
| There are similar tests throughout the configure script.

That's better, indeed.  Just -f instead of -x.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]