Promote AC_LANG_CASE.

* acgeneral.m4 (AC_TRY_COMPILER, AC_TRY_LINK_FUNC, AC_CHECK_LIB,
AC_TRY_COMPILE, AC_TRY_LINK, AC_TRY_RUN_NATIVE, AC_CHECK_FUNC):
Use AC_LANG_CASE instead of ifelse (AC_LANG, ...).
(AC_TRY_LINK_FUNC): Quote the body the the AC_DEFUN (whoa, how
could this survive so long?!?).
This commit is contained in:
Akim Demaille 2000-02-08 09:54:19 +00:00
parent c809277bf9
commit 13110f0768
4 changed files with 36 additions and 24 deletions

View File

@ -1,3 +1,13 @@
2000-02-08 Akim Demaille <akim@epita.fr>
Promote AC_LANG_CASE.
* acgeneral.m4 (AC_TRY_COMPILER, AC_TRY_LINK_FUNC, AC_CHECK_LIB,
AC_TRY_COMPILE, AC_TRY_LINK, AC_TRY_RUN_NATIVE, AC_CHECK_FUNC):
Use AC_LANG_CASE instead of ifelse (AC_LANG, ...).
(AC_TRY_LINK_FUNC): Quote the body the the AC_DEFUN (whoa, how
could this survive so long?!?).
2000-02-08 Akim Demaille <akim@epita.fr>
* acgeneral.m4: Formatting changes.

4
TODO
View File

@ -73,6 +73,10 @@ having to tell users to rm config.cache before sending us config.log.
I don't understand why we have this weird system of AC_SAVE and
RESTORE, why not push/pop etc?
** AC_LANG
I don't understand why we have this weird system of AC_SAVE and
RESTORE, why not push/pop etc?
** AC_PROVIDE
I think it is the epilogue that should provide, not the prologue. Not
clear: there are risks of circular dependencies :(. In fact the

View File

@ -2151,7 +2151,7 @@ popdef([AC_Prog])dnl
# language.
AC_DEFUN(AC_TRY_COMPILER,
[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77], ,
AC_LANG_CASE([FORTRAN77], ,
[
@PND@line __oline__ "configure"
#include "confdefs.h"
@ -2184,13 +2184,12 @@ rm -fr conftest*])
# Try to link a program that calls FUNC, handling GCC builtins. If
# the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
# ACTION-IF-NOT-FOUND.
AC_DEFUN(AC_TRY_LINK_FUNC,
AC_TRY_LINK(dnl
ifelse(AC_LANG, [FORTRAN77], ,
[AC_TRY_LINK(
AC_LANG_CASE([FORTRAN77], ,
ifelse([$1], [main], , dnl Avoid conflicting decl of main.
[/* Override any gcc2 internal prototype to avoid an error. */
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
extern "C"
#endif
])dnl
@ -2200,7 +2199,7 @@ char $1();
])),
[$1()],
[$2],
[$3]))
[$3])])
# AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS,
@ -2248,10 +2247,10 @@ AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
[ac_save_LIBS="$LIBS"
LIBS="-l$1 $5 $LIBS"
AC_TRY_LINK(dnl
ifelse(AC_LANG, [FORTRAN77], ,
AC_LANG_CASE([FORTRAN77], ,
ifelse([$2], [main], , dnl Avoid conflicting decl of main.
[/* Override any gcc2 internal prototype to avoid an error. */
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
extern "C"
#endif
])dnl
@ -2363,7 +2362,7 @@ rm -f conftest*
# FIXME: Should INCLUDES be defaulted here?
AC_DEFUN(AC_TRY_COMPILE,
[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77],
AC_LANG_CASE([FORTRAN77],
[ program main
[$2]
end],
@ -2416,7 +2415,7 @@ AC_TRY_LINK([$2], [$3], [$4], [$5])
# Should the INCLUDES be defaulted here?
AC_DEFUN(AC_TRY_LINK,
[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77],
AC_LANG_CASE([FORTRAN77],
[
program main
call [$2]
@ -2478,7 +2477,7 @@ AC_DEFUN(AC_TRY_RUN_NATIVE,
[cat >conftest.$ac_ext <<EOF
@PND@line __oline__ "configure"
#include "confdefs.h"
ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
extern "C" void exit(int);
#endif
])dnl
@ -2632,7 +2631,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. */
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
extern "C"
#endif
])dnl

View File

@ -2151,7 +2151,7 @@ popdef([AC_Prog])dnl
# language.
AC_DEFUN(AC_TRY_COMPILER,
[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77], ,
AC_LANG_CASE([FORTRAN77], ,
[
@PND@line __oline__ "configure"
#include "confdefs.h"
@ -2184,13 +2184,12 @@ rm -fr conftest*])
# Try to link a program that calls FUNC, handling GCC builtins. If
# the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
# ACTION-IF-NOT-FOUND.
AC_DEFUN(AC_TRY_LINK_FUNC,
AC_TRY_LINK(dnl
ifelse(AC_LANG, [FORTRAN77], ,
[AC_TRY_LINK(
AC_LANG_CASE([FORTRAN77], ,
ifelse([$1], [main], , dnl Avoid conflicting decl of main.
[/* Override any gcc2 internal prototype to avoid an error. */
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
extern "C"
#endif
])dnl
@ -2200,7 +2199,7 @@ char $1();
])),
[$1()],
[$2],
[$3]))
[$3])])
# AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS,
@ -2248,10 +2247,10 @@ AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
[ac_save_LIBS="$LIBS"
LIBS="-l$1 $5 $LIBS"
AC_TRY_LINK(dnl
ifelse(AC_LANG, [FORTRAN77], ,
AC_LANG_CASE([FORTRAN77], ,
ifelse([$2], [main], , dnl Avoid conflicting decl of main.
[/* Override any gcc2 internal prototype to avoid an error. */
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
extern "C"
#endif
])dnl
@ -2363,7 +2362,7 @@ rm -f conftest*
# FIXME: Should INCLUDES be defaulted here?
AC_DEFUN(AC_TRY_COMPILE,
[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77],
AC_LANG_CASE([FORTRAN77],
[ program main
[$2]
end],
@ -2416,7 +2415,7 @@ AC_TRY_LINK([$2], [$3], [$4], [$5])
# Should the INCLUDES be defaulted here?
AC_DEFUN(AC_TRY_LINK,
[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77],
AC_LANG_CASE([FORTRAN77],
[
program main
call [$2]
@ -2478,7 +2477,7 @@ AC_DEFUN(AC_TRY_RUN_NATIVE,
[cat >conftest.$ac_ext <<EOF
@PND@line __oline__ "configure"
#include "confdefs.h"
ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
extern "C" void exit(int);
#endif
])dnl
@ -2632,7 +2631,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. */
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
]AC_LANG_CASE(CPLUSPLUS, [#ifdef __cplusplus
extern "C"
#endif
])dnl