- [rm -rf conftestd1 conftestd2
- mkdir conftestd1 conftestd2
- dnl The include of <stdio.h> is because IBM C 9.0 on AIX 6.1 supports
- dnl include_next when used as first preprocessor directive in a file,
- dnl but not when preceded by another include directive.
- cat <<EOF > conftestd1/conftest.h
+ [rm -rf conftestd1a conftestd1b conftestd2
+ mkdir conftestd1a conftestd1b conftestd2
+ dnl The include of <stdio.h> is because IBM C 9.0, 10.1 (original
+ dnl versions, prior to 2009-01 updates) on AIX 6.1 supports include_next
+ dnl when used as first preprocessor directive in a file, but not when
+ dnl preceded by another include directive. Additionally, with this same
+ dnl compiler, include_next is a no-op when used in a header file that was
+ dnl included by specifying its absolute file name. Despite these two bugs,
+ dnl include_next is used in the compiler's <math.h>. By virtue of the
+ dnl second bug, we need to use include_next as well in this case.
+ cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd1b/conftest.h