[Top][All Lists]
[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: |
Wed, 21 Aug 2002 21:41:29 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 |
W. L. Estes wrote:
On Wednesday, 21 August 2002,15:11 -0400, Bruce Lilly wrote:
are almost certainly configure issues on some platforms (I'll test
later today).
Please let me know about any issues with configuration.
Thanks,
--Will
More configure/autoconf bugs:
1. configure frequently tests $?, which is usually unnecessary and
always error-prone in a non-interactive shell. It is far better
to use the shell's if operator to test for command exit status, e.g.
if foo ; then
: blah blah blah
else
: yadda yadda yadda
fi
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 $?).
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...)
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.
Best regards,
Bruce Lilly
- Re: [configure bus while building] flex beta version 2.5.15,
Bruce Lilly <=
Re: [configure bus while building] flex beta version 2.5.15, Bruce Lilly, 2002/08/29