2 $! This file configures the bfd library for use with openVMS (Alpha and Vax)
4 $! We do not use the configure script, since we do not have /bin/sh
7 $! Written by Klaus K"ampf (kkaempf@rmi.de)
9 $arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1) ! vax==1, alpha==2
10 $arch = f$element(arch_indx,"|","|VAX|Alpha|")
12 $if arch .eqs. "Alpha"
14 $ write sys$output "Configuring for Alpha target"
17 $! copy bfd-in2.h to bfd.h, replacing @ macros
19 $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
20 []bfd-in2.h /output=[]bfd.h
23 ! Copy file, changing lines with macros (@@)
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));
32 vers := CURRENT_LINE-")";
37 file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
38 rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
40 match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
41 IF match_pos <> 0 THEN;
42 POSITION(BEGINNING_OF(match_pos));
46 match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
47 IF match_pos <> 0 THEN;
48 POSITION(BEGINNING_OF(match_pos));
52 match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
53 IF match_pos <> 0 THEN;
54 POSITION(BEGINNING_OF(match_pos));
58 match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
59 IF match_pos <> 0 THEN;
60 POSITION(BEGINNING_OF(match_pos));
64 COPY_TEXT('#include <ints.h>');
66 match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
67 IF match_pos <> 0 THEN;
68 POSITION(BEGINNING_OF(match_pos));
72 match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
73 IF match_pos <> 0 THEN;
74 POSITION(BEGINNING_OF(match_pos));
78 WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
84 $ write sys$output "Configuring for Vax target"
87 $! copy bfd-in2.h to bfd.h, replacing @ macros
89 $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
90 []bfd-in2.h /output=[]bfd.h
93 ! Copy file, changing lines with macros (@@)
96 vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN");
97 rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile));
98 match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang);
99 IF match_pos <> 0 THEN;
100 POSITION(BEGINNING_OF(match_pos));
102 vers := CURRENT_LINE-")";
107 file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
108 rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
110 match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
111 IF match_pos <> 0 THEN;
112 POSITION(BEGINNING_OF(match_pos));
116 match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
117 IF match_pos <> 0 THEN;
118 POSITION(BEGINNING_OF(match_pos));
122 match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
123 IF match_pos <> 0 THEN;
124 POSITION(BEGINNING_OF(match_pos));
128 match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
129 IF match_pos <> 0 THEN;
130 POSITION(BEGINNING_OF(match_pos));
134 COPY_TEXT('#include <ints.h>');
136 match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
137 IF match_pos <> 0 THEN;
138 POSITION(BEGINNING_OF(match_pos));
142 match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
143 IF match_pos <> 0 THEN;
144 POSITION(BEGINNING_OF(match_pos));
148 WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
153 $ write sys$output "Generated `bfd.h' from `bfd-in2.h'."
156 $! create targmatch.h
158 $ open/write tfile []targmatch.h
159 $ write tfile "{ """ + target + "-*-*vms*""" + ","
160 $ write tfile "#if defined (SELECT_VECS)"
161 $ write tfile "SELECT_VECS"
162 $ write tfile "#else"
163 $ write tfile "UNSUPPORTED_TARGET"
164 $ write tfile "#endif"
167 $ write sys$output "Generated `targmatch.h'"
173 /* config.h-vms. Generated by hand by Klaus Kämpf, kkaempf@didymus.rmi.de. */
174 /* config.in. Generated automatically from configure.in by autoheader. */
175 /* Whether malloc must be declared even if <stdlib.h> is included. */
176 /* #undef NEED_DECLARATION_MALLOC */
177 /* Whether free must be declared even if <stdlib.h> is included. */
178 /* #undef NEED_DECLARATION_FREE */
179 /* Define if you have a working `mmap' system call. */
180 /* #define HAVE_MMAP 1 */
181 /* Do we need to use the b modifier when opening binary files? */
182 /* #undef USE_BINARY_FOPEN */
183 /* Name of host specific header file to include in trad-core.c. */
184 /* #undef TRAD_HEADER */
185 /* Define only if <sys/procfs.h> is available *and* it defines prstatus_t. */
186 /* #undef HAVE_SYS_PROCFS_H */
187 /* Do we really want to use mmap if it's available? */
188 /* #undef USE_MMAP */
189 /* Define if you have the fcntl function. */
191 /* Define if you have the getpagesize function. */
192 #define HAVE_GETPAGESIZE 1
193 /* Define if you have the madvise function. */
194 #define HAVE_MADVISE 1
195 /* Define if you have the mprotect function. */
196 #define HAVE_MPROTECT 1
197 /* Define if you have the <fcntl.h> header file. */
198 #define HAVE_FCNTL_H 1
199 /* Define if you have the <stddef.h> header file. */
200 #define HAVE_STDDEF_H 1
201 /* Define if you have the <stdlib.h> header file. */
202 #define HAVE_STDLIB_H 1
203 /* Define if you have the <string.h> header file. */
204 #define HAVE_STRING_H 1
205 /* Define if you have the <strings.h> header file. */
206 #define HAVE_STRINGS_H 1
207 /* Define if you have the <sys/file.h> header file. */
208 #define HAVE_SYS_FILE_H 1
209 /* Define if you have the <time.h> header file. */
210 #define HAVE_TIME_H 1
211 /* Define if you have the <unistd.h> header file. */
212 #define HAVE_UNISTD_H 1
214 $ write sys$output "Generated `config.h'"