configure.com revision 1.1.1.1
1$! configure.com
2$! This file sets things up to build gas on a VMS system to generate object
3$! files for a VMS system.  We do not use the configure script, since we
4$! do not have /bin/sh to execute it.
5$!
6$!
7$ arch=F$GETSYI("ARCH_NAME")
8$ arch=F$EDIT(arch,"LOWERCASE")
9$ if arch.eqs."alpha"
10$ then
11$   format = "evax"
12$   env = "generic"
13$   target_alias = "alpha-dec-openvms"
14$   target_canonical = "alpha-dec-openvms"
15$ endif
16$ if arch.eqs."ia64"
17$ then
18$   format = "elf"
19$   env = "vms"
20$   target_alias = "ia64-openvms"
21$   target_canonical = "ia64-unknown-openvms"
22$ endif
23$!
24$!
25$ write sys$output "Generate targ-cpu.[ch]"
26$!
27$! Target specific information
28$ open/write outfile targ-cpu.h
29$ write outfile "#include ""tc-''arch'.h"""
30$ close outfile
31$! Target specific information
32$ open/write outfile targ-cpu.c
33$ write outfile "#include ""tc-''arch'.c"""
34$ close outfile
35$!
36$ write sys$output "Generate targ-env.h"
37$!
38$ open/write outfile targ-env.h
39$ write outfile "#include ""te-''env'.h"""
40$ close outfile
41$!
42$ write sys$output "Generate obj-format.[ch]"
43$!
44$! Code to handle the object file format.
45$ open/write outfile obj-format.h
46$ write outfile "#include ""obj-''format'.h"""
47$ close outfile
48$ open/write outfile obj-format.c
49$ write outfile "#include ""obj-''format'.c"""
50$ close outfile
51$!
52$ write sys$output "Generate atof-targ.c"
53$!
54$ create atof-targ.c
55#include "atof-ieee.c"
56$!
57$ write sys$output "Generate gas/config.h"
58$!
59$  create config-vms.in
60/* config.h.  Generated by configure.com.  */
61/* Define to 1 if using `alloca.c'. */
62#undef C_ALLOCA
63
64/* Default architecture. */
65#undef DEFAULT_ARCH
66
67/* Default emulation. */
68#define DEFAULT_EMULATION ""
69
70/* Supported emulations. */
71#define EMULATIONS
72
73/* Define if you want run-time sanity checks. */
74#undef ENABLE_CHECKING
75
76/* Define to 1 if translation of program messages to the user's native
77   language is requested. */
78#undef ENABLE_NLS
79
80/* Define to 1 if you have `alloca', as a function or macro. */
81#define HAVE_ALLOCA 1
82#include <builtins.h>
83#define C_alloca(x) __ALLOCA(x)
84
85/* Define to 1 if you have the `basename' function. */
86#define HAVE_DECL_BASENAME 1
87
88/* Is the prototype for getopt in <unistd.h> in the expected format? */
89#define HAVE_DECL_GETOPT 1
90
91/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
92   don't. */
93#undef HAVE_DECL_VSNPRINTF
94
95/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
96   don't. */
97#define HAVE_DECL_SNPRINTF 1
98
99/* Define to 1 if you have the <errno.h> header file. */
100#define HAVE_ERRNO_H 1
101
102/* Define to 1 if you have the <limits.h> header file. */
103#undef HAVE_LIMITS_H
104
105/* Define to 1 if you have the `remove' function. */
106#define HAVE_REMOVE 1
107
108/* Define to 1 if you have the <stdarg.h> header file. */
109#define HAVE_STDARG_H 1
110
111/* Define to 1 if you have the <stdint.h> header file. */
112#undef HAVE_STDINT_H
113
114/* Define to 1 if you have the <stdlib.h> header file. */
115#define HAVE_STDLIB_H 1
116
117/* Define to 1 if you have the <strings.h> header file. */
118#define HAVE_STRINGS_H 1
119
120/* Define to 1 if you have the <string.h> header file. */
121#define HAVE_STRING_H 1
122
123/* Define to 1 if you have the <sys/stat.h> header file. */
124#undef HAVE_SYS_STAT_H
125
126/* Define to 1 if you have the <sys/types.h> header file. */
127#undef HAVE_SYS_TYPES_H
128
129/* Define to 1 if you have the <unistd.h> header file. */
130#undef HAVE_UNISTD_H
131
132/* Define to 1 if you have the `unlink' function. */
133#undef HAVE_UNLINK
134
135/* Name of package */
136#define PACKAGE "gas"
137
138/* Define to the address where bug reports for this package should be sent. */
139#define PACKAGE_BUGREPORT ""
140
141/* Define to the full name of this package. */
142#define PACKAGE_NAME ""
143
144/* Define to the full name and version of this package. */
145#define PACKAGE_STRING ""
146
147/* Define to the one symbol short name of this package. */
148#define PACKAGE_TARNAME ""
149
150/* Define to the version of this package. */
151#define PACKAGE_VERSION ""
152
153/* Define to 1 if you have the ANSI C header files. */
154#define STDC_HEADERS 1
155
156/* Target OS. */
157#define TARGET_OS "openvms"
158
159/* Target vendor. */
160#define TARGET_VENDOR "dec"
161
162/* Define to 1 if your processor stores words with the most significant byte
163   first (like Motorola and SPARC, unlike Intel and VAX). */
164#define WORDS_BIGENDIAN 1
165
166/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
167   `char[]'. */
168#undef YYTEXT_POINTER
169
170/* Version number of package */
171$!
172$! Get VERSION from ../bfd/configure.in
173$!
174$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input
175$DECK
176   set (success, off);
177   mfile := CREATE_BUFFER("mfile", "[-.bfd]configure.in");
178   match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, mfile);
179   IF match_pos <> 0 THEN;
180     POSITION(BEGINNING_OF(match_pos));
181     ERASE(match_pos);
182     vers := CURRENT_LINE-")";
183   ELSE;
184     vers := "unknown";
185   ENDIF;
186
187   file := CREATE_BUFFER("file", "config-vms.in");
188   POSITION(END_OF(file));
189   COPY_TEXT("#define VERSION """);
190   COPY_TEXT(vers);
191   COPY_TEXT("""");
192   WRITE_FILE(file, "config.h");
193   QUIT
194$EOD
195$del/nolog config-vms.in;
196$ open/append outfile config.h
197$  write outfile ""
198$  write outfile "/* Target alias. */"
199$  write outfile "#define TARGET_ALIAS ""''target_alias'"""
200$  write outfile ""
201$  write outfile "/* Canonical target. */"
202$  write outfile "#define TARGET_CANONICAL ""''target_canonical'"""
203$  write outfile ""
204$  write outfile "/* Target CPU. */"
205$  write outfile "#define TARGET_CPU ""'arch'"""
206$ close outfile
207$!
208$ write sys$output "Generate gas/build.com"
209$!
210$ create build.com
211$DECK
212$ DEFS=""
213$ OPT="/noopt/debug"
214$ CFLAGS=OPT + "/include=([],""../include"",[-.bfd],""../"",[.config])" +-
215 "/name=(as_is,shortened)" +-
216 "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
217$ FILES="obj-format,atof-targ,app,as,atof-generic,cond,depend,"+-
218  "expr,flonum-konst,flonum-copy,flonum-mult,frags,hash,input-file,"+-
219  "input-scrub,literal,messages,output-file,read,subsegs,symbols,write,"+-
220  "listing,ecoff,stabs,sb,macro,ehopt,dw2gencfi,dwarf2dbg,remap"
221$ LIBBFD = ",[-.bfd]libbfd.olb/lib"
222$ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
223$ LIBOPCODES = ",[-.opcodes]libopcodes.olb/lib"
224$!
225$ AS_OBJS="targ-cpu," + FILES 
226$!
227$ write sys$output "CFLAGS=",CFLAGS
228$!
229$EOD
230$!
231$ if arch.eqs."ia64"
232$ then
233$   open/append outfile build.com
234$   write outfile "$ write sys$output ""Compiling te-vms.c"""
235$   write outfile "$ cc 'CFLAGS /obj=te-vms.obj [.config]te-vms.c + " +-
236      "sys$library:sys$lib_c.tlb/lib"
237$   write outfile "$ AS_OBJS=AS_OBJS + "",te-vms.obj"""
238$   close outfile
239$ endif
240$!
241$ append sys$input build.com
242$DECK
243$ if p1.nes."LINK"
244$ then
245$   write sys$output "Compiling targ-cpu.c (/noopt)"
246$   cc 'CFLAGS /noopt targ-cpu
247$   NUM = 0
248$   LOOP:
249$     F = F$ELEMENT(NUM,",",FILES)
250$     IF F.EQS."," THEN GOTO END
251$     write sys$output "Compiling ", F, ".c"
252$     cc 'CFLAGS 'F.c
253$     NUM = NUM + 1
254$     GOTO LOOP
255$   END:
256$ endif
257$ purge
258$!
259$ write sys$output "Building as.exe"
260$ AS_OBJS=AS_OBJS + LIBOPCODES +  LIBBFD +  LIBIBERTY
261$ link/exe=as 'AS_OBJS
262$EOD
263$exit
264
265