autoconf
[Top][All Lists]
Advanced

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

AC_OBJEXT revisited


From: Lars J. Aas
Subject: AC_OBJEXT revisited
Date: Mon, 18 Dec 2000 17:50:27 +0100
User-agent: Mutt/1.2.5i

With Autoconf fresh from CVS, two problems occur with the
OBJEXT test.

1) The "test -s conftest.$ac_objext" part of _AC_COMPILE_IFELSE
   fails because $ac_objext is invalid before the objext test is
   performed.  This makes configure go the "cannot compute OBJEXT"
   route which breaks configure.

Removing that test to get going, reveals the next problem:

2) A "conftest.exe" file is left in $builddir from a previous
   configure run, causing $ac_objext to be detected as .exe.
   `ls' doesn't list the files in the same order as they are
   written on the command line, causing the priority list to go
   bonkers, making the .exe file appear before the .obj file.
   Maybe this is a better solution: ?

  m4_define([_AC_COMPILER_OBJEXT],
  [AC_CACHE_CHECK([for object suffix], ac_cv_objext,
  [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
! [for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
    case $ac_file in
      *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
      *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
         break;;
    esac
  done],

  Lars J
-- 
Innovation is one percent inspiration and ninetynine percent perspiration,
and in my case; twice that...  -- Norville Barnes, `The Hudsucker Proxy'



reply via email to

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