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: Bruce Lilly
Subject: Re: [configure bus while building] flex beta version 2.5.15
Date: Thu, 29 Aug 2002 10:40:48 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Akim Demaille wrote:

| 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).

# telnet dim
[...]
 UNIX System V (TWG-TCP/IP) (dim.blilly.com)
[...]
$ mkdir foo
$ cd foo
$ /bin/ls a.exe 2>/dev/null
a.exe not found
$ what /bin/ls
/bin/ls:
         fndcmd:fndcmd.sl 1.68
$ uname -a
UNIX dim SYSTEM5 3.51m mc68k
$ cd
$ rm -rf foo
$ exit

| 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.

Using -x ensures that only executables are found; a further
improvement (w.r.t. maintainability) would then be to remove
all the .o .obj .xcoff .tds .d .pdb .xSYM cruft [of course,
if configure didn't insist on using -g when compiling throw-
away programs, much of that would have been unnecessary in
the first place...].








reply via email to

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