+2009-05-21 Eric Blake <ebb9@byu.net>
+ Bruno Haible <bruno@clisp.org>
+
+ Second attempt to work around an AIX 5.3, 6.1 compiler bug with
+ include_next. Fix of 2008-11-20 commit.
+ * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Also set
+ NEXT_AS_FIRST_DIRECTIVE_FOO_H.
+ * lib/math.in.h: Use NEXT_AS_FIRST_DIRECTIVE_MATH_H instead of
+ NEXT_MATH_H.
+ * modules/math (Makefile.am): Substitute NEXT_AS_FIRST_DIRECTIVE_MATH_H
+ instead of NEXT_MATH_H.
+
2009-05-21 Bruno Haible <bruno@clisp.org>
Avoid redefinition warnings for SIZE_MAX.
-# include_next.m4 serial 12
+# include_next.m4 serial 13
dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be
# '<foo.h>'; otherwise define it to be
# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
+# Also, if #include_next works as first preprocessing directive in a file,
+# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be '<foo.h>'; otherwise define it to
+# be
+# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
# That way, a header file with the following line:
# #@INCLUDE_NEXT@ @NEXT_FOO_H@
+# or
+# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@
# behaves (after sed substitution) as if it contained
# #include_next <foo.h>
# even if the compiler does not support include_next.
AC_SUBST(
AS_TR_CPP([NEXT_]m4_quote(m4_defn([gl_HEADER_NAME]))),
[AS_VAR_GET([gl_next_header])])
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'gl_HEADER_NAME'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
+ fi
+ AC_SUBST(
+ AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_quote(m4_defn([gl_HEADER_NAME]))),
+ [$gl_next_as_first_directive])
AS_VAR_POPDEF([gl_next_header])])
])
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''NEXT_MATH_H''@|$(NEXT_MATH_H)|g' \
+ -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \
-e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \
-e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
-e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \