autoconf
[Top][All Lists]
Advanced

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

Re: AC_OBJEXT again


From: Lars J. Aas
Subject: Re: AC_OBJEXT again
Date: Wed, 29 Nov 2000 21:46:24 +0100
User-agent: Mutt/1.2.5i

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 address@hidden@ environment would try to magically hide it and 
you would
hit with plain `conftest'...

  Lars J



reply via email to

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