]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* aclang.m4 (_AC_LANG_ABBREV, _AC_LANG_ABBREV(C))
authorAkim Demaille <akim@epita.fr>
Mon, 2 Oct 2000 13:11:27 +0000 (13:11 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 2 Oct 2000 13:11:27 +0000 (13:11 +0000)
(_AC_LANG_ABBREV(C++), _AC_LANG_ABBREV(Fortran 77): New macros.
(AC_LANG_(C), AC_LANG_(C++), AC_LANG_(Fortran 77)): Don't define
AC_LANG_ABBREV.
(_AC_PROG_PREPROC_WORKS): Adjust.
* acgeneral.m4 (_AC_TRY_CPP): Likewise.

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

index 85ac838bd3407fa3a8c82cb0c9a111d218a2af1e..81c480a1898504991c59144d86f70db886419e7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-10-02  Akim Demaille  <akim@epita.fr>
+
+       * aclang.m4 (_AC_LANG_ABBREV, _AC_LANG_ABBREV(C))
+       (_AC_LANG_ABBREV(C++), _AC_LANG_ABBREV(Fortran 77): New macros.
+       (AC_LANG_(C), AC_LANG_(C++), AC_LANG_(Fortran 77)): Don't define
+       AC_LANG_ABBREV.
+       (_AC_PROG_PREPROC_WORKS): Adjust.
+       * acgeneral.m4 (_AC_TRY_CPP): Likewise.
+
 2000-10-02  Pavel Roskin  <proski@gnu.org>
 
        * acspecific.m4 (AC_PROG_LEX): Use AC_DEFUN_ONCE.
index 14dc82e1fec049e6c76646de5031ea68e3a62f8c..a7490277e9cf8ea5af37424b589de201f0f54424 100644 (file)
@@ -3299,9 +3299,8 @@ popdef([AC_Lib_Name])dnl
 AC_DEFUN([_AC_TRY_CPP],
 [ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
 if AC_TRY_EVAL(ac_try); then
-  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
-  then
-    ac_cpp_err=$ac_[]AC_LANG_ABBREV[]_preproc_warn_flag
+  if egrep -v '^ *\+' conftest.err | grep . >/dev/null; then
+    ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
   else
     ac_cpp_err=
   fi
index 6e291280956f86a6847a4b4e214b116eb62f9479..ec69db300c8ba4a594333d8111a1da27d905957a 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -155,6 +155,13 @@ pushdef([_AC_LANG], _AC_LANG)])
 AU_DEFUN([AC_LANG_RESTORE], [AC_LANG_POP($@)])
 
 
+# _AC_LANG_ABBREV
+# ---------------
+# Return a short signature of _AC_LANG which can be used in shell
+# variable names, or in M4 macro names.
+define([_AC_LANG_ABBREV],
+[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
+
 
 # -------------------- #
 # 1b. The C language.  #
@@ -170,7 +177,6 @@ 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
-define([AC_LANG_ABBREV], [c])dnl
 ])
 
 
@@ -179,6 +185,10 @@ define([AC_LANG_ABBREV], [c])dnl
 AU_DEFUN([AC_LANG_C], [AC_LANG(C)])
 
 
+# _AC_LANG_ABBREV(C)
+# ------------------
+define([_AC_LANG_ABBREV(C)], [c])
+
 
 # ---------------------- #
 # 1c. The C++ language.  #
@@ -194,7 +204,6 @@ 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
-define([AC_LANG_ABBREV], [cxx])dnl
 ])
 
 
@@ -203,6 +212,10 @@ define([AC_LANG_ABBREV], [cxx])dnl
 AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)])
 
 
+# _AC_LANG_ABBREV(C++)
+# --------------------
+define([_AC_LANG_ABBREV(C++)], [cxx])
+
 
 # ----------------------------- #
 # 1d. The Fortran 77 language.  #
@@ -216,7 +229,6 @@ define([AC_LANG(Fortran 77)],
 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
-define([AC_LANG_ABBREV], [f77])dnl
 ])
 
 
@@ -225,7 +237,9 @@ define([AC_LANG_ABBREV], [f77])dnl
 AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)])
 
 
-
+# _AC_LANG_ABBREV(Fortran 77)
+# ---------------------------
+define([_AC_LANG_ABBREV(Fortran 77)], [f77])
 
 
 
@@ -579,21 +593,21 @@ AC_DEFUN([_AC_PROG_PREPROC_WORKS],
 # not just through cpp. "Syntax error" is here to catch this case.
 AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <assert.h>
 Syntax error]])])
-ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=maybe
+ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe
 _AC_TRY_CPP()
 # Now check whether non-existent headers can be detected and how
 # Skip if ac_cpp_err is not empty - ac_cpp is broken
 if test -z "$ac_cpp_err"; then
-  AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <ac_nonexistent.h>]])])
+  AC_LANG_CONFTEST([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])])
   _AC_TRY_CPP()
   if test -z "$ac_cpp_err"; then
     # cannot detect missing includes at all
     ac_cpp_err=yes
   else
     if test "x$ac_cpp_err" = xmaybe; then
-      ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=yes
+      ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=yes
     else
-      ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=
+      ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=
     fi
     ac_cpp_err=
   fi
index 6e291280956f86a6847a4b4e214b116eb62f9479..ec69db300c8ba4a594333d8111a1da27d905957a 100644 (file)
@@ -155,6 +155,13 @@ pushdef([_AC_LANG], _AC_LANG)])
 AU_DEFUN([AC_LANG_RESTORE], [AC_LANG_POP($@)])
 
 
+# _AC_LANG_ABBREV
+# ---------------
+# Return a short signature of _AC_LANG which can be used in shell
+# variable names, or in M4 macro names.
+define([_AC_LANG_ABBREV],
+[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
+
 
 # -------------------- #
 # 1b. The C language.  #
@@ -170,7 +177,6 @@ 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
-define([AC_LANG_ABBREV], [c])dnl
 ])
 
 
@@ -179,6 +185,10 @@ define([AC_LANG_ABBREV], [c])dnl
 AU_DEFUN([AC_LANG_C], [AC_LANG(C)])
 
 
+# _AC_LANG_ABBREV(C)
+# ------------------
+define([_AC_LANG_ABBREV(C)], [c])
+
 
 # ---------------------- #
 # 1c. The C++ language.  #
@@ -194,7 +204,6 @@ 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
-define([AC_LANG_ABBREV], [cxx])dnl
 ])
 
 
@@ -203,6 +212,10 @@ define([AC_LANG_ABBREV], [cxx])dnl
 AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)])
 
 
+# _AC_LANG_ABBREV(C++)
+# --------------------
+define([_AC_LANG_ABBREV(C++)], [cxx])
+
 
 # ----------------------------- #
 # 1d. The Fortran 77 language.  #
@@ -216,7 +229,6 @@ define([AC_LANG(Fortran 77)],
 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
-define([AC_LANG_ABBREV], [f77])dnl
 ])
 
 
@@ -225,7 +237,9 @@ define([AC_LANG_ABBREV], [f77])dnl
 AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)])
 
 
-
+# _AC_LANG_ABBREV(Fortran 77)
+# ---------------------------
+define([_AC_LANG_ABBREV(Fortran 77)], [f77])
 
 
 
@@ -579,21 +593,21 @@ AC_DEFUN([_AC_PROG_PREPROC_WORKS],
 # not just through cpp. "Syntax error" is here to catch this case.
 AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <assert.h>
 Syntax error]])])
-ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=maybe
+ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe
 _AC_TRY_CPP()
 # Now check whether non-existent headers can be detected and how
 # Skip if ac_cpp_err is not empty - ac_cpp is broken
 if test -z "$ac_cpp_err"; then
-  AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <ac_nonexistent.h>]])])
+  AC_LANG_CONFTEST([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])])
   _AC_TRY_CPP()
   if test -z "$ac_cpp_err"; then
     # cannot detect missing includes at all
     ac_cpp_err=yes
   else
     if test "x$ac_cpp_err" = xmaybe; then
-      ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=yes
+      ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=yes
     else
-      ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=
+      ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=
     fi
     ac_cpp_err=
   fi
index 6e291280956f86a6847a4b4e214b116eb62f9479..ec69db300c8ba4a594333d8111a1da27d905957a 100644 (file)
@@ -155,6 +155,13 @@ pushdef([_AC_LANG], _AC_LANG)])
 AU_DEFUN([AC_LANG_RESTORE], [AC_LANG_POP($@)])
 
 
+# _AC_LANG_ABBREV
+# ---------------
+# Return a short signature of _AC_LANG which can be used in shell
+# variable names, or in M4 macro names.
+define([_AC_LANG_ABBREV],
+[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
+
 
 # -------------------- #
 # 1b. The C language.  #
@@ -170,7 +177,6 @@ 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
-define([AC_LANG_ABBREV], [c])dnl
 ])
 
 
@@ -179,6 +185,10 @@ define([AC_LANG_ABBREV], [c])dnl
 AU_DEFUN([AC_LANG_C], [AC_LANG(C)])
 
 
+# _AC_LANG_ABBREV(C)
+# ------------------
+define([_AC_LANG_ABBREV(C)], [c])
+
 
 # ---------------------- #
 # 1c. The C++ language.  #
@@ -194,7 +204,6 @@ 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
-define([AC_LANG_ABBREV], [cxx])dnl
 ])
 
 
@@ -203,6 +212,10 @@ define([AC_LANG_ABBREV], [cxx])dnl
 AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)])
 
 
+# _AC_LANG_ABBREV(C++)
+# --------------------
+define([_AC_LANG_ABBREV(C++)], [cxx])
+
 
 # ----------------------------- #
 # 1d. The Fortran 77 language.  #
@@ -216,7 +229,6 @@ define([AC_LANG(Fortran 77)],
 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
-define([AC_LANG_ABBREV], [f77])dnl
 ])
 
 
@@ -225,7 +237,9 @@ define([AC_LANG_ABBREV], [f77])dnl
 AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)])
 
 
-
+# _AC_LANG_ABBREV(Fortran 77)
+# ---------------------------
+define([_AC_LANG_ABBREV(Fortran 77)], [f77])
 
 
 
@@ -579,21 +593,21 @@ AC_DEFUN([_AC_PROG_PREPROC_WORKS],
 # not just through cpp. "Syntax error" is here to catch this case.
 AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <assert.h>
 Syntax error]])])
-ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=maybe
+ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe
 _AC_TRY_CPP()
 # Now check whether non-existent headers can be detected and how
 # Skip if ac_cpp_err is not empty - ac_cpp is broken
 if test -z "$ac_cpp_err"; then
-  AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <ac_nonexistent.h>]])])
+  AC_LANG_CONFTEST([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])])
   _AC_TRY_CPP()
   if test -z "$ac_cpp_err"; then
     # cannot detect missing includes at all
     ac_cpp_err=yes
   else
     if test "x$ac_cpp_err" = xmaybe; then
-      ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=yes
+      ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=yes
     else
-      ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=
+      ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=
     fi
     ac_cpp_err=
   fi
index 14dc82e1fec049e6c76646de5031ea68e3a62f8c..a7490277e9cf8ea5af37424b589de201f0f54424 100644 (file)
@@ -3299,9 +3299,8 @@ popdef([AC_Lib_Name])dnl
 AC_DEFUN([_AC_TRY_CPP],
 [ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
 if AC_TRY_EVAL(ac_try); then
-  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
-  then
-    ac_cpp_err=$ac_[]AC_LANG_ABBREV[]_preproc_warn_flag
+  if egrep -v '^ *\+' conftest.err | grep . >/dev/null; then
+    ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
   else
     ac_cpp_err=
   fi
index 6e291280956f86a6847a4b4e214b116eb62f9479..ec69db300c8ba4a594333d8111a1da27d905957a 100644 (file)
@@ -155,6 +155,13 @@ pushdef([_AC_LANG], _AC_LANG)])
 AU_DEFUN([AC_LANG_RESTORE], [AC_LANG_POP($@)])
 
 
+# _AC_LANG_ABBREV
+# ---------------
+# Return a short signature of _AC_LANG which can be used in shell
+# variable names, or in M4 macro names.
+define([_AC_LANG_ABBREV],
+[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
+
 
 # -------------------- #
 # 1b. The C language.  #
@@ -170,7 +177,6 @@ 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
-define([AC_LANG_ABBREV], [c])dnl
 ])
 
 
@@ -179,6 +185,10 @@ define([AC_LANG_ABBREV], [c])dnl
 AU_DEFUN([AC_LANG_C], [AC_LANG(C)])
 
 
+# _AC_LANG_ABBREV(C)
+# ------------------
+define([_AC_LANG_ABBREV(C)], [c])
+
 
 # ---------------------- #
 # 1c. The C++ language.  #
@@ -194,7 +204,6 @@ 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
-define([AC_LANG_ABBREV], [cxx])dnl
 ])
 
 
@@ -203,6 +212,10 @@ define([AC_LANG_ABBREV], [cxx])dnl
 AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)])
 
 
+# _AC_LANG_ABBREV(C++)
+# --------------------
+define([_AC_LANG_ABBREV(C++)], [cxx])
+
 
 # ----------------------------- #
 # 1d. The Fortran 77 language.  #
@@ -216,7 +229,6 @@ define([AC_LANG(Fortran 77)],
 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
-define([AC_LANG_ABBREV], [f77])dnl
 ])
 
 
@@ -225,7 +237,9 @@ define([AC_LANG_ABBREV], [f77])dnl
 AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)])
 
 
-
+# _AC_LANG_ABBREV(Fortran 77)
+# ---------------------------
+define([_AC_LANG_ABBREV(Fortran 77)], [f77])
 
 
 
@@ -579,21 +593,21 @@ AC_DEFUN([_AC_PROG_PREPROC_WORKS],
 # not just through cpp. "Syntax error" is here to catch this case.
 AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <assert.h>
 Syntax error]])])
-ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=maybe
+ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe
 _AC_TRY_CPP()
 # Now check whether non-existent headers can be detected and how
 # Skip if ac_cpp_err is not empty - ac_cpp is broken
 if test -z "$ac_cpp_err"; then
-  AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <ac_nonexistent.h>]])])
+  AC_LANG_CONFTEST([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])])
   _AC_TRY_CPP()
   if test -z "$ac_cpp_err"; then
     # cannot detect missing includes at all
     ac_cpp_err=yes
   else
     if test "x$ac_cpp_err" = xmaybe; then
-      ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=yes
+      ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=yes
     else
-      ac_[]AC_LANG_ABBREV[]_preproc_warn_flag=
+      ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=
     fi
     ac_cpp_err=
   fi
index c5e7c62455ebeae1fc221ef26e2e5653c454d765..ce628102223cf919b650ad1b10ac01a840ac705a 100644 (file)
@@ -242,7 +242,7 @@ testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE)
 
 macros.m4: $(MACRO_FILES) $(srcdir)/Makefile.am
        cat $(MACRO_FILES) | \
-         sed -ne 's/^A[CU]_DEFUN(\[*\([a-zA-Z0-9_]*\).*$$/\1/p' | \
+         sed -ne 's/^A[CU]_DEFUN\(_ONCE\)\?(\[*\([a-zA-Z0-9_]*\).*$$/\2/p' | \
          sort | uniq | $(FILTER_MACROS) >defuns
 # Get the list of macros that are required: there is little interest
 # in testing them since they will be run but the guy who requires