2009-08-10 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / bfd / configure.com
1 $!
2 $! This file configures the bfd library for use with openVMS (Alpha and Vax)
3 $!
4 $! We do not use the configure script, since we do not have /bin/sh
5 $! to execute it.
6 $!
7 $! Written by Klaus K"ampf (kkaempf@rmi.de)
8 $!
9 $arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1) ! vax==1, alpha==2
10 $arch = f$element(arch_indx,"|","|VAX|Alpha|")
11 $!
12 $if arch .eqs. "Alpha"
13 $then
14 $ write sys$output "Configuring for Alpha target"
15 $ target = "alpha"
16 $!
17 $! copy bfd-in2.h to bfd.h, replacing @ macros
18 $!
19 $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
20 []bfd-in2.h /output=[]bfd.h
21 $DECK
22 !
23 ! Copy file, changing lines with macros (@@)
24 !
25 !
26 vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
27 rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
28 match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
29 IF match_pos <> 0 THEN;
30 POSITION(BEGINNING_OF(match_pos));
31 ERASE(match_pos);
32 vers := CURRENT_LINE-")";
33 ELSE;
34 vers := "unknown";
35 ENDIF;
36
37 file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
38 rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
39
40 match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
41 IF match_pos <> 0 THEN;
42 POSITION(BEGINNING_OF(match_pos));
43 ERASE(match_pos);
44 COPY_TEXT(vers);
45 ENDIF;
46 match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
47 IF match_pos <> 0 THEN;
48 POSITION(BEGINNING_OF(match_pos));
49 ERASE(match_pos);
50 COPY_TEXT('64');
51 ENDIF;
52 match_pos := SEARCH_QUIETLY('@bfd_default_target_size@', FORWARD, EXACT, rang);
53 IF match_pos <> 0 THEN;
54 POSITION(BEGINNING_OF(match_pos));
55 ERASE(match_pos);
56 COPY_TEXT('64');
57 ENDIF;
58 match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
59 IF match_pos <> 0 THEN;
60 POSITION(BEGINNING_OF(match_pos));
61 ERASE(match_pos);
62 COPY_TEXT('0');
63 ENDIF;
64 match_pos := SEARCH_QUIETLY('@BFD_HOST_LONG_LONG@', FORWARD, EXACT, rang);
65 IF match_pos <> 0 THEN;
66 POSITION(BEGINNING_OF(match_pos));
67 ERASE(match_pos);
68 COPY_TEXT('0');
69 ENDIF;
70 match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG_LONG@', FORWARD, EXACT, rang);
71 IF match_pos <> 0 THEN;
72 POSITION(BEGINNING_OF(match_pos));
73 ERASE(match_pos);
74 COPY_TEXT('0');
75 ENDIF;
76 match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
77 IF match_pos <> 0 THEN;
78 POSITION(BEGINNING_OF(match_pos));
79 ERASE(match_pos);
80 COPY_TEXT('__DECC');
81 SPLIT_LINE;
82 COPY_TEXT('#include <ints.h>');
83 ENDIF;
84 match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
85 IF match_pos <> 0 THEN;
86 POSITION(BEGINNING_OF(match_pos));
87 ERASE(match_pos);
88 COPY_TEXT('int64');
89 ENDIF;
90 match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
91 IF match_pos <> 0 THEN;
92 POSITION(BEGINNING_OF(match_pos));
93 ERASE(match_pos);
94 COPY_TEXT('uint64');
95 ENDIF;
96 match_pos := SEARCH_QUIETLY('@BFD_HOSTPTR_T@', FORWARD, EXACT, rang);
97 IF match_pos <> 0 THEN;
98 POSITION(BEGINNING_OF(match_pos));
99 ERASE(match_pos);
100 COPY_TEXT('uint64');
101 ENDIF;
102 match_pos := SEARCH_QUIETLY('@bfd_file_ptr@', FORWARD, EXACT, rang);
103 IF match_pos <> 0 THEN;
104 POSITION(BEGINNING_OF(match_pos));
105 ERASE(match_pos);
106 COPY_TEXT('bfd_signed_vma');
107 ENDIF;
108 match_pos := SEARCH_QUIETLY('unsigned @bfd_file_ptr@ ufile_ptr', FORWARD, EXACT, rang);
109 IF match_pos <> 0 THEN;
110 POSITION(BEGINNING_OF(match_pos));
111 ERASE(match_pos);
112 COPY_TEXT('bfd_vma ufile_ptr');
113 ENDIF;
114 WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
115 QUIT
116 $ EOD
117 $
118 $else
119 $
120 $ write sys$output "Configuring for Vax target"
121 $ target = "vax"
122 $!
123 $! copy bfd-in2.h to bfd.h, replacing @ macros
124 $!
125 $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
126 []bfd-in2.h /output=[]bfd.h
127 $DECK
128 !
129 ! Copy file, changing lines with macros (@@)
130 !
131 !
132 vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
133 rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
134 match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
135 IF match_pos <> 0 THEN;
136 POSITION(BEGINNING_OF(match_pos));
137 ERASE(match_pos);
138 vers := CURRENT_LINE-")";
139 ELSE;
140 vers := "unknown";
141 ENDIF;
142
143 file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
144 rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
145
146 match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
147 IF match_pos <> 0 THEN;
148 POSITION(BEGINNING_OF(match_pos));
149 ERASE(match_pos);
150 COPY_TEXT(vers);
151 ENDIF;
152 match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
153 IF match_pos <> 0 THEN;
154 POSITION(BEGINNING_OF(match_pos));
155 ERASE(match_pos);
156 COPY_TEXT('32');
157 ENDIF;
158 match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
159 IF match_pos <> 0 THEN;
160 POSITION(BEGINNING_OF(match_pos));
161 ERASE(match_pos);
162 COPY_TEXT('0');
163 ENDIF;
164 match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
165 IF match_pos <> 0 THEN;
166 POSITION(BEGINNING_OF(match_pos));
167 ERASE(match_pos);
168 COPY_TEXT('__DECC');
169 SPLIT_LINE;
170 COPY_TEXT('#include <ints.h>');
171 ENDIF;
172 match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
173 IF match_pos <> 0 THEN;
174 POSITION(BEGINNING_OF(match_pos));
175 ERASE(match_pos);
176 COPY_TEXT('int64');
177 ENDIF;
178 match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
179 IF match_pos <> 0 THEN;
180 POSITION(BEGINNING_OF(match_pos));
181 ERASE(match_pos);
182 COPY_TEXT('uint64');
183 ENDIF;
184 WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
185 QUIT
186 $ EOD
187 $endif
188 $
189 $ write sys$output "Generated `bfd.h' from `bfd-in2.h'."
190 $!
191 $! create bfdver.h
192 $!
193 $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
194 []version.h /output=[]bfdver.h
195 $DECK
196 !
197 ! Copy file, changing lines with macros (@@)
198 !
199 !
200 vfile := CREATE_BUFFER("vfile", "configure.in");
201 rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
202 match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
203 IF match_pos <> 0 THEN;
204 POSITION(BEGINNING_OF(match_pos));
205 ERASE(match_pos);
206 vers := CURRENT_LINE-")";
207 ELSE;
208 vers := "unknown";
209 ENDIF;
210 versnum := vers - "." - ".";
211
212 file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
213 rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
214
215 match_pos := SEARCH_QUIETLY('@bfd_version@', FORWARD, EXACT, rang);
216 IF match_pos <> 0 THEN;
217 POSITION(BEGINNING_OF(match_pos));
218 ERASE(match_pos);
219 COPY_TEXT(versnum);
220 ENDIF;
221 match_pos := SEARCH_QUIETLY('@bfd_version_string@', FORWARD, EXACT, rang);
222 IF match_pos <> 0 THEN;
223 POSITION(BEGINNING_OF(match_pos));
224 ERASE(match_pos);
225 COPY_TEXT('"');
226 COPY_TEXT(vers);
227 COPY_TEXT('"');
228 ENDIF;
229 match_pos := SEARCH_QUIETLY('@bfd_version_package@', FORWARD, EXACT, rang);
230 IF match_pos <> 0 THEN;
231 POSITION(BEGINNING_OF(match_pos));
232 ERASE(match_pos);
233 COPY_TEXT('"(GNU Binutils) "');
234 ENDIF;
235 match_pos := SEARCH_QUIETLY('@report_bugs_to@', FORWARD, EXACT, rang);
236 IF match_pos <> 0 THEN;
237 POSITION(BEGINNING_OF(match_pos));
238 ERASE(match_pos);
239 COPY_TEXT('"<http://www.sourceware.org/bugzilla/>"');
240 ENDIF;
241 WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
242 QUIT
243 $ EOD
244 $ write sys$output "Generated `bfdver.h' from 'version.h' and `configure.in'."
245 $!
246 $!
247 $! create targmatch.h
248 $!
249 $ open/write tfile []targmatch.h
250 $ write tfile "{ """ + target + "-*-*vms*""" + ","
251 $ write tfile "#if defined (SELECT_VECS)"
252 $ write tfile "SELECT_VECS"
253 $ write tfile "#else"
254 $ write tfile "UNSUPPORTED_TARGET"
255 $ write tfile "#endif"
256 $ write tfile "},"
257 $ close tfile
258 $ write sys$output "Generated `targmatch.h'"
259 $!
260 $!
261 $! create config.h
262 $!
263 $ create []config.h
264 /* config.h-vms. Generated by hand by Klaus Kämpf, kkaempf@didymus.rmi.de. */
265 /* config.in. Generated automatically from configure.in by autoheader. */
266 /* Whether malloc must be declared even if <stdlib.h> is included. */
267 /* #undef NEED_DECLARATION_MALLOC */
268 /* Whether free must be declared even if <stdlib.h> is included. */
269 /* #undef NEED_DECLARATION_FREE */
270 /* Define if you have a working `mmap' system call. */
271 /* #define HAVE_MMAP 1 */
272 /* Do we need to use the b modifier when opening binary files? */
273 /* #undef USE_BINARY_FOPEN */
274 /* Name of host specific header file to include in trad-core.c. */
275 /* #undef TRAD_HEADER */
276 /* Define only if <sys/procfs.h> is available *and* it defines prstatus_t. */
277 /* #undef HAVE_SYS_PROCFS_H */
278 /* Do we really want to use mmap if it's available? */
279 /* #undef USE_MMAP */
280 /* Define if you have the fcntl function. */
281 #define HAVE_FCNTL 1
282 /* Define if you have the getpagesize function. */
283 #define HAVE_GETPAGESIZE 1
284 /* Define if you have the madvise function. */
285 #define HAVE_MADVISE 1
286 /* Define if you have the mprotect function. */
287 #define HAVE_MPROTECT 1
288 /* Define if you have the <fcntl.h> header file. */
289 #define HAVE_FCNTL_H 1
290 /* Define if you have the <stddef.h> header file. */
291 #define HAVE_STDDEF_H 1
292 /* Define if you have the <stdlib.h> header file. */
293 #define HAVE_STDLIB_H 1
294 /* Define if you have the <string.h> header file. */
295 #define HAVE_STRING_H 1
296 /* Define if you have the <strings.h> header file. */
297 #define HAVE_STRINGS_H 1
298 /* Define if you have the <sys/file.h> header file. */
299 #define HAVE_SYS_FILE_H 1
300 /* Define if you have the <time.h> header file. */
301 #define HAVE_TIME_H 1
302 /* Define if you have the <unistd.h> header file. */
303 #define HAVE_UNISTD_H 1
304 /* Disable NLS */
305 #undef ENABLE_NLS
306 $!
307 $ write sys$output "Generated `config.h'"
308
This page took 0.038408 seconds and 4 git commands to generate.