1 ?RCS: $Id: i_ndbm.U,v 3.0.1.1 1995/05/12 12:16:53 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
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.
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)
15 ?RCS: Revision 3.0 1993/08/18 12:08:23 ram
16 ?RCS: Baseline for dist 3.0 netwide release.
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
21 ?MAKE: -pick add $@ %<
23 ?S: This variable conditionally defines the I_NDBM symbol, which
24 ?S: indicates to the C program that <ndbm.h> exists and should
28 ?C: This symbol, if defined, indicates that <ndbm.h> exists and should
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
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
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
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
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.
62 ?C: This symbol, if defined, indicates that some form of ndbm.h or compatibility
63 ?C: include exists, along with the appropriate library.
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.
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.
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.
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.
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.
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.
110 ?H:#$i_ndbm I_NDBM /**/
111 ?H:#$i_gdbmndbm I_GDBMNDBM /**/
112 ?H:#$i_gdbm_ndbm I_GDBM_NDBM /**/
113 ?H:#$d_ndbm HAS_NDBM /**/
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 /**/
118 ?T:d_dbm_open name hdr ihdr ndbm_hdr_protochk
119 ?LINT:set d_ndbm d_gdbmndbm_h_uses_prototypes d_gdbm_ndbm_h_uses_prototypes d_ndbm_h_uses_prototypes
120 : see if ndbm.h is available
123 : Compatibility location for RedHat 7.1
124 set gdbm/ndbm.h i_gdbmndbm
126 : Compatibility location for Debian 4.0
127 set gdbm-ndbm.h i_gdbm_ndbm
131 if $test "$i_ndbm" = "$define" -o "$i_gdbmndbm" = "$define" -o "$i_gdbm_ndbm" = "$define"; then
132 : see if dbm_open exists
133 set dbm_open d_dbm_open
135 case "$d_dbm_open" in
140 echo "We won't be including <ndbm.h>"
150 ndbm_hdr_protochk='name=$1; hdr=$2;
151 eval "ihdr=\$""i_$name";
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" ;;
160 $define) $echo "Your <$hdr> seems to have prototypes";;
161 *) $echo "Your <$hdr> does not seem to have prototypes";;
164 set "d_${name}_h_uses_prototypes";
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