On Wed, Nov 29, 2000 at 07:59:57PM +0100, Akim Demaille wrote:
: Err, I think I should stop working on Autoconf right now:
:
: | for ac_file in `ls conftest.o conftest.obj conftest.* 2>/dev/null`; do
: | case $ac_file in
: | *.o | *.obj ) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`;;
:
: I really wrote thisline to catch .o and .obj before any other
: extension... :( Good night people.
:
: | *.$ac_ext | *.tds ) ;;
: | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`;;
: | esac
: | done
I would feel better if you escaped the loop when you found *.o or *.obj, so
no other yet unknown extension later in the alphabet will override it...
How about doing something along the same lines for exeext:
for ac_file in `ls conftest.exe conftest conftest.* 2>/dev/null`; do
case $ac_file in
conftest ) ac_cv_exeext=;;
*.$ac_cv_object ... ) ;;
*) ac_cv_exeext=`expr "$ac_file" : '.*\.\(.*\)'`;;
esac
done
The problem is, we would probably have to change the ls line for each new exeext
anyways, as the Cyg@OS@ environment would try to magically hide it and you would
hit with plain `conftest'...
Lars J