condition out the test case if __cpluscplus.
Don't document the autoheader template twice, one is enough.
* autoheader.m4 (AC_CONFIG_HEADER): don't hook on this guy, but
on...
(AC_CONFIG_HEADERS), since the former is defined on the latter.
+2000-02-07 Akim Demaille <akim@epita.fr>
+
+ * acspecific.m4 (AC_C_INLINE): Proceed as for AC_C_CONST:
+ condition out the test case if __cpluscplus.
+ Don't document the autoheader template twice, one is enough.
+ * autoheader.m4 (AC_CONFIG_HEADER): don't hook on this guy, but
+ on...
+ (AC_CONFIG_HEADERS), since the former is defined on the latter.
+
2000-02-07 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Use the scheme proposed
dnl NAME is a specialized version of REPLACED-FUNCTION when its first
dnl argument is ARGUMENT. For instance AC_TYPE_SIZE_T is a specialization
dnl of AC_CHECK_TYPE applied to `size_t'.
+dnl
+dnl This feature is not documented on purpose. It might change in the
+dnl future.
define([AC_DEFUN],
[ifelse([$3],,
[define([$1], [AC_PRO([$1])$2[]AC_EPI()])],
-dnl AC_C_INLINE
-dnl -----------
-dnl Do nothing if the compiler accepts the inline keyword.
-dnl Otherwise define inline to __inline__ or __inline if one of those work,
-dnl otherwise define inline to be empty.
+# AC_C_INLINE
+# -----------
+# Do nothing if the compiler accepts the inline keyword.
+# Otherwise define inline to __inline__ or __inline if one of those work,
+# otherwise define inline to be empty.
AC_DEFUN(AC_C_INLINE,
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- AC_TRY_COMPILE(, [} $ac_kw int foo() {], [ac_cv_c_inline=$ac_kw; break])
+ AC_TRY_COMPILE(,
+[#ifndef __cplusplus
+ } $ac_kw int foo() {
+#endif
+],
+[ac_cv_c_inline=$ac_kw; break])
done
])
case "$ac_cv_c_inline" in
no) AC_DEFINE(inline,,
[Define as `__inline' if that's what the C compiler calls it,
or to nothing if it is not supported.]) ;;
- *) AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline,
- [Define as `__inline' if that's what the C compiler
- calls it, or to nothing if it is not supported.]) ;;
+ *) AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline) ;;
esac
])dnl AC_C_INLINE
-dnl AC_C_CONST
-dnl ----------
+# AC_C_CONST
+# ----------
AC_DEFUN(AC_C_CONST,
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for an ANSI C-conforming const], ac_cv_c_const,
# Support "outfile[:infile]", defaulting infile="outfile.in".
case "$config_h" in
-undefined) echo "error: AC_CONFIG_HEADER not found in $infile" >&2; exit 1 ;;
+undefined) echo "error: AC_CONFIG_HEADERS not found in $infile" >&2; exit 1 ;;
*:*) config_h_in=`echo "$config_h"|sed 's%.*:%%'`
config_h=`echo "$config_h"|sed 's%:.*%%'` ;;
*) config_h_in="${config_h}.in" ;;
scheme of the Fortran 77 compiler.])])
-AH_DEFUN([AC_CONFIG_HEADER],
+AH_DEFUN([AC_CONFIG_HEADERS],
[@@@config_h=patsubst($1, [ .*$], [])@@@
])
# Support "outfile[:infile]", defaulting infile="outfile.in".
case "$config_h" in
-undefined) echo "error: AC_CONFIG_HEADER not found in $infile" >&2; exit 1 ;;
+undefined) echo "error: AC_CONFIG_HEADERS not found in $infile" >&2; exit 1 ;;
*:*) config_h_in=`echo "$config_h"|sed 's%.*:%%'`
config_h=`echo "$config_h"|sed 's%:.*%%'` ;;
*) config_h_in="${config_h}.in" ;;
# Support "outfile[:infile]", defaulting infile="outfile.in".
case "$config_h" in
-undefined) echo "error: AC_CONFIG_HEADER not found in $infile" >&2; exit 1 ;;
+undefined) echo "error: AC_CONFIG_HEADERS not found in $infile" >&2; exit 1 ;;
*:*) config_h_in=`echo "$config_h"|sed 's%.*:%%'`
config_h=`echo "$config_h"|sed 's%:.*%%'` ;;
*) config_h_in="${config_h}.in" ;;
dnl NAME is a specialized version of REPLACED-FUNCTION when its first
dnl argument is ARGUMENT. For instance AC_TYPE_SIZE_T is a specialization
dnl of AC_CHECK_TYPE applied to `size_t'.
+dnl
+dnl This feature is not documented on purpose. It might change in the
+dnl future.
define([AC_DEFUN],
[ifelse([$3],,
[define([$1], [AC_PRO([$1])$2[]AC_EPI()])],
-dnl AC_C_INLINE
-dnl -----------
-dnl Do nothing if the compiler accepts the inline keyword.
-dnl Otherwise define inline to __inline__ or __inline if one of those work,
-dnl otherwise define inline to be empty.
+# AC_C_INLINE
+# -----------
+# Do nothing if the compiler accepts the inline keyword.
+# Otherwise define inline to __inline__ or __inline if one of those work,
+# otherwise define inline to be empty.
AC_DEFUN(AC_C_INLINE,
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- AC_TRY_COMPILE(, [} $ac_kw int foo() {], [ac_cv_c_inline=$ac_kw; break])
+ AC_TRY_COMPILE(,
+[#ifndef __cplusplus
+ } $ac_kw int foo() {
+#endif
+],
+[ac_cv_c_inline=$ac_kw; break])
done
])
case "$ac_cv_c_inline" in
no) AC_DEFINE(inline,,
[Define as `__inline' if that's what the C compiler calls it,
or to nothing if it is not supported.]) ;;
- *) AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline,
- [Define as `__inline' if that's what the C compiler
- calls it, or to nothing if it is not supported.]) ;;
+ *) AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline) ;;
esac
])dnl AC_C_INLINE
-dnl AC_C_CONST
-dnl ----------
+# AC_C_CONST
+# ----------
AC_DEFUN(AC_C_CONST,
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for an ANSI C-conforming const], ac_cv_c_const,