]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (_AC_RUN_IFELSE): Remove conftest.o when cleaning
authorAkim Demaille <akim@epita.fr>
Wed, 4 Jul 2001 15:12:57 +0000 (15:12 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 4 Jul 2001 15:12:57 +0000 (15:12 +0000)
up.
* acfunctions.m4 (AC_FUNC_WAIT3): Use `break' to silent some
warnings from compilers.
* aclang.m4 (_AC_LANG_COMPILER_GNU): Log the version information
for all the compilers, not only GNU.  Hence move from here...
(AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): to here.

ChangeLog
NEWS
acfunctions.m4
acgeneral.m4
aclang.m4
doc/autoconf.texi
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/functions.m4
lib/autoconf/general.m4
lib/autoconf/lang.m4

index bb13006e7bedb01559dd9e971f34cd2993bfa296..ce00217b4e96ad3e012b0f51bf81312f669f3d19 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-07-04  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (_AC_RUN_IFELSE): Remove conftest.o when cleaning
+       up.
+       * acfunctions.m4 (AC_FUNC_WAIT3): Use `break' to silent some
+       warnings from compilers.
+       * aclang.m4 (_AC_LANG_COMPILER_GNU): Log the version information
+       for all the compilers, not only GNU.  Hence move from here...
+       (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): to here.
+
 2001-07-04  Akim Demaille  <akim@epita.fr>
 
        * acfunctions.m4 (AC_FUNC_STRTOD, AC_FUNC_STRERROR_R)
diff --git a/NEWS b/NEWS
index 85da314aab60a2a762062be50b5c3de6323aa71a..5bbc6199e6c62a32af745c23fdd70fd21046ab46 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-* Major changes in Autoconf 2.50b                       -*- outline -*-
+* Major changes in Autoconf 2.50c                       -*- outline -*-
 ** Documentation
 - AC_ARG_VAR
 - Quadrigraphs
@@ -38,8 +38,7 @@
   specify pre-includes.
 - AC_ARG_VAR refuses to run configure when precious variables have
   changed.
-- When a GNU compiler is found, its characteristics are dumped in the
-  log.
+- Versions of compilers are dumped in the logs.
 
 ** Specific Macros
 - AC_PATH_XTRA only adds -ldnet to $LIBS if it's needed to link.
@@ -51,6 +50,7 @@
 - AC_F77_DUMMY_MAIN, AC_F77_MAIN: new macros to detect whether
   a main-like routine is required/possible when linking C/C++ with
   Fortran.  Users of e.g. AC_F77_WRAPPERS should be aware of these.
+[2.50b]
 \f
 * Major changes in Autoconf 2.50
 
index e294a0334e79c6e41809286dedea94ebbbce99bc..be9a92bed47695f2dbda852ab68b24c469db7433 100644 (file)
@@ -1613,8 +1613,10 @@ main ()
     case 0: /* Child.  */
       sleep(1); /* Give up the CPU.  */
       _exit(0);
+      break;
     case -1: /* What can we do?  */
       _exit(0);
+      break;
     default: /* Parent.  */
       wait3(&i, 0, &r);
       /* Avoid "text file busy" from rm on fast HP-UX machines.  */
index bc921524576f5f5515bb19e9be8e4ce28b9f0741..732bbb0863cf56d48babf8307a07241d7a8186ec 100644 (file)
@@ -2807,6 +2807,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
 # ------------------------------------------------------------
 # Compile, link, and run.
 # This macro can be used during the selection of a compiler.
+# We also remove conftest.o as if the compilation fails, some compilers
+# don't remove it.
 m4_define([_AC_RUN_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 rm -f conftest$ac_exeext
@@ -2816,7 +2818,7 @@ AS_IF([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)],
 echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
 cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
 m4_ifvaln([$3], [$3])dnl])[]dnl
-rm -f core core.* *.core conftest$ac_exeext m4_ifval([$1],
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
                                                      [conftest.$ac_ext])[]dnl
 ])# _AC_RUN_IFELSE
 
index c8f6113966e64803813c84d079cd211ec779795f..f742b4b11c30bdfa7ab5b6ec3c6ea3d4c32c1326 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -556,13 +556,6 @@ m4_define([_AC_LANG_COMPILER_GNU],
                    [ac_compiler_gnu=yes],
                    [ac_compiler_gnu=no])
 ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu=$ac_compiler_gnu
-if test $ac_compiler_gnu = yes; then
-  echo "$as_me:__oline__:" \
-     "checking for GNU _AC_LANG compiler characterisitics" >&AS_MESSAGE_LOG_FD
-  ac_compiler=`set X $ac_compile; echo $[2]`
-  _AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
-  _AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
-fi
 ])])# _AC_LANG_COMPILER_GNU
 
 
@@ -961,6 +954,14 @@ fi
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 _AC_LANG_COMPILER_GNU
@@ -1164,6 +1165,14 @@ AC_CHECK_TOOLS(CXX,
                           [g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC])],
                g++)
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 _AC_LANG_COMPILER_GNU
@@ -1296,6 +1305,14 @@ AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 cft77 frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 fc])])
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 # If we don't use `.F' as extension, the preprocessor is not run on the
index 024d8337a42872e9958b9f0c3126286edfc2bd25..00e5259782cadeda8baadee5543ce947e357f8d0 100644 (file)
@@ -8311,6 +8311,12 @@ Don't rely on any option.  The option @option{-v}, which displays
 non-printing characters, @emph{seems} portable, though.
 
 
+@item @command{cc}
+@c ---------------
+When a compilation such as @samp{cc foo.c -o foo} fails, some compilers
+(such as @sc{cds} on Reliant Unix) leave a @file{foo.o}.
+
+
 @item @command{cmp}
 @c ----------------
 @cindex @command{cmp}
index c8f6113966e64803813c84d079cd211ec779795f..f742b4b11c30bdfa7ab5b6ec3c6ea3d4c32c1326 100644 (file)
@@ -556,13 +556,6 @@ m4_define([_AC_LANG_COMPILER_GNU],
                    [ac_compiler_gnu=yes],
                    [ac_compiler_gnu=no])
 ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu=$ac_compiler_gnu
-if test $ac_compiler_gnu = yes; then
-  echo "$as_me:__oline__:" \
-     "checking for GNU _AC_LANG compiler characterisitics" >&AS_MESSAGE_LOG_FD
-  ac_compiler=`set X $ac_compile; echo $[2]`
-  _AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
-  _AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
-fi
 ])])# _AC_LANG_COMPILER_GNU
 
 
@@ -961,6 +954,14 @@ fi
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 _AC_LANG_COMPILER_GNU
@@ -1164,6 +1165,14 @@ AC_CHECK_TOOLS(CXX,
                           [g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC])],
                g++)
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 _AC_LANG_COMPILER_GNU
@@ -1296,6 +1305,14 @@ AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 cft77 frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 fc])])
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 # If we don't use `.F' as extension, the preprocessor is not run on the
index c8f6113966e64803813c84d079cd211ec779795f..f742b4b11c30bdfa7ab5b6ec3c6ea3d4c32c1326 100644 (file)
@@ -556,13 +556,6 @@ m4_define([_AC_LANG_COMPILER_GNU],
                    [ac_compiler_gnu=yes],
                    [ac_compiler_gnu=no])
 ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu=$ac_compiler_gnu
-if test $ac_compiler_gnu = yes; then
-  echo "$as_me:__oline__:" \
-     "checking for GNU _AC_LANG compiler characterisitics" >&AS_MESSAGE_LOG_FD
-  ac_compiler=`set X $ac_compile; echo $[2]`
-  _AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
-  _AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
-fi
 ])])# _AC_LANG_COMPILER_GNU
 
 
@@ -961,6 +954,14 @@ fi
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 _AC_LANG_COMPILER_GNU
@@ -1164,6 +1165,14 @@ AC_CHECK_TOOLS(CXX,
                           [g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC])],
                g++)
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 _AC_LANG_COMPILER_GNU
@@ -1296,6 +1305,14 @@ AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 cft77 frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 fc])])
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 # If we don't use `.F' as extension, the preprocessor is not run on the
index e294a0334e79c6e41809286dedea94ebbbce99bc..be9a92bed47695f2dbda852ab68b24c469db7433 100644 (file)
@@ -1613,8 +1613,10 @@ main ()
     case 0: /* Child.  */
       sleep(1); /* Give up the CPU.  */
       _exit(0);
+      break;
     case -1: /* What can we do?  */
       _exit(0);
+      break;
     default: /* Parent.  */
       wait3(&i, 0, &r);
       /* Avoid "text file busy" from rm on fast HP-UX machines.  */
index bc921524576f5f5515bb19e9be8e4ce28b9f0741..732bbb0863cf56d48babf8307a07241d7a8186ec 100644 (file)
@@ -2807,6 +2807,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
 # ------------------------------------------------------------
 # Compile, link, and run.
 # This macro can be used during the selection of a compiler.
+# We also remove conftest.o as if the compilation fails, some compilers
+# don't remove it.
 m4_define([_AC_RUN_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 rm -f conftest$ac_exeext
@@ -2816,7 +2818,7 @@ AS_IF([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)],
 echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
 cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
 m4_ifvaln([$3], [$3])dnl])[]dnl
-rm -f core core.* *.core conftest$ac_exeext m4_ifval([$1],
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
                                                      [conftest.$ac_ext])[]dnl
 ])# _AC_RUN_IFELSE
 
index c8f6113966e64803813c84d079cd211ec779795f..f742b4b11c30bdfa7ab5b6ec3c6ea3d4c32c1326 100644 (file)
@@ -556,13 +556,6 @@ m4_define([_AC_LANG_COMPILER_GNU],
                    [ac_compiler_gnu=yes],
                    [ac_compiler_gnu=no])
 ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu=$ac_compiler_gnu
-if test $ac_compiler_gnu = yes; then
-  echo "$as_me:__oline__:" \
-     "checking for GNU _AC_LANG compiler characterisitics" >&AS_MESSAGE_LOG_FD
-  ac_compiler=`set X $ac_compile; echo $[2]`
-  _AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
-  _AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
-fi
 ])])# _AC_LANG_COMPILER_GNU
 
 
@@ -961,6 +954,14 @@ fi
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 _AC_LANG_COMPILER_GNU
@@ -1164,6 +1165,14 @@ AC_CHECK_TOOLS(CXX,
                           [g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC])],
                g++)
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 _AC_LANG_COMPILER_GNU
@@ -1296,6 +1305,14 @@ AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 cft77 frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 fc])])
 
+# Provide some information about the compiler.
+echo "$as_me:__oline__:" \
+     "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
 m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
 # If we don't use `.F' as extension, the preprocessor is not run on the