]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Set
authorAkim Demaille <akim@epita.fr>
Mon, 10 Jul 2000 08:38:51 +0000 (08:38 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 10 Jul 2000 08:38:51 +0000 (08:38 +0000)
ac_gnu_compiler.
(_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): Compute
ac_gnu_compiler.
* acgeneral.m4 (AC_LINKER_OPTION): Adjust.

ChangeLog
acgeneral.m4
aclang.m4
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/general.m4
lib/autoconf/lang.m4

index 79edc10ac5f98a3c716d4af9b5ac964ce0c39311..1fef380410924709b9bf30a64faabfdc027ca5f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-07-10  Akim Demaille  <akim@epita.fr>
+
+       * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Set
+       ac_gnu_compiler.
+       (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): Compute
+       ac_gnu_compiler.
+       * acgeneral.m4 (AC_LINKER_OPTION): Adjust.
+
 2000-07-10  Akim Demaille  <akim@epita.fr>
 
        * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Move the code
index b7cf77ab262236bf16adff4c1af33aaad9a7354c..abc35d0974239e44e708159ece0f9fe48efd8fde 100644 (file)
@@ -5047,20 +5047,13 @@ fi
 # doesn't currently support.
 # FIXME: Get rid of this macro.
 AC_DEFUN([AC_LINKER_OPTION],
-[AC_LANG_CASE([C],         [test x"$GCC" = xyes && using_gnu_compiler=yes],
-              [C++],       [test x"$GXX" = xyes && using_gnu_compiler=yes],
-              [FORTRAN77], [test x"$G77" = xyes && using_gnu_compiler=yes],
-                           [using_gnu_compiler=])
-
-dnl I don't understand the point of having the test inside of the
-dnl loop.
-for ac_link_opt in $1; do
-  if test x"$using_gnu_compiler" = xyes; then
+[if test "ac_gnu_compiler" = yes; then
+  for ac_link_opt in $1; do
     $2="[$]$2 -Xlinker $ac_link_opt"
-  else
-    $2="[$]$2 $ac_link_opt"
-  fi
-done])
+  done
+else
+  $2="[$]$2 $1"
+fi])
 
 
 # AC_LIST_MEMBER_OF(ELEMENT, LIST, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
index e05232956d9d9fb9c5865d8b78d3e4895d1a1b4c..2c8f9d081be5e4820caee87e0d188d63783e5858 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -112,7 +112,7 @@ define([_AC_LANG_DISPATCH],
 # -------------
 # Set the current language to LANG.
 #
-# Do *not* write AC_LANG([$1]), because this pair of parens do not
+# Do *not* write AC_LANG([$1]), because this pair of parens does not
 # correspond to an evaluation, rather, they are just part of the name.
 # If you add quotes here, they will be part of the name too, yielding
 # `AC_LANG([C])' for instance, which does not exist.
@@ -169,6 +169,7 @@ define([AC_LANG(C)],
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gcc
 ])
 
 
@@ -191,6 +192,7 @@ define([AC_LANG(C++)],
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gxx
 ])
 
 
@@ -211,6 +213,7 @@ define([AC_LANG(Fortran 77)],
 [ac_ext=f
 ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_g77
 ])
 
 
@@ -580,7 +583,8 @@ if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_gcc=no
 fi])
-if test $ac_cv_prog_gcc = yes; then
+ac_gnu_compiler=$ac_cv_prog_gcc
+if test $ac_gnu_compiler = yes; then
   GCC=yes
 else
   GCC=
@@ -768,8 +772,8 @@ if AC_TRY_COMMAND(${CXX-g++} -E conftest.cc) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_gxx=no
 fi])
-
-if test $ac_cv_prog_gxx = yes; then
+ac_gnu_compiler=$ac_cv_prog_gxx
+if test $ac_gnu_compiler = yes; then
   GXX=yes
 else
   GXX=
@@ -869,7 +873,8 @@ if AC_TRY_COMMAND($F77 -E conftest.f) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_g77=no
 fi])
-if test $ac_cv_prog_g77 = yes; then
+ac_gnu_compiler=$ac_cv_prog_g77
+if test $ac_gnu_compiler = yes; then
   G77=yes
 else
   G77=
index e05232956d9d9fb9c5865d8b78d3e4895d1a1b4c..2c8f9d081be5e4820caee87e0d188d63783e5858 100644 (file)
@@ -112,7 +112,7 @@ define([_AC_LANG_DISPATCH],
 # -------------
 # Set the current language to LANG.
 #
-# Do *not* write AC_LANG([$1]), because this pair of parens do not
+# Do *not* write AC_LANG([$1]), because this pair of parens does not
 # correspond to an evaluation, rather, they are just part of the name.
 # If you add quotes here, they will be part of the name too, yielding
 # `AC_LANG([C])' for instance, which does not exist.
@@ -169,6 +169,7 @@ define([AC_LANG(C)],
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gcc
 ])
 
 
@@ -191,6 +192,7 @@ define([AC_LANG(C++)],
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gxx
 ])
 
 
@@ -211,6 +213,7 @@ define([AC_LANG(Fortran 77)],
 [ac_ext=f
 ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_g77
 ])
 
 
@@ -580,7 +583,8 @@ if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_gcc=no
 fi])
-if test $ac_cv_prog_gcc = yes; then
+ac_gnu_compiler=$ac_cv_prog_gcc
+if test $ac_gnu_compiler = yes; then
   GCC=yes
 else
   GCC=
@@ -768,8 +772,8 @@ if AC_TRY_COMMAND(${CXX-g++} -E conftest.cc) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_gxx=no
 fi])
-
-if test $ac_cv_prog_gxx = yes; then
+ac_gnu_compiler=$ac_cv_prog_gxx
+if test $ac_gnu_compiler = yes; then
   GXX=yes
 else
   GXX=
@@ -869,7 +873,8 @@ if AC_TRY_COMMAND($F77 -E conftest.f) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_g77=no
 fi])
-if test $ac_cv_prog_g77 = yes; then
+ac_gnu_compiler=$ac_cv_prog_g77
+if test $ac_gnu_compiler = yes; then
   G77=yes
 else
   G77=
index e05232956d9d9fb9c5865d8b78d3e4895d1a1b4c..2c8f9d081be5e4820caee87e0d188d63783e5858 100644 (file)
@@ -112,7 +112,7 @@ define([_AC_LANG_DISPATCH],
 # -------------
 # Set the current language to LANG.
 #
-# Do *not* write AC_LANG([$1]), because this pair of parens do not
+# Do *not* write AC_LANG([$1]), because this pair of parens does not
 # correspond to an evaluation, rather, they are just part of the name.
 # If you add quotes here, they will be part of the name too, yielding
 # `AC_LANG([C])' for instance, which does not exist.
@@ -169,6 +169,7 @@ define([AC_LANG(C)],
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gcc
 ])
 
 
@@ -191,6 +192,7 @@ define([AC_LANG(C++)],
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gxx
 ])
 
 
@@ -211,6 +213,7 @@ define([AC_LANG(Fortran 77)],
 [ac_ext=f
 ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_g77
 ])
 
 
@@ -580,7 +583,8 @@ if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_gcc=no
 fi])
-if test $ac_cv_prog_gcc = yes; then
+ac_gnu_compiler=$ac_cv_prog_gcc
+if test $ac_gnu_compiler = yes; then
   GCC=yes
 else
   GCC=
@@ -768,8 +772,8 @@ if AC_TRY_COMMAND(${CXX-g++} -E conftest.cc) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_gxx=no
 fi])
-
-if test $ac_cv_prog_gxx = yes; then
+ac_gnu_compiler=$ac_cv_prog_gxx
+if test $ac_gnu_compiler = yes; then
   GXX=yes
 else
   GXX=
@@ -869,7 +873,8 @@ if AC_TRY_COMMAND($F77 -E conftest.f) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_g77=no
 fi])
-if test $ac_cv_prog_g77 = yes; then
+ac_gnu_compiler=$ac_cv_prog_g77
+if test $ac_gnu_compiler = yes; then
   G77=yes
 else
   G77=
index b7cf77ab262236bf16adff4c1af33aaad9a7354c..abc35d0974239e44e708159ece0f9fe48efd8fde 100644 (file)
@@ -5047,20 +5047,13 @@ fi
 # doesn't currently support.
 # FIXME: Get rid of this macro.
 AC_DEFUN([AC_LINKER_OPTION],
-[AC_LANG_CASE([C],         [test x"$GCC" = xyes && using_gnu_compiler=yes],
-              [C++],       [test x"$GXX" = xyes && using_gnu_compiler=yes],
-              [FORTRAN77], [test x"$G77" = xyes && using_gnu_compiler=yes],
-                           [using_gnu_compiler=])
-
-dnl I don't understand the point of having the test inside of the
-dnl loop.
-for ac_link_opt in $1; do
-  if test x"$using_gnu_compiler" = xyes; then
+[if test "ac_gnu_compiler" = yes; then
+  for ac_link_opt in $1; do
     $2="[$]$2 -Xlinker $ac_link_opt"
-  else
-    $2="[$]$2 $ac_link_opt"
-  fi
-done])
+  done
+else
+  $2="[$]$2 $1"
+fi])
 
 
 # AC_LIST_MEMBER_OF(ELEMENT, LIST, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
index e05232956d9d9fb9c5865d8b78d3e4895d1a1b4c..2c8f9d081be5e4820caee87e0d188d63783e5858 100644 (file)
@@ -112,7 +112,7 @@ define([_AC_LANG_DISPATCH],
 # -------------
 # Set the current language to LANG.
 #
-# Do *not* write AC_LANG([$1]), because this pair of parens do not
+# Do *not* write AC_LANG([$1]), because this pair of parens does not
 # correspond to an evaluation, rather, they are just part of the name.
 # If you add quotes here, they will be part of the name too, yielding
 # `AC_LANG([C])' for instance, which does not exist.
@@ -169,6 +169,7 @@ define([AC_LANG(C)],
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gcc
 ])
 
 
@@ -191,6 +192,7 @@ define([AC_LANG(C++)],
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gxx
 ])
 
 
@@ -211,6 +213,7 @@ define([AC_LANG(Fortran 77)],
 [ac_ext=f
 ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
 ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_g77
 ])
 
 
@@ -580,7 +583,8 @@ if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_gcc=no
 fi])
-if test $ac_cv_prog_gcc = yes; then
+ac_gnu_compiler=$ac_cv_prog_gcc
+if test $ac_gnu_compiler = yes; then
   GCC=yes
 else
   GCC=
@@ -768,8 +772,8 @@ if AC_TRY_COMMAND(${CXX-g++} -E conftest.cc) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_gxx=no
 fi])
-
-if test $ac_cv_prog_gxx = yes; then
+ac_gnu_compiler=$ac_cv_prog_gxx
+if test $ac_gnu_compiler = yes; then
   GXX=yes
 else
   GXX=
@@ -869,7 +873,8 @@ if AC_TRY_COMMAND($F77 -E conftest.f) | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_g77=no
 fi])
-if test $ac_cv_prog_g77 = yes; then
+ac_gnu_compiler=$ac_cv_prog_g77
+if test $ac_gnu_compiler = yes; then
   G77=yes
 else
   G77=