mirror of
git://git.sv.gnu.org/autoconf
synced 2024-11-21 01:01:48 +08:00
Start the language support overhaul: Introduce AC_LANG().
* acgeneral.m4 (AC_LANG): Renamed as _AC_LANG_CURRENT. (AC_LANG, AC_LANG(C), AC_LANG(C++), AC_LANG(FORTRAN77)): New macros. (AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_FORTRAN): AU_DEFUN'ed. Adjust all callers. * acspecific.m4 (AC_F77_NAME_MANGLING): Remove the exceeding AC_LANG_RESTORE. * tests/Makefile.am (FILTER_MACROS): Add AC_LANG.
This commit is contained in:
parent
1a1ee72ec1
commit
2200cf61c9
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2000-03-21 Akim Demaille <akim@epita.fr>
|
||||
|
||||
Start the language support overhaul: Introduce AC_LANG().
|
||||
|
||||
* acgeneral.m4 (AC_LANG): Renamed as _AC_LANG_CURRENT.
|
||||
(AC_LANG, AC_LANG(C), AC_LANG(C++), AC_LANG(FORTRAN77)): New
|
||||
macros.
|
||||
(AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_FORTRAN): AU_DEFUN'ed.
|
||||
Adjust all callers.
|
||||
* acspecific.m4 (AC_F77_NAME_MANGLING): Remove the exceeding
|
||||
AC_LANG_RESTORE.
|
||||
* tests/Makefile.am (FILTER_MACROS): Add AC_LANG.
|
||||
|
||||
2000-03-21 Akim Demaille <akim@epita.fr>
|
||||
|
||||
Speed ups.
|
||||
|
99
acgeneral.m4
99
acgeneral.m4
@ -1379,7 +1379,7 @@ echo >confdefs.h
|
||||
dnl Let the site file select an alternate cache file if it wants to.
|
||||
AC_SITE_LOAD
|
||||
AC_CACHE_LOAD
|
||||
AC_LANG_C
|
||||
AC_LANG(C)
|
||||
|
||||
_AC_PROG_ECHO()dnl
|
||||
dnl Substitute for predefined variables.
|
||||
@ -2065,14 +2065,45 @@ define(AC_MSG_ERROR_UNQUOTED,
|
||||
# Expand into IF-LANG1 if the current language is LANG1 etc. else
|
||||
# into default.
|
||||
define(AC_LANG_CASE,
|
||||
[m4_case(AC_LANG, $@)])
|
||||
[m4_case(_AC_LANG_CURRENT, $@)])
|
||||
|
||||
|
||||
# AC_LANG_C
|
||||
# ---------
|
||||
AC_DEFUN(AC_LANG_C,
|
||||
[define([AC_LANG], [C])dnl
|
||||
ac_ext=c
|
||||
# AC_LANG_SAVE
|
||||
# ------------
|
||||
# Push the current language on a stack.
|
||||
define(AC_LANG_SAVE,
|
||||
[pushdef([AC_LANG_STACK], _AC_LANG_CURRENT)])
|
||||
|
||||
|
||||
# AC_LANG_RESTORE
|
||||
# ---------------
|
||||
# Restore the current language from the stack.
|
||||
pushdef([AC_LANG_RESTORE],
|
||||
[ifelse(AC_LANG_STACK, [AC_LANG_STACK],
|
||||
[AC_FATAL([too many AC_LANG_RESTORE])])dnl
|
||||
AC_LANG(AC_LANG_STACK)dnl
|
||||
popdef([AC_LANG_STACK])])
|
||||
|
||||
|
||||
# AC_LANG(LANG)
|
||||
# -------------
|
||||
# Set the current language to LANG.
|
||||
#
|
||||
# Do *not* write AC_LANG([$1]), because this pair of parens do 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.
|
||||
AC_DEFUN([AC_LANG],
|
||||
[ifdef([AC_LANG($1)],
|
||||
[define([_AC_LANG_CURRENT], [$1])dnl
|
||||
indir([AC_LANG($1)])],
|
||||
[AC_FATAL([$0: unknown language: $1])])])
|
||||
|
||||
|
||||
# AC_LANG(C)
|
||||
# ----------
|
||||
define([AC_LANG(C)],
|
||||
[ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
|
||||
@ -2081,11 +2112,15 @@ cross_compiling=$ac_cv_prog_cc_cross
|
||||
])
|
||||
|
||||
|
||||
# AC_LANG_CPLUSPLUS
|
||||
# -----------------
|
||||
AC_DEFUN(AC_LANG_CPLUSPLUS,
|
||||
[define([AC_LANG], [CPLUSPLUS])dnl
|
||||
ac_ext=C
|
||||
# AC_LANG_C
|
||||
# ---------
|
||||
AU_DEFUN([AC_LANG_C], [AC_LANG(C)])
|
||||
|
||||
|
||||
# AC_LANG(C++)
|
||||
# ------------
|
||||
define([AC_LANG(C++)],
|
||||
[ac_ext=C
|
||||
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
|
||||
@ -2094,34 +2129,26 @@ cross_compiling=$ac_cv_prog_cxx_cross
|
||||
])
|
||||
|
||||
|
||||
# AC_LANG_FORTRAN77
|
||||
# AC_LANG_CPLUSPLUS
|
||||
# -----------------
|
||||
AC_DEFUN(AC_LANG_FORTRAN77,
|
||||
[define([AC_LANG], [FORTRAN77])dnl
|
||||
ac_ext=f
|
||||
AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)])
|
||||
|
||||
|
||||
# AC_LANG(FORTRAN77)
|
||||
# ------------------
|
||||
define([AC_LANG(FORTRAN77)],
|
||||
[ac_ext=f
|
||||
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC'
|
||||
ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
|
||||
cross_compiling=$ac_cv_prog_f77_cross
|
||||
])
|
||||
|
||||
|
||||
# AC_LANG_SAVE
|
||||
# ------------
|
||||
# Push the current language on a stack.
|
||||
define(AC_LANG_SAVE,
|
||||
[pushdef([AC_LANG_STACK], AC_LANG)])
|
||||
# AC_LANG_FORTRAN77
|
||||
# -----------------
|
||||
AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(FORTRAN77)])
|
||||
|
||||
|
||||
# AC_LANG_RESTORE
|
||||
# ---------------
|
||||
# Restore the current language from the stack.
|
||||
pushdef([AC_LANG_RESTORE],
|
||||
[m4_case(AC_LANG_STACK,
|
||||
[C], [AC_LANG_C()],
|
||||
[CPLUSPLUS], [AC_LANG_CPLUSPLUS()],
|
||||
[FORTRAN77], [AC_LANG_FORTRAN77()])dnl
|
||||
popdef([AC_LANG_STACK])])
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2542,7 +2569,7 @@ AC_DEFUN(AC_TRY_LINK_FUNC,
|
||||
AC_LANG_CASE([FORTRAN77], ,
|
||||
ifelse([$1], [main], , dnl Avoid conflicting decl of main.
|
||||
[/* Override any gcc2 internal prototype to avoid an error. */
|
||||
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
|
||||
]AC_LANG_CASE(C++, [#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
])dnl
|
||||
@ -2603,7 +2630,7 @@ AC_TRY_LINK(dnl
|
||||
AC_LANG_CASE([FORTRAN77], ,
|
||||
ifelse([$2], [main], , dnl Avoid conflicting decl of main.
|
||||
[/* Override any gcc2 internal prototype to avoid an error. */
|
||||
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
|
||||
]AC_LANG_CASE(C++, [#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
])dnl
|
||||
@ -2839,7 +2866,7 @@ AC_DEFUN(AC_TRY_RUN_NATIVE,
|
||||
[cat >conftest.$ac_ext <<EOF
|
||||
#line __oline__ "configure"
|
||||
#include "confdefs.h"
|
||||
AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
|
||||
AC_LANG_CASE(C++, [#ifdef __cplusplus
|
||||
extern "C" void exit(int);
|
||||
#endif
|
||||
])dnl
|
||||
@ -2988,7 +3015,7 @@ dnl select. Similarly for bzero.
|
||||
which can conflict with char $1(); below. */
|
||||
#include <assert.h>
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
|
||||
]AC_LANG_CASE(C++, [#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
])dnl
|
||||
@ -4527,7 +4554,7 @@ fi
|
||||
# FIXME: Get rid of this macro.
|
||||
AC_DEFUN(AC_LINKER_OPTION,
|
||||
[AC_LANG_CASE([C], [test x"$GCC" = xyes && using_gnu_compiler=yes],
|
||||
[CPLUSPLUS], [test x"$GXX" = 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=])
|
||||
|
||||
|
@ -221,7 +221,7 @@ fi
|
||||
AC_DEFUN(AC_PROG_CC_WORKS,
|
||||
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_LANG(C)
|
||||
AC_TRY_COMPILER([int main(){return(0);}],
|
||||
ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
|
||||
AC_LANG_RESTORE
|
||||
@ -240,7 +240,7 @@ cross_compiling=$ac_cv_prog_cc_cross
|
||||
AC_DEFUN(AC_PROG_CXX_WORKS,
|
||||
[AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $CPPFLAGS $LDFLAGS) works])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_LANG(C++)
|
||||
AC_TRY_COMPILER([int main(){return(0);}],
|
||||
ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross)
|
||||
AC_LANG_RESTORE
|
||||
@ -263,7 +263,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
|
||||
AC_DEFUN(AC_PROG_F77_WORKS,
|
||||
[AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_FORTRAN77
|
||||
AC_LANG(FORTRAN77)
|
||||
AC_TRY_COMPILER(
|
||||
[ program conftest
|
||||
end
|
||||
@ -671,7 +671,7 @@ AC_DEFUN(AC_PROG_CXXCPP,
|
||||
if test -z "$CXXCPP"; then
|
||||
AC_CACHE_VAL(ac_cv_prog_CXXCPP,
|
||||
[AC_LANG_SAVE()dnl
|
||||
AC_LANG_CPLUSPLUS()dnl
|
||||
AC_LANG(C++)dnl
|
||||
CXXCPP="${CXX-g++} -E"
|
||||
AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
|
||||
ac_cv_prog_CXXCPP="$CXXCPP"
|
||||
@ -2681,7 +2681,7 @@ AC_DEFUN(AC_F77_LIBRARY_LDFLAGS,
|
||||
AC_REQUIRE([AC_CYGWIN])dnl
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_FORTRAN77
|
||||
AC_LANG(FORTRAN77)
|
||||
|
||||
# This is the simplest of all Fortran 77 programs.
|
||||
cat >conftest.$ac_ext <<EOF
|
||||
@ -2848,7 +2848,7 @@ AC_DEFUN(AC_F77_NAME_MANGLING,
|
||||
AC_REQUIRE([AC_PROG_F77])dnl
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_FORTRAN77
|
||||
AC_LANG(FORTRAN77)
|
||||
|
||||
cat >conftest.$ac_ext <<EOF
|
||||
subroutine foobar()
|
||||
@ -2864,7 +2864,7 @@ EOF
|
||||
mv conftest.${ac_objext} cf77_test.${ac_objext}
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_LANG(C)
|
||||
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="cf77_test.${ac_objext} $LIBS"
|
||||
@ -2907,11 +2907,8 @@ EOF
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
fi
|
||||
dnl Matthew: We need to pop the language stack twice.
|
||||
dnl Akim: FIXME: Why? You've done it above, AFAICT.
|
||||
AC_LANG_RESTORE()dnl
|
||||
AC_LANG_RESTORE()dnl
|
||||
])])
|
||||
])])# AC_F77_NAME_MANGLING
|
||||
|
||||
|
||||
# AC_F77_WRAPPERS
|
||||
|
@ -1379,7 +1379,7 @@ echo >confdefs.h
|
||||
dnl Let the site file select an alternate cache file if it wants to.
|
||||
AC_SITE_LOAD
|
||||
AC_CACHE_LOAD
|
||||
AC_LANG_C
|
||||
AC_LANG(C)
|
||||
|
||||
_AC_PROG_ECHO()dnl
|
||||
dnl Substitute for predefined variables.
|
||||
@ -2065,14 +2065,45 @@ define(AC_MSG_ERROR_UNQUOTED,
|
||||
# Expand into IF-LANG1 if the current language is LANG1 etc. else
|
||||
# into default.
|
||||
define(AC_LANG_CASE,
|
||||
[m4_case(AC_LANG, $@)])
|
||||
[m4_case(_AC_LANG_CURRENT, $@)])
|
||||
|
||||
|
||||
# AC_LANG_C
|
||||
# ---------
|
||||
AC_DEFUN(AC_LANG_C,
|
||||
[define([AC_LANG], [C])dnl
|
||||
ac_ext=c
|
||||
# AC_LANG_SAVE
|
||||
# ------------
|
||||
# Push the current language on a stack.
|
||||
define(AC_LANG_SAVE,
|
||||
[pushdef([AC_LANG_STACK], _AC_LANG_CURRENT)])
|
||||
|
||||
|
||||
# AC_LANG_RESTORE
|
||||
# ---------------
|
||||
# Restore the current language from the stack.
|
||||
pushdef([AC_LANG_RESTORE],
|
||||
[ifelse(AC_LANG_STACK, [AC_LANG_STACK],
|
||||
[AC_FATAL([too many AC_LANG_RESTORE])])dnl
|
||||
AC_LANG(AC_LANG_STACK)dnl
|
||||
popdef([AC_LANG_STACK])])
|
||||
|
||||
|
||||
# AC_LANG(LANG)
|
||||
# -------------
|
||||
# Set the current language to LANG.
|
||||
#
|
||||
# Do *not* write AC_LANG([$1]), because this pair of parens do 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.
|
||||
AC_DEFUN([AC_LANG],
|
||||
[ifdef([AC_LANG($1)],
|
||||
[define([_AC_LANG_CURRENT], [$1])dnl
|
||||
indir([AC_LANG($1)])],
|
||||
[AC_FATAL([$0: unknown language: $1])])])
|
||||
|
||||
|
||||
# AC_LANG(C)
|
||||
# ----------
|
||||
define([AC_LANG(C)],
|
||||
[ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
|
||||
@ -2081,11 +2112,15 @@ cross_compiling=$ac_cv_prog_cc_cross
|
||||
])
|
||||
|
||||
|
||||
# AC_LANG_CPLUSPLUS
|
||||
# -----------------
|
||||
AC_DEFUN(AC_LANG_CPLUSPLUS,
|
||||
[define([AC_LANG], [CPLUSPLUS])dnl
|
||||
ac_ext=C
|
||||
# AC_LANG_C
|
||||
# ---------
|
||||
AU_DEFUN([AC_LANG_C], [AC_LANG(C)])
|
||||
|
||||
|
||||
# AC_LANG(C++)
|
||||
# ------------
|
||||
define([AC_LANG(C++)],
|
||||
[ac_ext=C
|
||||
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
|
||||
@ -2094,34 +2129,26 @@ cross_compiling=$ac_cv_prog_cxx_cross
|
||||
])
|
||||
|
||||
|
||||
# AC_LANG_FORTRAN77
|
||||
# AC_LANG_CPLUSPLUS
|
||||
# -----------------
|
||||
AC_DEFUN(AC_LANG_FORTRAN77,
|
||||
[define([AC_LANG], [FORTRAN77])dnl
|
||||
ac_ext=f
|
||||
AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)])
|
||||
|
||||
|
||||
# AC_LANG(FORTRAN77)
|
||||
# ------------------
|
||||
define([AC_LANG(FORTRAN77)],
|
||||
[ac_ext=f
|
||||
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC'
|
||||
ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
|
||||
cross_compiling=$ac_cv_prog_f77_cross
|
||||
])
|
||||
|
||||
|
||||
# AC_LANG_SAVE
|
||||
# ------------
|
||||
# Push the current language on a stack.
|
||||
define(AC_LANG_SAVE,
|
||||
[pushdef([AC_LANG_STACK], AC_LANG)])
|
||||
# AC_LANG_FORTRAN77
|
||||
# -----------------
|
||||
AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(FORTRAN77)])
|
||||
|
||||
|
||||
# AC_LANG_RESTORE
|
||||
# ---------------
|
||||
# Restore the current language from the stack.
|
||||
pushdef([AC_LANG_RESTORE],
|
||||
[m4_case(AC_LANG_STACK,
|
||||
[C], [AC_LANG_C()],
|
||||
[CPLUSPLUS], [AC_LANG_CPLUSPLUS()],
|
||||
[FORTRAN77], [AC_LANG_FORTRAN77()])dnl
|
||||
popdef([AC_LANG_STACK])])
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2542,7 +2569,7 @@ AC_DEFUN(AC_TRY_LINK_FUNC,
|
||||
AC_LANG_CASE([FORTRAN77], ,
|
||||
ifelse([$1], [main], , dnl Avoid conflicting decl of main.
|
||||
[/* Override any gcc2 internal prototype to avoid an error. */
|
||||
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
|
||||
]AC_LANG_CASE(C++, [#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
])dnl
|
||||
@ -2603,7 +2630,7 @@ AC_TRY_LINK(dnl
|
||||
AC_LANG_CASE([FORTRAN77], ,
|
||||
ifelse([$2], [main], , dnl Avoid conflicting decl of main.
|
||||
[/* Override any gcc2 internal prototype to avoid an error. */
|
||||
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
|
||||
]AC_LANG_CASE(C++, [#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
])dnl
|
||||
@ -2839,7 +2866,7 @@ AC_DEFUN(AC_TRY_RUN_NATIVE,
|
||||
[cat >conftest.$ac_ext <<EOF
|
||||
#line __oline__ "configure"
|
||||
#include "confdefs.h"
|
||||
AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
|
||||
AC_LANG_CASE(C++, [#ifdef __cplusplus
|
||||
extern "C" void exit(int);
|
||||
#endif
|
||||
])dnl
|
||||
@ -2988,7 +3015,7 @@ dnl select. Similarly for bzero.
|
||||
which can conflict with char $1(); below. */
|
||||
#include <assert.h>
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
|
||||
]AC_LANG_CASE(C++, [#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
])dnl
|
||||
@ -4527,7 +4554,7 @@ fi
|
||||
# FIXME: Get rid of this macro.
|
||||
AC_DEFUN(AC_LINKER_OPTION,
|
||||
[AC_LANG_CASE([C], [test x"$GCC" = xyes && using_gnu_compiler=yes],
|
||||
[CPLUSPLUS], [test x"$GXX" = 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=])
|
||||
|
||||
|
@ -221,7 +221,7 @@ fi
|
||||
AC_DEFUN(AC_PROG_CC_WORKS,
|
||||
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_LANG(C)
|
||||
AC_TRY_COMPILER([int main(){return(0);}],
|
||||
ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
|
||||
AC_LANG_RESTORE
|
||||
@ -240,7 +240,7 @@ cross_compiling=$ac_cv_prog_cc_cross
|
||||
AC_DEFUN(AC_PROG_CXX_WORKS,
|
||||
[AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $CPPFLAGS $LDFLAGS) works])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_LANG(C++)
|
||||
AC_TRY_COMPILER([int main(){return(0);}],
|
||||
ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross)
|
||||
AC_LANG_RESTORE
|
||||
@ -263,7 +263,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
|
||||
AC_DEFUN(AC_PROG_F77_WORKS,
|
||||
[AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_FORTRAN77
|
||||
AC_LANG(FORTRAN77)
|
||||
AC_TRY_COMPILER(
|
||||
[ program conftest
|
||||
end
|
||||
@ -671,7 +671,7 @@ AC_DEFUN(AC_PROG_CXXCPP,
|
||||
if test -z "$CXXCPP"; then
|
||||
AC_CACHE_VAL(ac_cv_prog_CXXCPP,
|
||||
[AC_LANG_SAVE()dnl
|
||||
AC_LANG_CPLUSPLUS()dnl
|
||||
AC_LANG(C++)dnl
|
||||
CXXCPP="${CXX-g++} -E"
|
||||
AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
|
||||
ac_cv_prog_CXXCPP="$CXXCPP"
|
||||
@ -2681,7 +2681,7 @@ AC_DEFUN(AC_F77_LIBRARY_LDFLAGS,
|
||||
AC_REQUIRE([AC_CYGWIN])dnl
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_FORTRAN77
|
||||
AC_LANG(FORTRAN77)
|
||||
|
||||
# This is the simplest of all Fortran 77 programs.
|
||||
cat >conftest.$ac_ext <<EOF
|
||||
@ -2848,7 +2848,7 @@ AC_DEFUN(AC_F77_NAME_MANGLING,
|
||||
AC_REQUIRE([AC_PROG_F77])dnl
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_FORTRAN77
|
||||
AC_LANG(FORTRAN77)
|
||||
|
||||
cat >conftest.$ac_ext <<EOF
|
||||
subroutine foobar()
|
||||
@ -2864,7 +2864,7 @@ EOF
|
||||
mv conftest.${ac_objext} cf77_test.${ac_objext}
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_LANG(C)
|
||||
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="cf77_test.${ac_objext} $LIBS"
|
||||
@ -2907,11 +2907,8 @@ EOF
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.$ac_ext >&AC_FD_CC
|
||||
fi
|
||||
dnl Matthew: We need to pop the language stack twice.
|
||||
dnl Akim: FIXME: Why? You've done it above, AFAICT.
|
||||
AC_LANG_RESTORE()dnl
|
||||
AC_LANG_RESTORE()dnl
|
||||
])])
|
||||
])])# AC_F77_NAME_MANGLING
|
||||
|
||||
|
||||
# AC_F77_WRAPPERS
|
||||
|
@ -54,6 +54,8 @@ testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE)
|
||||
# - AC_INIT
|
||||
# AC_INIT includes all the AC_INIT macros. Note that there is an
|
||||
# infinite m4 recursion if AC_INIT it used twice.
|
||||
# - AC_LANG
|
||||
# Requires an argument.
|
||||
# - AC_PROG_(CC|CXX|F77)_(GNU|WORKS)
|
||||
# are used in AC_PROG_CC etc.
|
||||
# - AC_PATH_PROGS?
|
||||
@ -71,6 +73,7 @@ FILTER_MACROS = egrep -v -e \
|
||||
^AC_CHECK_(DECL|FILE|FUNC|HEADER|MEMBER|PROG|SIZEOF|TYPE)S?$$\
|
||||
^AC_CONFIG\
|
||||
^AC_INIT\
|
||||
^AC_LANG\
|
||||
^AC_LINKER_OPTION$$\
|
||||
^AC_LINK_FILES$$\
|
||||
^AC_LIST_MEMBER_OF$$\
|
||||
|
@ -87,6 +87,8 @@ PERL = perl
|
||||
# - AC_INIT
|
||||
# AC_INIT includes all the AC_INIT macros. Note that there is an
|
||||
# infinite m4 recursion if AC_INIT it used twice.
|
||||
# - AC_LANG
|
||||
# Requires an argument.
|
||||
# - AC_PROG_(CC|CXX|F77)_(GNU|WORKS)
|
||||
# are used in AC_PROG_CC etc.
|
||||
# - AC_PATH_PROGS?
|
||||
@ -99,7 +101,7 @@ PERL = perl
|
||||
#
|
||||
# Multiple `-e' to egrep are not portable, so join all the patterns together.
|
||||
# We use the fact that automake will replace all the `\\\n' with ` '.
|
||||
FILTER_MACROS = egrep -v -e `echo '^AC_ARG_VAR$$ ^AC_CHECK_(DECL|FILE|FUNC|HEADER|MEMBER|PROG|SIZEOF|TYPE)S?$$ ^AC_CONFIG ^AC_INIT ^AC_LINKER_OPTION$$ ^AC_LINK_FILES$$ ^AC_LIST_MEMBER_OF$$ ^AC_PATH_(TOOL|PROG)S?$$ ^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$ ^AC_REPLACE_FUNCS$$ ^AC_SEARCH_LIBS$$ ^AC_TRY _AC_' | tr ' ' '|'`
|
||||
FILTER_MACROS = egrep -v -e `echo '^AC_ARG_VAR$$ ^AC_CHECK_(DECL|FILE|FUNC|HEADER|MEMBER|PROG|SIZEOF|TYPE)S?$$ ^AC_CONFIG ^AC_INIT ^AC_LANG ^AC_LINKER_OPTION$$ ^AC_LINK_FILES$$ ^AC_LIST_MEMBER_OF$$ ^AC_PATH_(TOOL|PROG)S?$$ ^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$ ^AC_REPLACE_FUNCS$$ ^AC_SEARCH_LIBS$$ ^AC_TRY _AC_' | tr ' ' '|'`
|
||||
|
||||
|
||||
CLEANFILES = debug-*.sh macro configure configure.in config.status config.cache config.log config.h.in config.h
|
||||
|
Loading…
Reference in New Issue
Block a user