summaryrefslogtreecommitdiff
path: root/bfd/configure.com
blob: b4d648626f35b8a5008afaff21f0979a43a8e392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
$!
$! This file configures the bfd library for use with openVMS/Alpha
$! We do not use the configure script, since we do not have /bin/sh
$! to execute it.
$!
$! Written by Klaus K"ampf (kkaempf@progis.de)
$!
$arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1)      ! vax==1, alpha==2
$arch = f$element(arch_indx,"|","|VAX|Alpha|")
$if arch .eqs. "VAX"
$then
$ write sys$output "Target VAX not supported."
$ exit 2
$endif
$!
$! copy bfd-in2.h to bfd.h, replacing @ macros
$!
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
        []bfd-in2.h /output=[]bfd.h
$DECK
!
!  Copy file, changing lines with macros (@@)
!
!
   vfile := CREATE_BUFFER("vfile", "VERSION.");
   POSITION(BEGINNING_OF(vfile));
   vers := CURRENT_LINE;

   file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
   rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));

   match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
   IF match_pos <> 0 THEN;
      POSITION(BEGINNING_OF(match_pos));
      ERASE(match_pos);
      COPY_TEXT(vers);
   ENDIF;
   match_pos := SEARCH_QUIETLY('@wordsize@', FORWARD, EXACT, rang);
   IF match_pos <> 0 THEN;
      POSITION(BEGINNING_OF(match_pos));
      ERASE(match_pos);
      COPY_TEXT('64');
   ENDIF;
   match_pos := SEARCH_QUIETLY('@BFD_HOST_64BIT_LONG@', FORWARD, EXACT, rang);
   IF match_pos <> 0 THEN;
      POSITION(BEGINNING_OF(match_pos));
      ERASE(match_pos);
      COPY_TEXT('0');
   ENDIF;
   match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT_DEFINED@', FORWARD, EXACT, rang);
   IF match_pos <> 0 THEN;
      POSITION(BEGINNING_OF(match_pos));
      ERASE(match_pos);
      COPY_TEXT('__DECC');
      SPLIT_LINE;
      COPY_TEXT('#include <ints.h>');
   ENDIF;
   match_pos := SEARCH_QUIETLY('@BFD_HOST_64_BIT@', FORWARD, EXACT, rang);
   IF match_pos <> 0 THEN;
      POSITION(BEGINNING_OF(match_pos));
      ERASE(match_pos);
      COPY_TEXT('int64');
   ENDIF;
   match_pos := SEARCH_QUIETLY('@BFD_HOST_U_64_BIT@', FORWARD, EXACT, rang);
   IF match_pos <> 0 THEN;
      POSITION(BEGINNING_OF(match_pos));
      ERASE(match_pos);
      COPY_TEXT('uint64');
   ENDIF;
   WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
   QUIT
$  EOD
$ write sys$output "Generated `bfd.h' from `bfd-in2.h'."
$!
$!
$! create targmatch.h
$!
$ open/write tfile []targmatch.h
$ write tfile "{ " + """alpha-*-*vms*""" + ","
$ write tfile "#if defined (SELECT_VECS)"
$ write tfile "SELECT_VECS"
$ write tfile "#else"
$ write tfile "UNSUPPORTED_TARGET"
$ write tfile "#endif"
$ write tfile "},"
$ close tfile
$ write sys$output "Generated `targmatch.h'"
$!
$!
$! create config.h
$!
$ create []config.h
/* config.h-vms.  Generated by hand by Klaus Kämpf, kkaempf@didymus.rmi.de.  */
/* config.in.  Generated automatically from configure.in by autoheader.  */
/* Whether malloc must be declared even if <stdlib.h> is included.  */
/* #undef NEED_DECLARATION_MALLOC */
/* Whether free must be declared even if <stdlib.h> is included.  */
/* #undef NEED_DECLARATION_FREE */
/* Define if you have a working `mmap' system call.  */
/* #define HAVE_MMAP 1 */
/* Do we need to use the b modifier when opening binary files?  */
/* #undef USE_BINARY_FOPEN */
/* Name of host specific header file to include in trad-core.c.  */
/* #undef TRAD_HEADER */
/* Define only if <sys/procfs.h> is available *and* it defines prstatus_t.  */
/* #undef HAVE_SYS_PROCFS_H */
/* Do we really want to use mmap if it's available?  */
/* #undef USE_MMAP */
/* Define if you have the fcntl function.  */
#define HAVE_FCNTL 1
/* Define if you have the getpagesize function.  */
#define HAVE_GETPAGESIZE 1
/* Define if you have the madvise function.  */
#define HAVE_MADVISE 1
/* Define if you have the mprotect function.  */
#define HAVE_MPROTECT 1
/* Define if you have the <fcntl.h> header file.  */
#define HAVE_FCNTL_H 1
/* Define if you have the <stddef.h> header file.  */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdlib.h> header file.  */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file.  */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file.  */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/file.h> header file.  */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <time.h> header file.  */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file.  */
#define HAVE_UNISTD_H 1
$!
$ write sys$output "Generated `config.h'"