autoconf-patches
[Top][All Lists]
Advanced

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

FYI: Undefault ac_exeext and ac_objext


From: Akim Demaille
Subject: FYI: Undefault ac_exeext and ac_objext
Date: 22 Jan 2001 15:04:47 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake)

I'm checking this in.  It breaks one test (35, GNU Fortran 77), which
is a good thing.  In fact, we need more tests like this.  As I first
feared, those default values are only hiding the problem, and the
answer is in Tim's proposals.

I also made AC_COMPILE_IFELSE more verbose, so that from

configure:1043: checking whether we are using the GNU Fortran 77 compiler
configure:1057: g77 -c  conftest.F >&5
configure:1060: $? = 0
configure: failed program was:
      program main
#ifndef __GNUC__
       choke me
#endif
      
      end
configure:1077: result: no


We now have:

configure:1043: checking whether we are using the GNU Fortran 77 compiler
configure:1057: g77 -c  conftest.F >&5
configure:1060: $? = 0
configure:1062: test -s conftest.
configure:1065: $? = 1
configure: failed program was:
      program main
#ifndef __GNUC__
       choke me
#endif
      
      end
configure:1077: result: no


I think the line `test -s conftest.'-`configure:1065: $? = 1' is
precious.

        Akim

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * acgeneral.m4 (_AC_COMPILE_IFELSE): Wrap the test -s in
        AC_TRY_COMMAND to improve config.log.
        (_AC_INIT_DEFAULTS): Don't define ac_exeext and ac_objext to
        highlight failures.

Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.671
diff -u -u -r1.671 acgeneral.m4
--- acgeneral.m4 2001/01/22 11:14:37 1.671
+++ acgeneral.m4 2001/01/22 14:01:24
@@ -802,11 +802,6 @@
 ac_tr_sh="sed y%*+%pp%;s%[[^_$ac_cr_alnum]]%_%g"
 ac_tr_cpp="sed y%*$ac_cr_az%P$ac_cr_AZ%;s%[[^_$ac_cr_alnum]]%_%g"
 
-# By default always use an empty string as the executable extension.
-ac_exeext=
-# By default assume that objects files use an extension of .o.
-ac_objext=o
-
 m4_divert_pop([DEFAULTS])dnl
 ])# _AC_INIT_DEFAULTS
 
@@ -2789,7 +2784,8 @@
 m4_define([_AC_COMPILE_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 rm -f conftest.$ac_objext
-AS_IF([AC_TRY_EVAL(ac_compile) && test -s conftest.$ac_objext],
+AS_IF([AC_TRY_EVAL(ac_compile) &&
+         AC_TRY_COMMAND([test -s conftest.$ac_objext])],
       [$2],
       [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
 cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD



reply via email to

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