+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.
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
# 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"
# 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
])),
[$1()],
[$2],
-[$3]))
+[$3])])
# AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS,
[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
# 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],
# 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]
[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
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
# 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"
# 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
])),
[$1()],
[$2],
-[$3]))
+[$3])])
# AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS,
[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
# 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],
# 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]
[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
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