Commit | Line | Data |
---|---|---|
39185b0a JH |
1 | ?RCS: $Id: i_ndbm.U,v 3.0.1.1 1995/05/12 12:16:53 ram Exp $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1993, Raphael Manfredi | |
4c9adfe2 | 4 | ?RCS: |
39185b0a JH |
5 | ?RCS: You may redistribute only under the terms of the Artistic Licence, |
6 | ?RCS: as specified in the README file that comes with the distribution. | |
7 | ?RCS: You may reuse parts of this distribution only within the terms of | |
8 | ?RCS: that same Artistic Licence; a copy of which may be found at the root | |
9 | ?RCS: of the source tree for dist 3.0. | |
10 | ?RCS: | |
11 | ?RCS: $Log: i_ndbm.U,v $ | |
12 | ?RCS: Revision 3.0.1.1 1995/05/12 12:16:53 ram | |
13 | ?RCS: patch54: made more robust by checking both header and lib (ADO) | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0 1993/08/18 12:08:23 ram | |
16 | ?RCS: Baseline for dist 3.0 netwide release. | |
17 | ?RCS: | |
4c9adfe2 MB |
18 | ?MAKE:i_ndbm i_gdbmndbm i_gdbm_ndbm d_ndbm d_ndbm_h_uses_prototypes \ |
19 | d_gdbmndbm_h_uses_prototypes d_gdbm_ndbm_h_uses_prototypes: \ | |
20 | Inhdr Inlibc Setvar test d_cplusplus extern_C echo Protochk | |
39185b0a | 21 | ?MAKE: -pick add $@ %< |
4c9adfe2 | 22 | ?S:i_ndbm: |
39185b0a JH |
23 | ?S: This variable conditionally defines the I_NDBM symbol, which |
24 | ?S: indicates to the C program that <ndbm.h> exists and should | |
25 | ?S: be included. | |
26 | ?S:. | |
4c9adfe2 | 27 | ?C:I_NDBM: |
39185b0a JH |
28 | ?C: This symbol, if defined, indicates that <ndbm.h> exists and should |
29 | ?C: be included. | |
30 | ?C:. | |
4c9adfe2 | 31 | ?S:i_gdbmndbm: |
37969f2f AD |
32 | ?S: This variable conditionally defines the I_GDBMNDBM symbol, which |
33 | ?S: indicates to the C program that <gdbm/ndbm.h> exists and should | |
34 | ?S: be included. This was the location of the ndbm.h compatibility file | |
35 | ?S: in RedHat 7.1. | |
36 | ?S:. | |
37 | ?C:I_GDBMNDBM: | |
38 | ?C: This symbol, if defined, indicates that <gdbm/ndbm.h> exists and should | |
39 | ?C: be included. This was the location of the ndbm.h compatibility file | |
40 | ?C: in RedHat 7.1. | |
41 | ?C:. | |
4c9adfe2 | 42 | ?S:i_gdbm_ndbm: |
37969f2f AD |
43 | ?S: This variable conditionally defines the I_GDBM_NDBM symbol, which |
44 | ?S: indicates to the C program that <gdbm-ndbm.h> exists and should | |
45 | ?S: be included. This is the location of the ndbm.h compatibility file | |
46 | ?S: in Debian 4.0. | |
47 | ?S:. | |
48 | ?C:I_GDBM_NDBM: | |
49 | ?C: This symbol, if defined, indicates that <gdbm-ndbm.h> exists and should | |
50 | ?C: be included. This is the location of the ndbm.h compatibility file | |
51 | ?C: in Debian 4.0. | |
52 | ?C:. | |
53 | ?S:d_ndbm: | |
54 | ?S: This variable conditionally defines the HAS_NDBM symbol, which | |
55 | ?S: indicates that both the ndbm.h include file and an appropriate ndbm | |
56 | ?S: library exist. Consult the different i_*ndbm variables | |
57 | ?S: to find out the actual include location. Sometimes, a system has the | |
58 | ?S: header file but not the library. This variable will only be set if | |
59 | ?S: the system has both. | |
60 | ?S:. | |
61 | ?C:HAS_NDBM: | |
62 | ?C: This symbol, if defined, indicates that some form of ndbm.h or compatibility | |
63 | ?C: include exists, along with the appropriate library. | |
64 | ?C:. | |
4c9adfe2 MB |
65 | ?S:d_ndbm_h_uses_prototypes: |
66 | ?S: This variable conditionally defines the NDBM_H_USES_PROTOTYPES symbol, | |
67 | ?S: which indicates that the ndbm.h include file uses real ANSI C | |
68 | ?S: prototypes instead of K&R style function declarations. K&R style | |
69 | ?S: declarations are unsupported in C++, so the include file requires | |
70 | ?S: special handling when using a C++ compiler and this variable is | |
71 | ?S: undefined. Consult the different d_*ndbm_h_uses_prototypes variables | |
72 | ?S: to get the same information for alternative ndbm.h include files. | |
73 | ?S:. | |
74 | ?C:NDBM_H_USES_PROTOTYPES: | |
75 | ?C: This symbol, if defined, indicates that <ndbm.h> uses real ANSI C | |
76 | ?C: prototypes instead of K&R style function declarations without any | |
77 | ?C: parameter information. While ANSI C prototypes are supported in C++, | |
78 | ?C: K&R style function declarations will yield errors. | |
79 | ?C:. | |
80 | ?S:d_gdbmndbm_h_uses_prototypes: | |
81 | ?S: This variable conditionally defines the NDBM_H_USES_PROTOTYPES symbol, | |
82 | ?S: which indicates that the gdbm/ndbm.h include file uses real ANSI C | |
83 | ?S: prototypes instead of K&R style function declarations. K&R style | |
84 | ?S: declarations are unsupported in C++, so the include file requires | |
85 | ?S: special handling when using a C++ compiler and this variable is | |
86 | ?S: undefined. Consult the different d_*ndbm_h_uses_prototypes variables | |
87 | ?S: to get the same information for alternative ndbm.h include files. | |
88 | ?S:. | |
89 | ?C:GDBMNDBM_H_USES_PROTOTYPES: | |
90 | ?C: This symbol, if defined, indicates that <gdbm/ndbm.h> uses real ANSI C | |
91 | ?C: prototypes instead of K&R style function declarations without any | |
92 | ?C: parameter information. While ANSI C prototypes are supported in C++, | |
93 | ?C: K&R style function declarations will yield errors. | |
94 | ?C:. | |
95 | ?S:d_gdbm_ndbm_h_uses_prototypes: | |
96 | ?S: This variable conditionally defines the NDBM_H_USES_PROTOTYPES symbol, | |
97 | ?S: which indicates that the gdbm-ndbm.h include file uses real ANSI C | |
98 | ?S: prototypes instead of K&R style function declarations. K&R style | |
99 | ?S: declarations are unsupported in C++, so the include file requires | |
100 | ?S: special handling when using a C++ compiler and this variable is | |
101 | ?S: undefined. Consult the different d_*ndbm_h_uses_prototypes variables | |
102 | ?S: to get the same information for alternative ndbm.h include files. | |
103 | ?S:. | |
104 | ?C:GDBM_NDBM_H_USES_PROTOTYPES: | |
105 | ?C: This symbol, if defined, indicates that <gdbm-ndbm.h> uses real ANSI C | |
106 | ?C: prototypes instead of K&R style function declarations without any | |
107 | ?C: parameter information. While ANSI C prototypes are supported in C++, | |
108 | ?C: K&R style function declarations will yield errors. | |
109 | ?C:. | |
39185b0a | 110 | ?H:#$i_ndbm I_NDBM /**/ |
37969f2f AD |
111 | ?H:#$i_gdbmndbm I_GDBMNDBM /**/ |
112 | ?H:#$i_gdbm_ndbm I_GDBM_NDBM /**/ | |
113 | ?H:#$d_ndbm HAS_NDBM /**/ | |
4c9adfe2 MB |
114 | ?H:#$d_ndbm_h_uses_prototypes NDBM_H_USES_PROTOTYPES /**/ |
115 | ?H:#$d_gdbmndbm_h_uses_prototypes GDBMNDBM_H_USES_PROTOTYPES /**/ | |
116 | ?H:#$d_gdbm_ndbm_h_uses_prototypes GDBM_NDBM_H_USES_PROTOTYPES /**/ | |
39185b0a | 117 | ?H:. |
4c9adfe2 | 118 | ?T:d_dbm_open name hdr ihdr ndbm_hdr_protochk |
96b4e441 | 119 | ?LINT:set d_ndbm d_gdbmndbm_h_uses_prototypes d_gdbm_ndbm_h_uses_prototypes d_ndbm_h_uses_prototypes |
39185b0a | 120 | : see if ndbm.h is available |
37969f2f AD |
121 | set ndbm.h i_ndbm |
122 | eval $inhdr | |
123 | : Compatibility location for RedHat 7.1 | |
124 | set gdbm/ndbm.h i_gdbmndbm | |
125 | eval $inhdr | |
126 | : Compatibility location for Debian 4.0 | |
127 | set gdbm-ndbm.h i_gdbm_ndbm | |
39185b0a JH |
128 | eval $inhdr |
129 | ||
4c9adfe2 | 130 | val="$undef" |
37969f2f | 131 | if $test "$i_ndbm" = "$define" -o "$i_gdbmndbm" = "$define" -o "$i_gdbm_ndbm" = "$define"; then |
39185b0a JH |
132 | : see if dbm_open exists |
133 | set dbm_open d_dbm_open | |
134 | eval $inlibc | |
135 | case "$d_dbm_open" in | |
136 | $undef) | |
37969f2f AD |
137 | i_ndbm="$undef" |
138 | i_gdbmndbm="$undef" | |
139 | i_gdbm_ndbm="$undef" | |
39185b0a | 140 | echo "We won't be including <ndbm.h>" |
4c9adfe2 | 141 | val="$undef" |
39185b0a | 142 | ;; |
37969f2f AD |
143 | *) val="$define" |
144 | ;; | |
39185b0a | 145 | esac |
37969f2f AD |
146 | fi |
147 | set d_ndbm | |
39185b0a JH |
148 | eval $setvar |
149 | ||
4c9adfe2 MB |
150 | ndbm_hdr_protochk='name=$1; hdr=$2; |
151 | eval "ihdr=\$""i_$name"; | |
152 | val="$undef"; | |
153 | if $test "$ihdr" = "$define"; then | |
154 | $echo "Checking if your <$hdr> uses prototypes..." >&4; | |
155 | case "$d_cplusplus" in | |
156 | $define) ./protochk "$extern_C void dbm_close(DBM *);" literal "extern \"C\" {" $ihdr $hdr literal "}" && val="$define" ;; | |
157 | *) ./protochk "$extern_C void dbm_close(int, int);" $ihdr $hdr || val="$define" ;; | |
158 | esac; | |
159 | case "$val" in | |
160 | $define) $echo "Your <$hdr> seems to have prototypes";; | |
161 | *) $echo "Your <$hdr> does not seem to have prototypes";; | |
162 | esac; | |
163 | fi; | |
164 | set "d_${name}_h_uses_prototypes"; | |
165 | eval $setvar' | |
166 | ||
167 | set ndbm ndbm.h | |
168 | eval $ndbm_hdr_protochk | |
169 | set gdbmndbm gdbm/ndbm.h | |
170 | eval $ndbm_hdr_protochk | |
171 | set gdbm_ndbm gdbm-ndbm.h | |
172 | eval $ndbm_hdr_protochk | |
173 |