-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_mosaic.com
1725 lines (1719 loc) · 51.5 KB
/
make_mosaic.com
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
$ Ident = "4.2"
$!
$! Create Mosaic version 4.2 on VMS.
$!
$! Copyright (C) 2000, 2003, 2004, 2005, 2006, 2007 - The VMS Mosaic Project
$!
$! This command procedure compiles and links Mosaic with MMS or MMK if
$! either is available, otherwise it just compiles and links in one go.
$!
$! The debugger is enabled if P1 is set to DEBUG. Trace dumps are enabled
$! if P1 is set to TRACE. P2 can be used to specify the TCP/IP package
$! (CMU, MULTINET, PATHWAY, SOCKETSHR, TCPWARE or UCX). MMS parameters
$! can be added in P3 (e.g. /IGNORE=WARNING to make MMS ignore compilation
$! warnings). Additional arguments (e.g. NOVMSLOGO, VAXC, NOMMS, NOUCX)
$! can be specified in P4 thru P8.
$!
$! Björn S. Nilsson, 25-Nov-1993
$! Motif 1.2 sensitivity added 2-June-1994
$! Mosaic 2.4 with WAIS Dec. 1994
$! Mosaic 2.6, Oct. 1995, George Cook
$! Combined build procedure, Nov. 1995, George Cook
$! VAX GNU C support, Sept. 1996, George Cook
$! OpenSSL support, Aug. 1999, George Cook
$! HP SSL support, Nov. 2003, George Cook
$! Motif 1.3 support, Dec. 2003, George Cook
$! IA64 and Motif 1.4 support, Jan. 2004, George Cook
$! LIBTIFF support, Jul. 2006, George Cook
$! LIBOPENJPEG support, May 2007, George Cook
$!
$!---------------------------------------------------------------------------
$!
$! Fallbacks for home page, default print command, mail prefix, etc.
$! ***
$! *** Local configuration info should be placed in the file local.config
$! *** The following values are only used if they are not in local.config
$! ***
$!----------------------------------------
$ HOME_PAGE ="http://wvnvms.wvnet.edu/vmswww/vms_mosaic.html"
$ PRINT_COMMAND ="Print/Name=\""""""""From Mosaic\""""""""/Notify/Identify/Delete"
$ MAIL_PREFIX ="in%"
$! MAIL_PREFIX ="smtp%" ! Native UCX
$ EDIT_COMMAND ="Edit"
$ NEWS_HOST ="" ! The name of the default news host
$ POSTSCRIPT_VIEWER ="View/interface=decwindows/format=ps %s"
$! POSTSCRIPT_VIEWER ="gv %s" ! Ghostview
$!----------------------------------------
$!
$ If F$Search("local.config") .NES. ""
$ Then
$ Open/read/err=End_conf loc_conf local.config
$Read_conf:
$ Read/end=End_conf/err=End_conf loc_conf Line
$ Line = F$Edit(Line, "TRIM,COMPRESS,UNCOMMENT")
$ If Line .NES. ""
$ Then
$ item = F$Element(0, "#", Line)
$ value = F$Element(1, "#", Line)
$ 'item' = 'value'
$ Endif
$ Goto Read_conf
$End_conf:
$ If F$Trnlnm("loc_conf") .NES. "" Then Close loc_conf
$ Endif
$!
$!---------------------------------------------------------------------------
$!
$ Verify = F$Verify(0)
$ On Error Then Goto The_End
$ On Control_Y Then Goto EndY
$ Set Symbol/Scope = (NoGlobal, NoLocal)
$! Get rid of <>
$ Set Default []
$ pwd = F$Environment("Default")
$ Set Default 'F$Element(0, "]", F$Environment("PROCEDURE"))']
$!
$ If (P3 .EQS. "?") .OR. (P3 .EQS. "HELP")
$ Then
$ Write sys$output "Additional MMS parameters (e.g. /IGNORE=WARNING) in P3."
$ Goto The_End
$ Endif
$ If (P2 .EQS. "?") .OR. (P2 .EQS. "HELP")
$ Then
$ Write sys$output -
"Specify UCX, CMU, MULTINET, PATHWAY, SOCKETSHR or TCPWARE."
$ Goto The_End
$ Endif
$ If (P1 .EQS. "?") .OR. (P1 .EQS. "HELP")
$ Then
$ Write sys$output "Specify DEBUG in P1 to build with debugging."
$ Write sys$output "Specify TRACE in P1 to enable trace dumps."
$ Write sys$output -
"The TCP/IP package (UCX, CMU, MULTINET, PATHWAY, SOCKETSHR or TCPWARE) in P2."
$ Write sys$output "Additional MMS parameters (e.g. /IGNORE=WARNING) in P3."
$ Write sys$output -
"Additional arguments (e.g. VAXC, GNUC, NOMMS, NOVMSLOGO) in P4 thru P8."
$ Goto The_End
$ Endif
$ If (P1 .NES. "TRACE") .AND. (P1 .NES. "DEBUG") .AND. (P1 .NES. "")
$ Then
$ Write sys$output "Invalid P1 parameter. Specify either TRACE or DEBUG."
$ Goto The_End
$ Endif
$ If (P2 .NES. "") .AND. (P2 .NES. "UCX") .AND. (P2 .NES. "CMU") .AND. -
(P2 .NES. "MULTINET") .AND. (P2 .NES. "PATHWAY") .AND. -
(P2 .NES. "SOCKETSHR") .AND. (P2 .NES. "TCPWARE")
$ Then
$ Write sys$output "Invalid TCP/IP package specified in P2."
$ Write sys$output -
"Specify UCX, CMU, MULTINET, PATHWAY, SOCKETSHR or TCPWARE."
$ Goto The_End
$ Endif
$!
$ Args = ""
$ If P4 .NES. "" then Args = P4 + ","
$ If P5 .NES. "" then Args = Args + P5 + ","
$ If P6 .NES. "" then Args = Args + P6 + ","
$ If P7 .NES. "" then Args = Args + P7 + ","
$ If P8 .NES. "" then Args = Args + P8 + ","
$ Args = F$Edit(Args, "COLLAPSE,UPCASE")
$!
$ Macro = "(IDENT=''Ident',"
$ If F$Locate("NOWAIS", Args) .NE. F$Length(Args) -
Then Macro = Macro + "NOWAIS=1,"
$ If F$Locate("NOLINK", Args) .NE. F$Length(Args) -
Then Macro = Macro + "NOLINK=1,"
$ If F$Locate("NOTIFF", Args) .NE. F$Length(Args)
$ Then
$ Macro = Macro + "NOTIFF=1,"
$ Tiff = 0
$ Else
$ Tiff = 1
$ Endif
$ If F$Locate("CCI", Args) .NE. F$Length(Args)
$ Then CCI = 1
$ Else CCI = 0
$ Endif
$!
$ VMS_Version = F$Extract(1, 3, F$GetSYI("Version"))
$!
$ On Warning Then Platform = "VAX"
$ If (VMS_Version .EQS. "5.4") .OR. (VMS_Version .EQS. "5.5")
$ Then Platform = "VAX"
$ Else Platform = F$GetSYI("Arch_Name")
$ Endif
$ On Error Then Goto The_End
$ If Platform .EQS. "Alpha"
$ Then
$ Macro = Macro + "ALPHA=1,"
$ Work = "A"
$ Else If Platform .EQS. "IA64"
$ Then Work = "I"
$ Else Work = "V"
$ Endif
$ Endif
$!
$ If F$Locate("NOTRACE", Args) .NE. F$Length(Args)
$ Then
$ Disable_Trace = 1
$ Work = "N" + Work
$ Else
$ Disable_Trace = 0
$ Endif
$!
$ If ((Platform .EQS. "Alpha") .AND. (VMS_Version .GES. "7.2")) .OR. -
(Platform .EQS. "IA64")
$ Then
$ Write sys$output "Setting DCL parse style to TRADITIONAL."
$ Set Process/Parse=Traditional
$ Endif
$!
$ CC = "CC"
$ Compiler = ""
$ DECCP = 0
$ VAXCP = 0
$ GNUCP = 0
$ If F$Locate("DECC", Args) .NE. F$Length(Args) Then DECCP = 1
$ If F$Locate("VAXC", Args) .NE. F$Length(Args) Then VAXCP = 1
$ If F$Locate("GNUC", Args) .NE. F$Length(Args) Then GNUCP = 1
$ If (DECCP .AND. VAXCP) .OR. (DECCP .AND. GNUCP) .OR. (VAXCP .AND. GNUCP)
$ Then
$ Write sys$output "Multiple C compilers specified. Please specify only one."
$ Write sys$output "Aborting."
$ Goto The_End
$ Endif
$!
$ If (F$Search("SYS$System:DECC$Compiler.Exe") .EQS. "") .AND. DECCP
$ Then
$ Write sys$output "DEC C does not appear to be installed on this system."
$ Write sys$output "Aborting."
$ Goto The_End
$ Endif
$ If (F$Search("SYS$System:VAXC.Exe") .EQS. "") .AND. VAXCP
$ Then
$ Write sys$output "VAX C does not appear to be installed on this system."
$ Write sys$output "Aborting."
$ Goto The_End
$ Endif
$ If (F$Trnlnm("GNU_CC_VERSION") .EQS. "") .AND. GNUCP
$ Then
$ Write sys$output "GNU C does not appear to be installed on this system."
$ Write sys$output "Aborting."
$ Goto The_End
$ Endif
$!
$ If F$Search("SYS$System:DECC$Compiler.Exe") .NES. ""
$ Then
$ If (Platform .EQS. "VAX") .AND. -
(F$Trnlnm("DECC$LIBRARY_INCLUDE") .EQS. "") .AND. -
(F$Trnlnm("DECC$CC_DEFAULT") .EQS. "") .AND. (.NOT. VAXCP) .AND. -
(.NOT. GNUCP)
$ Then
$ Write sys$output "DEC C does not appear to be properly installed on"
$ Write sys$output "this system. Check if SYS$STARTUP:CCXX$STARTUP.COM"
$ If DECCP
$ Then
$ Write sys$output "was executed. Aborting."
$ Goto The_End
$ Else
$ Write sys$output "was executed. Will attempt to use VAX or GNU C."
$ Endif
$ Else
$ Compiler = "DECC"
$ Endif
$ Endif
$!
$ If (Compiler .EQS. "") .AND. (F$Search("SYS$System:VAXC.Exe") .NES. "")
$ Then
$ Compiler = "VAXC"
$ Endif
$!
$ If (Compiler .EQS. "") .AND. (F$Trnlnm("GNU_CC_VERSION") .NES. "")
$ Then
$ Compiler = "GNUC"
$ Endif
$!
$ If Compiler .EQS. ""
$ Then
$ Write sys$output "C does not appear to be installed on this system."
$ Write sys$output "DEC C, VAX C or GNU C is required. Aborting."
$ Goto The_End
$ Endif
$!
$ If Compiler .EQS. "DECC"
$ Then
$ If VAXCP
$ Then
$ Compiler = "VAXC"
$ Macro = Macro + "DECCVAXC=1,VAXC=1,"
$ COpt = "/VAXC/PRECISION=SINGLE"
$ COpt_NoVAXC = COpt
$ Endif
$ Else
$ If ((Compiler .EQS. "VAXC") .OR. VAXCP) .AND. (.NOT. GNUCP)
$ Then
$ Compiler = "VAXC"
$ Macro = Macro + "VAXC=2,"
$ COpt = ""
$ COpt_NoVAXC = "/PRECISION=SINGLE"
$ Endif
$ Endif
$!
$ If (Compiler .EQS. "GNUC") .OR. GNUCP
$ Then
$ Compiler = "GNUC"
$ If Platform .EQS. "Alpha"
$ Then CC = "GCC/Names=Upper/Float=ieee/cc1=""-fno-exceptions -g0"""
$ Else CC = "GCC/Names=Upper"
$ Endif
$ Macro = Macro + "GNUC=1,"
$ COpt = ""
$ COpt_NoVAXC = ""
$ Endif
$!
$ If Compiler .EQS. "DECC"
$ Then
$ Macro = Macro + "DECC=1,"
$ COpt = "/DECC/Standard=VAXC/PRECISION=SINGLE"
$ If F$Locate("UNUSED", Args) .NE. F$Length(Args)
$ Then COpt_NoVAXC = -
"/DECC/WARNING=(ENABLE=UNUSED,DISABLE=(UNUSEDINCL,NESTINCL))"
$ Else If F$Locate("QUESTCODE", Args) .NE. F$Length(Args)
$ Then COpt_NoVAXC = -
"/DECC/WARNING=(ENABLE=QUESTCODE,DISABLE=(UNKNOWNMACRO,INTCONSTSIGN))"
$ Else If F$Locate("CHECK", Args) .NE. F$Length(Args)
$ Then COpt_NoVAXC = "/DECC/CHECK"
$ Else COpt_NoVAXC = "/DECC"
$ Endif
$ Endif
$ Endif
$ Endif
$!
$ If (Compiler .EQS. "VAXC") .AND. Tiff
$ Then
$ Write sys$output "DEC C or GNU C is required to build with TIFF support."
$ Write sys$output "Continuing build without including TIFF image support."
$ Macro = Macro + "NOTIFF=1,"
$ Tiff = 0
$ Endif
$!
$! OpenSSL
$!
$ SSL = 1
$ SSL_Log = 0
$ If F$Locate("NOSSL", Args) .NE. F$Length(Args)
$ Then
$ Write sys$output "Building without OpenSSL support."
$ SSL = 0
$ Else If F$Trnlnm("OPENSSL") .EQS. ""
$ Then
$ SSL = 3
$ Endif
$ Endif
$!
$! Check for HP OpenSSL
$ If (SSL .EQ. 1) .AND. (F$Trnlnm("SSL$ROOT") .NES. "") .AND. -
(F$Search("SYS$SHARE:SSL$LIBSSL_SHR32.EXE") .NES. "") .AND. -
(F$Locate("NOHPSSL", Args) .EQ. F$Length(Args))
$ Then
$ SSL = 2
$ If F$Trnlnm("OPENSSL") .EQS. "SSLINCLUDE:"
$ Then
$ Define OPENSSL SSL$INCLUDE:
$ SSL_Log = 1
$ Endif
$ Endif
$!
$! Check for non-HP OpenSSL
$ If (SSL .EQ. 1) .AND. (F$Trnlnm("SSLLIB") .EQS. "")
$ Then
$ SSL = 3
$ Endif
$!
$ If SSL .EQ. 3
$ Then
$ Write sys$output "OpenSSL appears to not be installed on this system."
$ Write sys$output "Continuing build without including OpenSSL."
$ SSL = 0
$ Endif
$ If (SSL .GT. 0) .AND. (Compiler .NES. "DECC")
$ Then
$ Write sys$output "DEC C is required to build with OpenSSL."
$ Write sys$output "Continuing build without including OpenSSL."
$ SSL = 0
$ Endif
$ If (SSL .EQ. 0) Then Macro = Macro + "NOSSL=1,"
$ If (SSL .EQ. 2) Then Macro = Macro + "HPSSL=1,"
$!
$!
$ If F$Locate("CLEAN", P3) .NE. F$Length(P3)
$ Then Extras = " " + P3
$ Else Extras = P3
$ Endif
$ If F$Locate("CLEAN", Args) .NE. F$Length(Args) Then Extras = Extras + " CLEAN"
$ If F$GetJPI("","CLINAME") .EQS. "DCL_RECALL" Then Extras = Extras + "/CLI=DCL"
$!
$ If (F$Locate("DEBUG", P1) .EQ. F$Length(P1)) .OR. -
(F$Locate("NODEBUG", P1) .NE. F$Length(P1))
$ Then
$ COpt = COpt + "/Optim"
$ COpt_NoVAXC = COpt_NoVAXC + "/Optim"
$ If F$Locate("TRACE", P1) .EQ. F$Length(P1)
$ Then
$ LOpt = "/NoTrace"
$ VMS_Debug = 0
$ Else
$ LOpt = "/Trace"
$ VMS_Debug = 1
$ Macro = Macro + "TRACE=1,"
$ Endif
$ Else
$ COpt = COpt + "/NoOptim/Debug"
$ COpt_NoVAXC = COpt_NoVAXC + "/NoOptim/Debug"
$ LOpt = "/Debug"
$ VMS_Debug = 1
$ Macro = Macro + "DEBUG=1,"
$ Work = "D" + Work
$ EndIf
$ If Compiler .EQS. "VAXC" Then Work = Work + "C"
$ If Compiler .EQS. "GNUC" Then Work = Work + "G"
$!
$ If P2 .EQS. ""
$ Then
$ IP = "UCX"
$ If F$Trnlnm("MULTINET") .NES. ""
$ Then
$ IP = "MULTINET_UCX"
$ Goto ip_done
$ Endif
$ If F$Trnlnm("TWG$TCP") .NES. ""
$ Then
$ IP = "PATHWAY_UCX"
$ Goto ip_done
$ EndIf
$ If F$Trnlnm("INET$DEVICE") .NES. ""
$ Then
$ IP = "CMU"
$ Goto ip_done
$ Endif
$ If F$Trnlnm("SOCKETSHR") .NES. ""
$ Then
$ IP = "SOCKETSHR"
$ Goto ip_done
$ EndIf
$ If F$Trnlnm("TCPWARE") .NES. ""
$ Then
$ IP = "TCPWARE"
$ Goto ip_done
$ EndIf
$ Else
$ IP = ""
$ IPX = F$Edit(P2, "UPCASE")
$ If F$Locate("UCX", IPX) .NE. F$Length(IPX) Then IP ="UCX"
$ If F$Locate("CMU", IPX) .NE. F$Length(IPX) Then IP ="CMU"
$ If F$Locate("MULTINET", IPX) .NE. F$Length(IPX) Then IP ="MULTINET_UCX"
$ If F$Locate("PATHWAY", IPX) .NE. F$Length(IPX) Then IP ="PATHWAY_UCX"
$ If F$Locate("SOCKETSHR", IPX) .NE. F$Length(IPX) Then IP ="SOCKETSHR"
$ If F$Locate("TCPWARE", IPX) .NE. F$Length(IPX) Then IP ="TCPWARE"
$ If IP .EQS. ""
$ Then
$ Write sys$output "Invalid TCP/IP package specified in P2."
$ Write sys$output -
"Must be UCX, CMU, MULTINET, PATHWAY, SOCKETSHR or TCPWARE."
$ Goto The_End
$ Endif
$ Endif
$Ip_done:
$ If F$Locate("NOUCX", Args) .NE. F$Length(Args) Then IP = IP - "_UCX"
$ If IP .EQS. "MULTINET_UCX"
$ Then
$ Set Noon
$ Set Symbol/Scope = (Global, NoLocal)
$ Define/User sys$output tmpip.lis
$ Define/User sys$error tmpip.lis
$ Multinet Show/Version
$ Set Symbol/Scope = (NoGlobal, NoLocal)
$ Define/User sys$output nl:
$ Define/User sys$error nl:
$ Search tmpip.lis 3.1,3.2,3.3
$ Tmp_Err = $Severity
$ Delete tmpip.lis;*
$ Set On
$ If Tmp_Err .EQ. 1
$ Then
$ Write sys$output "The MultiNet on this system is a version prior to V3.4."
$ Write sys$output "Versions prior to V3.4 do not correctly support UCX"
$ Write sys$output "compatibility mode. Proceeding with non-UCX build."
$ Write sys$output " "
$ IP = IP - "_UCX"
$ Endif
$ Endif
$ If IP .EQS. "MULTINET"
$ Then
$ Set Noon
$ Set Symbol/Scope = (Global, NoLocal)
$ Define/User sys$output tmpip.lis
$ Define/User sys$error tmpip.lis
$ Multinet Show/Version
$ Set Symbol/Scope = (NoGlobal, NoLocal)
$ Define/User sys$output nl:
$ Define/User sys$error nl:
$ Search tmpip.lis 4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,5.4,5.5,6.0,6.1
$ Tmp_Err = $Severity
$ Delete tmpip.lis;*
$ Set On
$ If Tmp_Err .EQ. 1
$ Then
$ Write sys$output "The MultiNet on this system is a version after V4.1."
$ Write sys$output "Direct MultiNet builds are not supported on versions"
$ Write sys$output "after V4.1. Proceeding with UCX compatible build."
$ Write sys$output " "
$ IP = "MULTINET_UCX"
$ Endif
$ Endif
$ Macro = Macro + IP + "=1,"
$ If (IP .EQS. "UCX") .OR. (IP .EQS. "MULTINET_UCX") .OR. (IP .EQS. "CMU") -
.OR. (IP .EQS. "PATHWAY_UCX") .OR. (IP .EQS. "TCPWARE")
$ Then Work = Work + "U"
$ Else
$ If Compiler .EQS. "GNUC"
$ Then
$ Write sys$output "SOCKETSHR and non-UCX compatible builds are not"
$ Write sys$output "supported using the GNU C compiler. Aborting."
$ Goto The_End
$ Endif
$ Endif
$ If IP .EQS. "MULTINET" Then Work = Work + "M"
$ If IP .EQS. "PATHWAY"
$ Then
$ Work = Work + "P"
$ @[.twg]def.com ! define the location of PathWay include files
$ Endif
$ If IP .EQS. "SOCKETSHR" Then Work = Work + "S"
$!
$! Test build
$ If F$Locate("TEST", Args) .NE. F$Length(Args) Then Work = "TEST_" + Work
$!
$ Macro = Macro + "WORK=" + Work + ","
$!
$ If Compiler .EQS. "DECC"
$ Then
$ If IP .EQS. "MULTINET"
$ Then
$ COpt = COpt + "/PREFIX=ANSI"
$ COpt_NoVAXC = COpt_NoVAXC + "/PREFIX=ANSI"
$ Else
$ If VMS_Version .GES. "7.0"
$ Then
$ COpt = COpt + "/PREFIX=(ALL,EXCEPT=(GETPWUID,IOCTL))"
$ COpt_NoVAXC = COpt_NoVAXC + "/PREFIX=(ALL,EXCEPT=(GETPWUID,IOCTL))"
$ Else
$ COpt = COpt + "/PREFIX=ALL"
$ COpt_NoVAXC = COpt_NoVAXC + "/PREFIX=ALL"
$ Endif
$ Endif
$ Endif
$!
$ If IP .EQS. "SOCKETSHR"
$ Then
$ Define Socketshr_Files -
"''f$parse(f$trnlnm("SOCKETSHR"),,,"DEVICE")'''f$parse(f$trnlnm("SOCKETSHR"),,,"DIRECTORY")"
$ Write sys$output "Will look for the SOCKETSHR include files in the same"
$ Write sys$output "location as the SOCKETSHR shareable library."
$ Write sys$output " "
$ Endif
$!
$ Motif12 = ""
$ Motif123 = ""
$ Motif124 = ""
$ Motif125 = ""
$ Motif126 = ""
$ Motif13 = ""
$ Motif130 = ""
$ Motif131 = ""
$ Motif14 = ""
$ Motif141 = ""
$ Motif15 = ""
$ Motif16 = ""
$ If F$Search("SYS$Update:DECW$Get_Image_Version.COM") .NES. ""
$ Then
$ Set Symbol/Scope = (Global, Local)
$ @SYS$Update:DECW$Get_Image_Version SYS$Share:DECW$XLibshr.EXE DECW$Version
$ If (F$Length(DECW$Version) .NE. 0) .AND. -
(F$Locate("V1.1", DECW$Version) .NE. F$Length(DECW$Version))
$ Then Goto Motif11
$ Endif
$ If (F$Length(DECW$Version) .NE. 0) .AND. -
((F$Locate("V1.2", DECW$Version) .NE. F$Length(DECW$Version)) .OR. -
(F$Locate("T1.2", DECW$Version) .NE. F$Length(DECW$Version)))
$ Then
$ Macro = Macro + "MOTIF1_2=1,"
$ Motif12 = "1"
$ If (F$Locate("V1.2-395", DECW$Version) .NE. F$Length(DECW$Version)) .OR. -
(F$Locate("V1.2-394", DECW$Version) .NE. F$Length(DECW$Version)) .OR. -
(F$Locate("V1.23", DECW$Version) .NE. F$Length(DECW$Version))
$ Then
$ Write sys$output "Your system has Motif 1.2-3 installed. Due to a bug"
$ Write sys$output "in Motif 1.2-3, the hotlist dialog windows may act oddly."
$ Write sys$output " "
$ Motif123 = "1"
$ Else
$! 39602 is MOTF07, 39604 is DWMW01, 39801 is MOTF08, 39711 is DWMW02
$ If (F$Locate("V1.2-3960", DECW$Version) .NE. F$Length(DECW$Version)) -
.OR. (F$Locate("V1.2-3971", DECW$Version) .NE. F$Length(DECW$Version)) -
.OR. (F$Locate("V1.2-3980", DECW$Version) .NE. F$Length(DECW$Version))
$ Then Motif123 = "7"
$ Endif
$ Endif
$ If F$Locate("1.2-4", DECW$Version) .NE. F$Length(DECW$Version)
$ Then Motif124 = "1"
$ Endif
$ If F$Locate("1.2-5", DECW$Version) .NE. F$Length(DECW$Version)
$ Then Motif125 = "1"
$ Endif
$ If F$Locate("1.2-6", DECW$Version) .NE. F$Length(DECW$Version)
$ Then Motif126 = "1"
$ Endif
$ If (Motif123 .EQS. "") .AND. (Motif124 .EQS. "") .AND. -
(Motif125 .EQS. "") .AND. (Motif126 .EQS. "")
$ Then
$ Write sys$output "Your system appears to have Motif 1.2 installed. Due"
$ Write sys$output "to various problems with the Motif 1.2 header files,"
$ Write sys$output "the build of LIBXMX may fail with warning messages."
$ Write sys$output "If no other errors are encountered, the build can"
$ Write sys$output "safely be continued. It is recommended, however,"
$ Write sys$output "that you upgrade your system to Motif 1.2-3 and"
$ If Platform .EQS. "Alpha"
$ Then
$ Write sys$output "install patch kit ALPMOTF08_U3012 (for systems"
$ Write sys$output "with Motif Worldwide Support installed, the kit"
$ Write sys$output "is ALPDWMW02_U3012)."
$ Else
$ Write sys$output "install patch kit VAXMOTF08_U3012 (for systems"
$ Write sys$output "with Motif Worldwide Support installed, the kit"
$ Write sys$output "is VAXDWMW02_U3012)."
$ Endif
$ Write sys$output " "
$ Endif
$ Else If (F$Length(DECW$Version) .NE. 0) .AND. -
((F$Locate("V1.3", DECW$Version) .NE. F$Length(DECW$Version)) .OR. -
(F$Locate("T1.3", DECW$Version) .NE. F$Length(DECW$Version)))
$ Then
$ Macro = Macro + "MOTIF1_2=1,"
$ Motif12 = "1"
$ Motif13 = "1"
$ If F$Locate("1.3-0", DECW$Version) .NE. F$Length(DECW$Version)
$ Then Motif130 = "1"
$ Endif
$ If F$Locate("1.3-1", DECW$Version) .NE. F$Length(DECW$Version)
$ Then Motif131 = "1"
$ Endif
$ Else If (F$Length(DECW$Version) .NE. 0) .AND. -
((F$Locate("V1.4", DECW$Version) .NE. F$Length(DECW$Version)) .OR. -
(F$Locate("T1.4", DECW$Version) .NE. F$Length(DECW$Version)))
$ Then
$ Macro = Macro + "MOTIF1_2=1,"
$ Motif12 = "1"
$ Motif13 = "1"
$ Motif14 = "1"
$ If F$Locate("1.4-1", DECW$Version) .NE. F$Length(DECW$Version)
$ Then Motif141 = "1"
$ Endif
$ Else If (F$Length(DECW$Version) .NE. 0) .AND. -
(F$Locate("1.5", DECW$Version) .NE. F$Length(DECW$Version))
$ Then
$ Macro = Macro + "MOTIF1_2=1,"
$ Motif12 = "1"
$ Motif13 = "1"
$ Motif14 = "1"
$ Motif15 = "1"
$ Else If (F$Length(DECW$Version) .NE. 0) .AND. -
(F$Locate("1.6", DECW$Version) .NE. F$Length(DECW$Version))
$ Then
$ Macro = Macro + "MOTIF1_2=1,"
$ Motif12 = "1"
$ Motif13 = "1"
$ Motif14 = "1"
$ Motif15 = "1"
$ Motif16 = "1"
$ Else
$ Write sys$output "You either have DECW Motif installed incorrectly or"
$ Write sys$output "you have an unsupported version of it."
$ Goto Err
$ EndIf
$ EndIf
$ Endif
$ Endif
$ Endif
$Motif11:
$ Set Symbol/Scope = (NoGlobal, NoLocal)
$ Else
$ Write sys$output "You do not seem to have DECW Motif installed correctly!"
$ Goto Err
$ EndIf
$!
$ If F$Trnlnm("XMU") .EQS. ""
$ Then
$ Write sys$output -
"You cannot build Mosaic without the XMU auxiliary library. It comes as"
$ Write sys$output -
"an optional subset with DECWindows Motif, so you should install that now."
$ Goto Err
$ EndIf
$!
$ If F$Trnlnm("LNK$LIBRARY") .NES. ""
$ Then
$ Write sys$output -
"Logical LNK$LIBRARY is currently defined. If the link of Mosaic fails,"
$ Write sys$output -
"please deassign all LNK$LIBRARY logicals and rerun the build procedure."
$ Write sys$output " "
$ EndIf
$!
$ If F$Trnlnm("BITMAPS") .NES. ""
$ Then
$ Write sys$output -
"Logical BITMAPS is currently defined. If the compile of Mosaic fails,"
$ Write sys$output -
"please deassign all BITMAPS logicals and rerun the build procedure."
$ Write sys$output " "
$ EndIf
$!
$!
$! Create config.h, first the VMS invariant parts.
$!
$ Type$$ sys$input /output=test_config.h_'work'
/* config.h. Generated automatically on VMS by MAKE_MOSAIC.COM. */
/* Do not edit this file, it will just be overwritten */
/* during the build. */
/* Define to empty if the keyword does not work. */
/* #undef const */
#define XMOSAIC 1
/*#define PRERELEASE 1*/
/* Defines for system types */
/* #undef ALPHA */
/* #undef _BSD */
/* #undef DGUX */
/* #undef NEXT */
/* #undef _HPUX_SOURCE */
/* #undef MO_IRIX5 */
/* #undef SVR4 */
/* #undef SOLARIS */
/* #undef SOLARIS23 */
/* #undef SOLARIS24 */
/* #undef SOLARIS24X86 */
/* #undef SCO */
/* #undef SUN */
/* #undef CONVEX */
/* #undef MOTOROLA */
/* #undef BROKEN_MOTIF */
/* External software packages */
#define HAVE_JPEG 1
#define HAVE_PNG 1
#define HAVE_WAIS 1
/* Define to figure Motif version (does anybody use 1.0?) */
#define MOTIF 1
#define MOTIF1_1 1
/* Include the build specific config */
#ifdef __GNUC__
#include MOSAIC_CONFIG
#else
#include "mosaic_config"
#endif
$!
$! The rest of the config has to be customized for each site
$! and build configuration. It is placed in a build specific
$! include file.
$!
$ Open/write config_file test_config_'work'.h
$ If Motif12 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_2 */"
$ Else Write config_file "#define MOTIF1_2 1"
$ Endif
$ Write config_file "/* #undef MOTIF2_0 */"
$ Write config_file ""
$ Write config_file ""
$ Write config_file "/* These are VMS port specific */"
$ If Motif123 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_23 */"
$ Else
$ If Motif123 .EQS. "7"
$ Then Write config_file "#define MOTIF1_23 7"
$ Else Write config_file "#define MOTIF1_23 1"
$ Endif
$ Endif
$ If Motif124 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_24 */"
$ Else Write config_file "#define MOTIF1_24 1"
$ Endif
$ If Motif125 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_25 */"
$ Else Write config_file "#define MOTIF1_25 1"
$ Endif
$ If Motif126 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_26 */"
$ Else Write config_file "#define MOTIF1_26 1"
$ Endif
$ If Motif13 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_3 */"
$ Else Write config_file "#define MOTIF1_3 1"
$ Endif
$ If Motif130 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_30 */"
$ Else Write config_file "#define MOTIF1_30 1"
$ Endif
$ If Motif131 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_31 */"
$ Else Write config_file "#define MOTIF1_31 1"
$ Endif
$ If Motif14 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_4 */"
$ Else Write config_file "#define MOTIF1_4 1"
$ Endif
$ If Motif141 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_41 */"
$ Else Write config_file "#define MOTIF1_41 1"
$ Endif
$ If Motif15 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_5 */"
$ Else Write config_file "#define MOTIF1_5 1"
$ Endif
$ If Motif16 .EQS. ""
$ Then Write config_file "/* #undef MOTIF1_6 */"
$ Else Write config_file "#define MOTIF1_6 1"
$ Endif
$!
$ Write config_file "#define HOME_PAGE_DEFAULT ""''HOME_PAGE'"""
$ DUMMY_PRINT = "''PRINT_COMMAND'"
$ Write config_file "#define PRINT_DEFAULT ""''DUMMY_PRINT'"""
$ Write config_file "#define MAIL_PREFIX_DEFAULT ""''MAIL_PREFIX'"""
$ Write config_file "#define EDITOR_DEFAULT ""''EDIT_COMMAND'"""
$ Write config_file "#define DEFAULT_NEWS_HOST ""''NEWS_HOST'"""
$ Write config_file "#define DEFAULT_PS_VIEWER ""''POSTSCRIPT_VIEWER'"""
$!
$ If (IP .EQS. "UCX") .OR. (IP .EQS. "MULTINET_UCX") .OR. (IP .EQS. "CMU") -
.OR. (IP .EQS. "PATHWAY_UCX") .OR. (IP .EQS. "TCPWARE")
$ Then Write config_file "#define UCX 1"
$ Else Write config_file "/* #undef UCX */"
$ Endif
$ If IP .EQS. "MULTINET"
$ Then Write config_file "#define MULTINET 1"
$ Else Write config_file "/* #undef MULTINET */"
$ Endif
$ If IP .EQS. "PATHWAY"
$ Then Write config_file "#define WIN_TCP 1"
$ Else Write config_file "/* #undef WIN_TCP */"
$ Endif
$ If IP .EQS. "SOCKETSHR"
$ Then Write config_file "#define SOCKETSHR 1"
$ Else Write config_file "/* #undef SOCKETSHR */"
$ Endif
$ If IP .EQS. "TCPWARE"
$ Then Write config_file "#define TCPWARE 1"
$ Else Write config_file "/* #undef TCPWARE */"
$ Endif
$ If (IP .EQS. "MULTINET_UCX") .OR. (IP .EQS. "CMU") .OR. (IP .EQS. "TCPWARE") -
.OR. (IP .EQS. "PATHWAY_UCX")
$ Then Write config_file "#define UCX_COMPAT 1"
$ Else Write config_file "/* #undef UCX_COMPAT */"
$ Endif
$ If F$Locate("NOVMSLOGO", Args) .NE. F$Length(Args)
$ Then Write config_file "/* #undef VMSLOGO */"
$ Else Write config_file "#define VMSLOGO 1"
$ Endif
$ If Disable_Trace .EQ. 0
$ Then Write config_file "/* #undef DISABLE_TRACE */"
$ Else Write config_file "#define DISABLE_TRACE 1"
$ Endif
$ If CCI .EQ. 0
$ Then Write config_file "/* #undef CCI */"
$ Else Write config_file "#define CCI 1"
$ Endif
$ If SSL .GT. 0
$ Then Write config_file "#define HAVE_SSL 1"
$ Else Write config_file "/* #undef HAVE_SSL */"
$ Endif
$ If Tiff .EQ. 1
$ Then Write config_file "#define HAVE_TIFF 1"
$ Else Write config_file "/* #undef HAVE_TIFF */"
$ Endif
$ Close config_file
$!
$ Open/write config_file Built_'work'.h
$ Write config_file -
"/* built_xx.h Generated automatically on VMS by MAKE_MOSAIC.COM. */"
$ Write config_file -
"/* Do not edit this file, it will just be overwritten */"
$ Write config_file -
"/* during the build. */"
$ Write config_file " "
$ Write config_file "#define BUILD_TIME ""''f$time()'"""
$ Write config_file "#define IDENT_VER ""''Ident'"""
$ If VMS_Debug .EQ. 1
$ Then Write config_file "#define DEBUGVMS 1"
$ Else Write config_file "/* #undef DEBUGVMS */"
$ Endif
$ If SSL .EQ. 2
$ Then Write config_file "#define HAVE_HPSSL 1"
$ Else Write config_file "/* #undef HAVE_HPSSL */"
$ Endif
$ Close config_file
$ Purge Built_'work'.h
$!
$! This file is only referenced by MMS descript files
$ Open/write config_file test_SSL_'work'.h
$ Write config_file "/* Dummy file to force recompile of SSL stuff as needed */"
$ If SSL .EQ. 0 Then Write config_file "/* No SSL support */"
$ If SSL .EQ. 1 Then Write config_file "/* OpenSSL support */"
$ If SSL .EQ. 2 Then Write config_file "/* HP SSL support */"
$ Close config_file
$!
$! Don't want to create a new config.h on every build or MMS will rebuild
$! everything. Update only if it changed or RECOMPILE specified.
$ If F$Search("config.h") .EQS. ""
$ Then Rename test_config.h_'work' config.h
$ Else
$ Set noon
$ Differ/out=nl: test_config.h_'work' config.h
$ Diff_err = $severity
$ Set on
$ If (diff_err .EQ. 1) .AND. -
(F$Locate("RECOMPILE", Args) .EQ. F$Length(Args))
$ Then Delete test_config.h_'work';*
$ Else Rename test_config.h_'work' config.h
$ Endif
$ Endif
$!
$ If F$Search("config_''work'.h") .EQS. ""
$ Then Rename test_config_'work'.h config_'work'.h
$ Else
$ Set noon
$ Differ/out=nl: test_config_'work'.h config_'work'.h
$ Diff_err = $severity
$ Set on
$ If diff_err .EQ. 1
$ Then Delete test_config_'work'.h;*
$ Else Rename test_config_'work'.h config_'work'.h
$ Endif
$ Endif
$!
$ If F$Search("SSL_''work'.h") .EQS. ""
$ Then Rename test_SSL_'work'.h SSL_'work'.h
$ Else
$ Set noon
$ Differ/out=nl: test_SSL_'work'.h SSL_'work'.h
$ Diff_err = $severity
$ Set on
$ If diff_err .EQ. 1
$ Then Delete test_SSL_'work'.h;*
$ Else Rename test_SSL_'work'.h SSL_'work'.h
$ Endif
$ Endif
$!
$ Top_Dir = F$Environment("default")
$ If Compiler .NES. "GNUC"
$ Then
$ Define mosaic_config "''Top_Dir'config_''work'.h"
$ Define mosaic_built "''Top_Dir'built_''work'.h"
$ GNUC_Def = ""
$ Else
$ GNUC_Def = "/Define=(mosaic_config=<''Top_Dir'config_''work'.h>," + -
"mosaic_built=<''Top_dir'built_''work'.h>)/Include=(gcc_include:)"
$ If Platform .EQS. "Alpha"
$ Then
$ If F$Locate("NOMMS", Args) .EQ. F$Length(Args)
$ Then GNUC_Def = GNUC_Def + "/Undefine=(""""alpha"""")"
$ Else GNUC_Def = GNUC_Def + "/Undefine=(""alpha"")"
$ Endif
$ Endif
$ If F$Locate("NOMMS", Args) .EQ. F$Length(Args)
$ Then
$ If Platform .EQS. "Alpha"
$ Then Define GCC_Defines -
"/Names=Upper/Float=ieee/cc1=""-fno-exceptions -g0""''GNUC_Def'"
$ Else Define GCC_Defines "/Names=Upper''GNUC_Def'"
$ Endif
$ Endif
$ Top_Root = Top_Dir - "]"
$ If Platform .EQS. "VAX"
$ Then
$ Define/Translation=Conceal gcc_include -
"''Top_Root'.libvms.gcc_include_vax.]", "''Top_Root'.src.]", -
"''Top_Root'.libwww2.]", "''Top_Root'.freewais-0_5.ir.]", -
"''Top_Root'.libpng.]", "''Top_Root'.zlib.]", "''Top_Root'.libtiff.]", -
"''Top_Root'.libjpeg.]", "''Top_Root'.libopenjpeg.]", -
"''Top_Root'.libnut.]", "''Top_Root'.libxmx.]"
$ Else
$ Define/Translation=Conceal gcc_include -
"''Top_Root'.libvms.gcc_include_alpha.]", -
"''Top_Root'.libvms.gcc_include_alpha.vms.]", "''Top_Root'.src.]", -
"''Top_Root'.libwww2.]", "''Top_Root'.freewais-0_5.ir.]", -
"''Top_Root'.libpng.]", "''Top_Root'.zlib.]", "''Top_Root'.libtiff.]", -
"''Top_Root'.libjpeg.]", "''Top_Root'.libopenjpeg.]", -
"''Top_Root'.libnut.]", "''Top_Root'.libxmx.]"
$ Endif
$ Endif
$!
$ If (F$Locate("NOMMS", Args) .NE. F$Length(Args)) .AND. -
(F$Locate("MMK", Args) .EQ. F$Length(Args)) Then Goto No_MMS
$ If (F$Search("SYS$System:MMS.Exe") .NES. "") .AND. -
(F$Locate("MMK", Args) .EQ. F$Length(Args))
$ Then
$ Set Noon
$ Set Symbol/Scope = (Global, NoLocal)
$ Define/User sys$output tmpmms.lis
$ Define/User sys$error tmpmms.lis
$ MMS/Ident
$ MMS_Err = $Severity
$ Set Symbol/Scope = (NoGlobal, NoLocal)
$ If MMS_Err .NE. 1
$ Then
$ Write sys$output "MMS does not appear to be available."
$ Write sys$output "Proceeding with complete (re)build."
$ Write sys$output " "
$ Delete tmpmms.lis;*
$ Set On
$ Goto No_MMS
$ Endif
$ Define/User sys$output nl:
$ Define/User sys$error nl:
$ Search tmpmms.lis V3.8
$ If $Severity .NE. 3
$ Then
$ Define/User sys$output nl:
$ Define/User sys$error nl:
$ Search tmpmms.lis V3.8-01
$ If $Severity .EQ. 3
$ Then
$ Write sys$output "The MMS on this system is V3.8."
$ Write sys$output "The Mosaic build will not work if V3.8 was installed"
$ Write sys$output "with Extended File Specification support."
$ Write sys$output " "
$ Endif
$ Endif
$ Delete tmpmms.lis;*