Mercurial > hg > octave-kai > gnulib-hg
annotate m4/include_next.m4 @ 17476:6057744acd2c default tip master
autoupdate
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Fri, 16 Aug 2013 06:32:22 -0700 |
parents | e542fd46ad6f |
children |
rev | line source |
---|---|
15963
1b99dc961823
Support for old NeXTstep 3.3 sed.
Bruno Haible <bruno@clisp.org>
parents:
15619
diff
changeset
|
1 # include_next.m4 serial 23 |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
16235
diff
changeset
|
2 dnl Copyright (C) 2006-2013 Free Software Foundation, Inc. |
6735
1f6871379885
* modules/inttypes: New file.
Derek R. Price <derek@ximbiot.com>
parents:
diff
changeset
|
3 dnl This file is free software; the Free Software Foundation |
1f6871379885
* modules/inttypes: New file.
Derek R. Price <derek@ximbiot.com>
parents:
diff
changeset
|
4 dnl gives unlimited permission to copy and/or distribute it, |
1f6871379885
* modules/inttypes: New file.
Derek R. Price <derek@ximbiot.com>
parents:
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
1f6871379885
* modules/inttypes: New file.
Derek R. Price <derek@ximbiot.com>
parents:
diff
changeset
|
6 |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
7 dnl From Paul Eggert and Derek Price. |
6735
1f6871379885
* modules/inttypes: New file.
Derek R. Price <derek@ximbiot.com>
parents:
diff
changeset
|
8 |
10375
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
9 dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
10 dnl |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
11 dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
12 dnl 'include' otherwise. |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
13 dnl |
10836
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
14 dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
15 dnl supports it in the special case that it is the first include directive in |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
16 dnl the given file, or to 'include' otherwise. |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
17 dnl |
10375
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
18 dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
19 dnl so as to avoid GCC warnings when the gcc option -pedantic is used. |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
20 dnl '#pragma GCC system_header' has the same effect as if the file was found |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
21 dnl through the include search path specified with '-isystem' options (as |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
22 dnl opposed to the search path specified with '-I' options). Namely, gcc |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
23 dnl does not warn about some things, and on some systems (Solaris and Interix) |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
24 dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
25 dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead |
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
26 dnl of plain '__STDC__'. |
13761
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
27 dnl |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
28 dnl PRAGMA_COLUMNS can be used in files that override system header files, so |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
29 dnl as to avoid compilation errors on HP NonStop systems when the gnulib file |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
30 dnl is included by a system header file that does a "#pragma COLUMNS 80" (which |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
31 dnl has the effect of truncating the lines of that file and all files that it |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
32 dnl includes to 80 columns) and the gnulib file has lines longer than 80 |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
33 dnl columns. |
10375
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
34 |
6735
1f6871379885
* modules/inttypes: New file.
Derek R. Price <derek@ximbiot.com>
parents:
diff
changeset
|
35 AC_DEFUN([gl_INCLUDE_NEXT], |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
36 [ |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
37 AC_LANG_PREPROC_REQUIRE() |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
38 AC_CACHE_CHECK([whether the preprocessor supports include_next], |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
39 [gl_cv_have_include_next], |
10836
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
40 [rm -rf conftestd1a conftestd1b conftestd2 |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
41 mkdir conftestd1a conftestd1b conftestd2 |
11170 | 42 dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on |
43 dnl AIX 6.1 support include_next when used as first preprocessor directive | |
44 dnl in a file, but not when preceded by another include directive. Check | |
45 dnl for this bug by including <stdio.h>. | |
46 dnl Additionally, with this same compiler, include_next is a no-op when | |
47 dnl used in a header file that was included by specifying its absolute | |
48 dnl file name. Despite these two bugs, include_next is used in the | |
49 dnl compiler's <math.h>. By virtue of the second bug, we need to use | |
50 dnl include_next as well in this case. | |
10836
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
51 cat <<EOF > conftestd1a/conftest.h |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
52 #define DEFINED_IN_CONFTESTD1 |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
53 #include_next <conftest.h> |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
54 #ifdef DEFINED_IN_CONFTESTD2 |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
55 int foo; |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
56 #else |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
57 #error "include_next doesn't work" |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
58 #endif |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
59 EOF |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
60 cat <<EOF > conftestd1b/conftest.h |
9123
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
61 #define DEFINED_IN_CONFTESTD1 |
10399
d409a1cc4085
Add check whether #include_next also works after #include directives.
Albert Chin <bug-gnulib@mlists.thewrittenword.com>
parents:
10375
diff
changeset
|
62 #include <stdio.h> |
9123
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
63 #include_next <conftest.h> |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
64 #ifdef DEFINED_IN_CONFTESTD2 |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
65 int foo; |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
66 #else |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
67 #error "include_next doesn't work" |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
68 #endif |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
69 EOF |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
70 cat <<EOF > conftestd2/conftest.h |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
71 #ifndef DEFINED_IN_CONFTESTD1 |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
72 #error "include_next test doesn't work" |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
73 #endif |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
74 #define DEFINED_IN_CONFTESTD2 |
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
75 EOF |
10836
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
76 gl_save_CPPFLAGS="$CPPFLAGS" |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
77 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" |
13581
70435ca9024e
include_next: silence autoconf 2.68 warning
Eric Blake <eblake@redhat.com>
parents:
12559
diff
changeset
|
78 dnl We intentionally avoid using AC_LANG_SOURCE here. |
70435ca9024e
include_next: silence autoconf 2.68 warning
Eric Blake <eblake@redhat.com>
parents:
12559
diff
changeset
|
79 AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]], |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
80 [gl_cv_have_include_next=yes], |
10836
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
81 [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" |
13581
70435ca9024e
include_next: silence autoconf 2.68 warning
Eric Blake <eblake@redhat.com>
parents:
12559
diff
changeset
|
82 AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]], |
10836
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
83 [gl_cv_have_include_next=buggy], |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
84 [gl_cv_have_include_next=no]) |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
85 ]) |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
86 CPPFLAGS="$gl_save_CPPFLAGS" |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
87 rm -rf conftestd1a conftestd1b conftestd2 |
9123
72496d26ba38
Fix the include_next test so that it rejects AIX 4.3 xlc.
Bruno Haible <bruno@clisp.org>
parents:
9004
diff
changeset
|
88 ]) |
10375
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
89 PRAGMA_SYSTEM_HEADER= |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
90 if test $gl_cv_have_include_next = yes; then |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
91 INCLUDE_NEXT=include_next |
10836
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
92 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next |
10375
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
93 if test -n "$GCC"; then |
10655
8668b19a7032
Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents:
10654
diff
changeset
|
94 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' |
10375
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
95 fi |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
96 else |
10836
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
97 if test $gl_cv_have_include_next = buggy; then |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
98 INCLUDE_NEXT=include |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
99 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
100 else |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
101 INCLUDE_NEXT=include |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
102 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include |
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
103 fi |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
104 fi |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
105 AC_SUBST([INCLUDE_NEXT]) |
10836
08a197428e92
Attempt to work around another AIX 5.3, 6.1 compiler bug with include_next.
Bruno Haible <bruno@clisp.org>
parents:
10758
diff
changeset
|
106 AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) |
10375
f96e845fc36d
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
10374
diff
changeset
|
107 AC_SUBST([PRAGMA_SYSTEM_HEADER]) |
13761
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
108 AC_CACHE_CHECK([whether system header files limit the line length], |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
109 [gl_cv_pragma_columns], |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
110 [dnl HP NonStop systems, which define __TANDEM, have this misfeature. |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
111 AC_EGREP_CPP([choke me], |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
112 [ |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
113 #ifdef __TANDEM |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
114 choke me |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
115 #endif |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
116 ], |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
117 [gl_cv_pragma_columns=yes], |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
118 [gl_cv_pragma_columns=no]) |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
119 ]) |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
120 if test $gl_cv_pragma_columns = yes; then |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
121 PRAGMA_COLUMNS="#pragma COLUMNS 10000" |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
122 else |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
123 PRAGMA_COLUMNS= |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
124 fi |
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13581
diff
changeset
|
125 AC_SUBST([PRAGMA_COLUMNS]) |
6735
1f6871379885
* modules/inttypes: New file.
Derek R. Price <derek@ximbiot.com>
parents:
diff
changeset
|
126 ]) |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
127 |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
128 # gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
129 # ------------------------------------------ |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
130 # For each arg foo.h, if #include_next works, define NEXT_FOO_H to be |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
131 # '<foo.h>'; otherwise define it to be |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
132 # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. |
11583
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
133 # Also, if #include_next works as first preprocessing directive in a file, |
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
134 # define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be '<foo.h>'; otherwise define it to |
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
135 # be |
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
136 # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
137 # That way, a header file with the following line: |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11584
diff
changeset
|
138 # #@INCLUDE_NEXT@ @NEXT_FOO_H@ |
11583
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
139 # or |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11584
diff
changeset
|
140 # #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
141 # behaves (after sed substitution) as if it contained |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11584
diff
changeset
|
142 # #include_next <foo.h> |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
143 # even if the compiler does not support include_next. |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
144 # The three "///" are to pacify Sun C 5.8, which otherwise would say |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
145 # "warning: #include of /usr/include/... may be non-portable". |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
146 # Use '""', not '<>', so that the /// cannot be confused with a C99 comment. |
9782 | 147 # Note: This macro assumes that the header file is not empty after |
148 # preprocessing, i.e. it does not only define preprocessor macros but also | |
149 # provides some type/enum definitions or function/variable declarations. | |
14211
26a04a37c3d3
gl_CHECK_NEXT_HEADERS implies AC_CHECK_HEADERS_ONCE
Paul Eggert <eggert@cs.ucla.edu>
parents:
14189
diff
changeset
|
150 # |
26a04a37c3d3
gl_CHECK_NEXT_HEADERS implies AC_CHECK_HEADERS_ONCE
Paul Eggert <eggert@cs.ucla.edu>
parents:
14189
diff
changeset
|
151 # This macro also checks whether each header exists, by invoking |
26a04a37c3d3
gl_CHECK_NEXT_HEADERS implies AC_CHECK_HEADERS_ONCE
Paul Eggert <eggert@cs.ucla.edu>
parents:
14189
diff
changeset
|
152 # AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument. |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
153 AC_DEFUN([gl_CHECK_NEXT_HEADERS], |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
154 [ |
14189
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
155 gl_NEXT_HEADERS_INTERNAL([$1], [check]) |
14181
bceb1351a723
include_next: do not check for standard headers like stddef.h
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
156 ]) |
bceb1351a723
include_next: do not check for standard headers like stddef.h
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
157 |
bceb1351a723
include_next: do not check for standard headers like stddef.h
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
158 # gl_NEXT_HEADERS(HEADER1 HEADER2 ...) |
bceb1351a723
include_next: do not check for standard headers like stddef.h
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
159 # ------------------------------------ |
bceb1351a723
include_next: do not check for standard headers like stddef.h
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
160 # Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist. |
bceb1351a723
include_next: do not check for standard headers like stddef.h
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
161 # This is suitable for headers like <stddef.h> that are standardized by C89 |
bceb1351a723
include_next: do not check for standard headers like stddef.h
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
162 # and therefore can be assumed to exist. |
bceb1351a723
include_next: do not check for standard headers like stddef.h
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
163 AC_DEFUN([gl_NEXT_HEADERS], |
bceb1351a723
include_next: do not check for standard headers like stddef.h
Paul Eggert <eggert@cs.ucla.edu>
parents:
14079
diff
changeset
|
164 [ |
14189
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
165 gl_NEXT_HEADERS_INTERNAL([$1], [assume]) |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
166 ]) |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
167 |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
168 # The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
169 AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
170 [ |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
171 AC_REQUIRE([gl_INCLUDE_NEXT]) |
10758
bca6f1ff10b0
Make determination of absolute name of header file work with AIX xlc.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
172 AC_REQUIRE([AC_CANONICAL_HOST]) |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
173 |
14189
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
174 m4_if([$2], [check], |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
175 [AC_CHECK_HEADERS_ONCE([$1]) |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
176 ]) |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
177 |
15477
f10877c6816b
warnings: add comments about previous patch
Eric Blake <eblake@redhat.com>
parents:
15476
diff
changeset
|
178 dnl FIXME: gl_next_header and gl_header_exists must be used unquoted |
f10877c6816b
warnings: add comments about previous patch
Eric Blake <eblake@redhat.com>
parents:
15476
diff
changeset
|
179 dnl until we can assume autoconf 2.64 or newer. |
9878 | 180 m4_foreach_w([gl_HEADER_NAME], [$1], |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
181 [AS_VAR_PUSHDEF([gl_next_header], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11584
diff
changeset
|
182 [gl_cv_next_]m4_defn([gl_HEADER_NAME])) |
9004
2d5c09e70f28
* m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
Paul Eggert <eggert@cs.ucla.edu>
parents:
8995
diff
changeset
|
183 if test $gl_cv_have_include_next = yes; then |
15476
d569119b11e7
include-next, warnings: support older autoconf
Eric Blake <eblake@redhat.com>
parents:
14211
diff
changeset
|
184 AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) |
9004
2d5c09e70f28
* m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
Paul Eggert <eggert@cs.ucla.edu>
parents:
8995
diff
changeset
|
185 else |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
186 AC_CACHE_CHECK( |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11584
diff
changeset
|
187 [absolute name of <]m4_defn([gl_HEADER_NAME])[>], |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11584
diff
changeset
|
188 m4_defn([gl_next_header]), |
14189
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
189 [m4_if([$2], [check], |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
190 [AS_VAR_PUSHDEF([gl_header_exists], |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
191 [ac_cv_header_]m4_defn([gl_HEADER_NAME])) |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
192 if test AS_VAR_GET(gl_header_exists) = yes; then |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
193 AS_VAR_POPDEF([gl_header_exists]) |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
194 ]) |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
195 AC_LANG_CONFTEST( |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
196 [AC_LANG_SOURCE( |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
197 [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
198 )]) |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
199 dnl AIX "xlc -E" and "cc -E" omit #line directives for header |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
200 dnl files that contain only a #include of other header files and |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
201 dnl no non-comment tokens of their own. This leads to a failure |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
202 dnl to detect the absolute name of <dirent.h>, <signal.h>, |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
203 dnl <poll.h> and others. The workaround is to force preservation |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
204 dnl of comments through option -C. This ensures all necessary |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
205 dnl #line directives are present. GCC supports option -C as well. |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
206 case "$host_os" in |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
207 aix*) gl_absname_cpp="$ac_cpp -C" ;; |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
208 *) gl_absname_cpp="$ac_cpp" ;; |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
209 esac |
15589
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
210 changequote(,) |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
211 case "$host_os" in |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
212 mingw*) |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
213 dnl For the sake of native Windows compilers (excluding gcc), |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
214 dnl treat backslash as a directory separator, like /. |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
215 dnl Actually, these compilers use a double-backslash as |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
216 dnl directory separator, inside the |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
217 dnl # line "filename" |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
218 dnl directives. |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
219 gl_dirsep_regex='[/\\]' |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
220 ;; |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
221 *) |
15963
1b99dc961823
Support for old NeXTstep 3.3 sed.
Bruno Haible <bruno@clisp.org>
parents:
15619
diff
changeset
|
222 gl_dirsep_regex='\/' |
15589
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
223 ;; |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
224 esac |
15963
1b99dc961823
Support for old NeXTstep 3.3 sed.
Bruno Haible <bruno@clisp.org>
parents:
15619
diff
changeset
|
225 dnl A sed expression that turns a string into a basic regular |
1b99dc961823
Support for old NeXTstep 3.3 sed.
Bruno Haible <bruno@clisp.org>
parents:
15619
diff
changeset
|
226 dnl expression, for use within "/.../". |
1b99dc961823
Support for old NeXTstep 3.3 sed.
Bruno Haible <bruno@clisp.org>
parents:
15619
diff
changeset
|
227 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' |
15589
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
228 changequote([,]) |
15963
1b99dc961823
Support for old NeXTstep 3.3 sed.
Bruno Haible <bruno@clisp.org>
parents:
15619
diff
changeset
|
229 gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \ |
1b99dc961823
Support for old NeXTstep 3.3 sed.
Bruno Haible <bruno@clisp.org>
parents:
15619
diff
changeset
|
230 | sed -e "$gl_make_literal_regex_sed"` |
1b99dc961823
Support for old NeXTstep 3.3 sed.
Bruno Haible <bruno@clisp.org>
parents:
15619
diff
changeset
|
231 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ |
1b99dc961823
Support for old NeXTstep 3.3 sed.
Bruno Haible <bruno@clisp.org>
parents:
15619
diff
changeset
|
232 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ |
15619
947cb4acb113
Avoid using #, the m4 comment starter character, near brackets.
Bruno Haible <bruno@clisp.org>
parents:
15589
diff
changeset
|
233 changequote(,)dnl |
947cb4acb113
Avoid using #, the m4 comment starter character, near brackets.
Bruno Haible <bruno@clisp.org>
parents:
15589
diff
changeset
|
234 s|^/[^/]|//&| |
947cb4acb113
Avoid using #, the m4 comment starter character, near brackets.
Bruno Haible <bruno@clisp.org>
parents:
15589
diff
changeset
|
235 changequote([,])dnl |
15589
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
236 p |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
237 q |
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
238 }' |
14189
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
239 dnl eval is necessary to expand gl_absname_cpp. |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
240 dnl Ultrix and Pyramid sh refuse to redirect output of eval, |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
241 dnl so use subshell. |
15476
d569119b11e7
include-next, warnings: support older autoconf
Eric Blake <eblake@redhat.com>
parents:
14211
diff
changeset
|
242 AS_VAR_SET(gl_next_header, |
14189
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
243 ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | |
15589
164add203442
absolute-header, include-next: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15477
diff
changeset
|
244 sed -n "$gl_absolute_header_sed"`'"']) |
14189
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
245 m4_if([$2], [check], |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
246 [else |
15476
d569119b11e7
include-next, warnings: support older autoconf
Eric Blake <eblake@redhat.com>
parents:
14211
diff
changeset
|
247 AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) |
14189
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
248 fi |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
249 ]) |
8d4912d04c80
include_next: Fix bug introduced on 2011-01-18.
Bruno Haible <bruno@clisp.org>
parents:
14181
diff
changeset
|
250 ]) |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
251 fi |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
252 AC_SUBST( |
11584
219c99d22526
Remove redundant m4_quote invocations.
Bruno Haible <bruno@clisp.org>
parents:
11583
diff
changeset
|
253 AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), |
15476
d569119b11e7
include-next, warnings: support older autoconf
Eric Blake <eblake@redhat.com>
parents:
14211
diff
changeset
|
254 [AS_VAR_GET(gl_next_header)]) |
11583
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
255 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
256 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' |
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
257 gl_next_as_first_directive='<'gl_HEADER_NAME'>' |
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
258 else |
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
259 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' |
15476
d569119b11e7
include-next, warnings: support older autoconf
Eric Blake <eblake@redhat.com>
parents:
14211
diff
changeset
|
260 gl_next_as_first_directive=AS_VAR_GET(gl_next_header) |
11583
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
261 fi |
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
262 AC_SUBST( |
11584
219c99d22526
Remove redundant m4_quote invocations.
Bruno Haible <bruno@clisp.org>
parents:
11583
diff
changeset
|
263 AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), |
11583
dc80f2cc1327
Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents:
11170
diff
changeset
|
264 [$gl_next_as_first_directive]) |
8995
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
265 AS_VAR_POPDEF([gl_next_header])]) |
1025663f7658
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
Paul Eggert <eggert@cs.ucla.edu>
parents:
6735
diff
changeset
|
266 ]) |
13581
70435ca9024e
include_next: silence autoconf 2.68 warning
Eric Blake <eblake@redhat.com>
parents:
12559
diff
changeset
|
267 |
70435ca9024e
include_next: silence autoconf 2.68 warning
Eric Blake <eblake@redhat.com>
parents:
12559
diff
changeset
|
268 # Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; |
70435ca9024e
include_next: silence autoconf 2.68 warning
Eric Blake <eblake@redhat.com>
parents:
12559
diff
changeset
|
269 # this fallback is safe for all earlier autoconf versions. |
70435ca9024e
include_next: silence autoconf 2.68 warning
Eric Blake <eblake@redhat.com>
parents:
12559
diff
changeset
|
270 m4_define_default([AC_LANG_DEFINES_PROVIDED]) |