1*3d8817e4Smiod$!
2*3d8817e4Smiod$! This file configures binutils for use with openVMS/Alpha
3*3d8817e4Smiod$! We do not use the configure script, since we do not have /bin/sh
4*3d8817e4Smiod$! to execute it.
5*3d8817e4Smiod$!
6*3d8817e4Smiod$! Written by Klaus K"ampf (kkaempf@rmi.de)
7*3d8817e4Smiod$!
8*3d8817e4Smiod$arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1)      ! vax==1, alpha==2
9*3d8817e4Smiod$arch = f$element(arch_indx,"|","|VAX|Alpha|")
10*3d8817e4Smiod$!
11*3d8817e4Smiod$!
12*3d8817e4Smiod$! Generate config.h
13*3d8817e4Smiod$!
14*3d8817e4Smiod$ create []config.h
15*3d8817e4Smiod/* config.h.  Generated automatically by configure.  */
16*3d8817e4Smiod/* config.in.  Generated automatically from configure.in by autoheader.  */
17*3d8817e4Smiod/* Is the type time_t defined in <time.h>?  */
18*3d8817e4Smiod#define HAVE_TIME_T_IN_TIME_H 1
19*3d8817e4Smiod/* Is the type time_t defined in <sys/types.h>?  */
20*3d8817e4Smiod#define HAVE_TIME_T_IN_TYPES_H 1
21*3d8817e4Smiod/* Does <utime.h> define struct utimbuf?  */
22*3d8817e4Smiod#define HAVE_GOOD_UTIME_H 1
23*3d8817e4Smiod/* Whether fprintf must be declared even if <stdio.h> is included.  */
24*3d8817e4Smiod#define NEED_DECLARATION_FPRINTF 1
25*3d8817e4Smiod/* Whether sbrk must be declared even if <unistd.h> is included.  */
26*3d8817e4Smiod#undef NEED_DECLARATION_SBRK
27*3d8817e4Smiod/* Do we need to use the b modifier when opening binary files?  */
28*3d8817e4Smiod/* #undef USE_BINARY_FOPEN */
29*3d8817e4Smiod/* Define if you have the sbrk function.  */
30*3d8817e4Smiod/* #undef HAVE_SBRK 1 */
31*3d8817e4Smiod/* Define if you have the utimes function.  */
32*3d8817e4Smiod#define HAVE_UTIMES 1
33*3d8817e4Smiod/* Define if you have the <fcntl.h> header file.  */
34*3d8817e4Smiod#define HAVE_FCNTL_H 1
35*3d8817e4Smiod/* Define if you have the <stdlib.h> header file.  */
36*3d8817e4Smiod#define HAVE_STDLIB_H 1
37*3d8817e4Smiod/* Define if you have the <string.h> header file.  */
38*3d8817e4Smiod#define HAVE_STRING_H 1
39*3d8817e4Smiod/* Define if you have the <strings.h> header file.  */
40*3d8817e4Smiod#define HAVE_STRINGS_H 1
41*3d8817e4Smiod/* Define if you have the <sys/file.h> header file.  */
42*3d8817e4Smiod#define HAVE_SYS_FILE_H 1
43*3d8817e4Smiod/* Define if you have the <unistd.h> header file.  */
44*3d8817e4Smiod#define HAVE_UNISTD_H 1
45*3d8817e4Smiod$ write sys$output "Generated `config.h'"
46*3d8817e4Smiod$!
47*3d8817e4Smiod$!
48*3d8817e4Smiod$! Edit VERSION in makefile.vms-in
49*3d8817e4Smiod$!
50*3d8817e4Smiod$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input -
51*3d8817e4Smiod        []makefile.vms-in /output=[]makefile.vms
52*3d8817e4Smiod$DECK
53*3d8817e4Smiod!
54*3d8817e4Smiod! Get VERSION from configure.in
55*3d8817e4Smiod!
56*3d8817e4Smiod   mfile := CREATE_BUFFER("mfile", "CONFIGURE.IN");
57*3d8817e4Smiod   rang := CREATE_RANGE(BEGINNING_OF(mfile), END_OF(mfile));
58*3d8817e4Smiod   match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(binutils, ', FORWARD, EXACT, rang);
59*3d8817e4Smiod   IF match_pos <> 0 THEN;
60*3d8817e4Smiod     POSITION(BEGINNING_OF(match_pos));
61*3d8817e4Smiod     ERASE(match_pos);
62*3d8817e4Smiod     vers := CURRENT_LINE-")";
63*3d8817e4Smiod   ELSE;
64*3d8817e4Smiod     vers := "unknown";
65*3d8817e4Smiod   ENDIF;
66*3d8817e4Smiod
67*3d8817e4Smiod   file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name"));
68*3d8817e4Smiod   rang := CREATE_RANGE(BEGINNING_OF(file), END_OF(file));
69*3d8817e4Smiod   match_pos := SEARCH_QUIETLY('@VERSION@', FORWARD, EXACT, rang);
70*3d8817e4Smiod   POSITION(BEGINNING_OF(match_pos));
71*3d8817e4Smiod   ERASE(match_pos);
72*3d8817e4Smiod   COPY_TEXT(vers);
73*3d8817e4Smiod   WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file"));
74*3d8817e4Smiod   QUIT
75*3d8817e4Smiod$  EOD
76*3d8817e4Smiod$ write sys$output "Created `makefile.vms'"
77