Akim Demaille <[EMAIL PROTECTED]> writes: > Meanwhile, I OK your patch. Thanks. I've got an updated version attached below, with the only additions that AC_OBJEXT is called before AC_EXEEXT in AC_PROG_CC, AC_PROG_CXX and AC_PROG_F77 (AC_EXEEXT uses $ac_objext). > I'd accept patches that do what you suggest too: have _AC_EXEEXT be > independent from AC_LINK_IFELSE, have AC_LINK|COMPILE_IFELSE require > what they need, [...] I looked at the code, but the macros that does the various compiler checks doesn't look "ready" for this change -- in particular, it looks hard to do the necessary changes without breaking the newly introduced AC_NO_EXECUTABLES hack. So I'm afraid I'll leave that mess alone for now. :^/ Regards, Morten 2000-08-30 Morten Eriksen <[EMAIL PROTECTED]> * acspecific.m4: _AC_OBJEXT was using AC_COMPILE_IFELSE, but AC_COMPILE_IFELSE depends on the value of $ac_objext. This dependency deadlock is broken by making _AC_OBJEXT independent of AC_COMPILE_IFELSE. * aclang.m4: _AC_EXEEXT depends on the value of $ac_objext, so run _AC_OBJEXT before _AC_EXEEXT. Also fixes a miniscule typo.
? all.diff Index: aclang.m4 =================================================================== RCS file: /cvs/autoconf/aclang.m4,v retrieving revision 1.59 diff -u -r1.59 aclang.m4 --- aclang.m4 2000/09/05 09:14:10 1.59 +++ aclang.m4 2000/09/06 10:13:07 @@ -238,7 +238,7 @@ # AC_LANG_CONFTEST(BODY) # --------------------- -# Save the BODY in `conftest.$acext'. Add a trailing new line. +# Save the BODY in `conftest.$ac_ext'. Add a trailing new line. define([AC_LANG_CONFTEST], [cat >conftest.$ac_ext <<_ACEOF $1 @@ -610,8 +610,8 @@ _AC_LANG_COMPILER_WORKS _AC_PROG_CC_GNU _AC_PROG_CC_G -AC_EXPAND_ONCE([_AC_EXEEXT]) AC_EXPAND_ONCE([_AC_OBJEXT]) +AC_EXPAND_ONCE([_AC_EXEEXT]) AC_LANG_POP ])# AC_PROG_CC @@ -802,8 +802,8 @@ _AC_LANG_COMPILER_WORKS _AC_PROG_CXX_GNU _AC_PROG_CXX_G -AC_EXPAND_ONCE([_AC_EXEEXT]) AC_EXPAND_ONCE([_AC_OBJEXT]) +AC_EXPAND_ONCE([_AC_EXEEXT]) AC_LANG_POP ])# AC_PROG_CXX @@ -901,9 +901,8 @@ _AC_LANG_COMPILER_WORKS _AC_PROG_F77_GNU _AC_PROG_F77_G - -AC_EXPAND_ONCE([_AC_EXEEXT]) AC_EXPAND_ONCE([_AC_OBJEXT]) +AC_EXPAND_ONCE([_AC_EXEEXT]) AC_LANG_POP ])# AC_PROG_F77 Index: acspecific.m4 =================================================================== RCS file: /cvs/autoconf/acspecific.m4,v retrieving revision 1.293 diff -u -r1.293 acspecific.m4 --- acspecific.m4 2000/08/04 09:21:52 1.293 +++ acspecific.m4 2000/09/06 10:13:08 @@ -1586,16 +1586,22 @@ # determined by ac_objext. define([_AC_OBJEXT], [AC_CACHE_CHECK([for object suffix], ac_cv_objext, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [for ac_file in conftest.*; do - case $ac_file in - *.$ac_ext) ;; - *) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;; - esac - done], - [AC_MSG_ERROR([cannot compile])])]) +[AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) + if AC_TRY_EVAL(ac_compile); then + for ac_file in conftest.*; do + case $ac_file in + *.$ac_ext) ;; + *) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;; + esac + done + else + rm -f conftest.$ac_ext + AC_MSG_ERROR([cannot compile]) + fi +]) AC_SUBST(OBJEXT, $ac_cv_objext)dnl ac_objext=$ac_cv_objext +rm -f conftest.$ac_objext conftest.$ac_ext ])# _AC_OBJEXT