~ubuntu-branches/ubuntu/saucy/curl/saucy-201307251546

« back to all changes in this revision

Viewing changes to packages/vms/build_vms.com

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-02-12 08:54:32 UTC
  • mfrom: (3.4.34 sid)
  • Revision ID: package-import@ubuntu.com-20130212085432-r1fyi0b37enr93pp
Tags: 7.29.0-1ubuntu1
* Resynchronise with Debian. Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.
* Add warning to debian/patches/series.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
$!              build done.)
19
19
$!
20
20
$!    64        Compile with 64-bit pointers.
 
21
$!              Note, you must match the pointer size that the OpenSSL
 
22
$!              shared image expects.
 
23
$!              Currently curl is not building properly with 64 bit pointers
 
24
$!              on VMS because it is trying to cast pointers to 32 bit
 
25
$!              integers.
21
26
$!    CCQUAL=x  Add "x" to the C compiler qualifiers.
22
 
$!    DEBUG     Compile and link with debug.
23
 
$!    IEEE      Use IEEE floating point.  (Alpha.)
24
 
$!    LARGE     Enable large-file support.  (Non-VAX, VMS >= V7.2.)
25
 
$!    LDAP      Enable LDAP support.
 
27
$!              Default qualifiers are:
 
28
$!              /standard=relaxed
 
29
$!              /names=(as_is, shortened)
 
30
$!              /repository=[.'arch']
 
31
$!              /nested_include_directory=none
 
32
$!              /define=(_LARGEFILE=1,_USE_STD_STAT=1) (non-vax)
 
33
$!              /float=ieee/ieee_mode=denorm_results (non-vax)
 
34
$!    DEBUG     Compile debug and nooptimize
 
35
$!              Alpha/IA64 always compiles /debug.
 
36
$!              Always link a debug image.
 
37
$!    NOIEEE    Do not use IEEE floating point.  (Alpha/I64)
 
38
$!              VAX must use DFLOAT
 
39
$!    NOLARGE   Disable large-file support if large file support available.
 
40
$!              (Non-VAX, VMS >= V7.2.)
 
41
$!    NOLDAP    Disable LDAP support if LDAP is available.
 
42
$!    NOKERBEROS   Disable Kerberos support if Kerberos is available.
26
43
$!    LIST      Create C compiler listings and linker maps.
 
44
$!              /list/show=(expan,includ)/machine
 
45
$!    FULLLIST  Full detailed listing.
 
46
$!              /list/show=(all, nomessages)/machine
27
47
$!    NOHPSSL   Don't use HP SSL, even if available.
 
48
$!              Note, you must match the pointer size that the OpenSSL
 
49
$!              shared image expects.  This procedure will select the
 
50
$!              correct HP OpenSSL image.
28
51
$!    NOSSL     Don't use any SSL, even if available.
29
52
$!    OSSLOLB   Use OpenSSL object libraries (.OLB), even if shared
30
53
$!              images (.EXE) are available.
 
54
$!    NOZLIB    Don't use GNV$ZLIB shared image even if available.
31
55
$!
32
56
$! DCL Symbols:
33
57
$!
73
97
$!                   Added more default dev:[dir] save+restore.
74
98
$!                   Moved remaining "defines.com" code (back) into
75
99
$!                   here, eliminating the hard-coded OpenSSL nonsense.
76
 
$!                   Changed to use F$GETSYI( "ARCH_NAME") (or
 
100
$!                   Changed to use F$GETSYI("ARCH_NAME") (or
77
101
$!                   equivalent) to name architecture-specific product
78
102
$!                   file destination directory, and to create the
79
103
$!                   directory if needed (obviating inclusion of these
84
108
$!                   line-too-long problems.
85
109
$!                   Changed "vo_c" messages to show the CC qualifiers
86
110
$!                   once, not with every compile command.
 
111
$! 01-Jan-2013  J. Malmberg
 
112
$!                   VMS build procedures need to be able to work with
 
113
$!                   the default set to a search list, with created or
 
114
$!                   modified files only in the first member of the search
 
115
$!                   list.
 
116
$!                   Whitespace change to be more compatible with current
 
117
$!                   practices.
 
118
$!                   One pass option parsing instead of loop.
 
119
$!                   GNV ZLIB shared image support.
 
120
$!                   KERBEROS support where available.
 
121
$!                   LDAP default to on where available
 
122
$!                   LARGEFILE default to on where available
 
123
$!                   IEEE float default to on where available.
 
124
$!                   Generate the curl_config.h file from system inspection.
 
125
$!                   Linker finds ldap with out option file.
 
126
$!
 
127
$!===========================================================================
87
128
$!
88
129
$!
89
130
$! Save the original default dev:[dir], and arrange for its restoration
90
131
$! at exit.
91
 
$!
 
132
$!------------------------------------------------------------------------
92
133
$ curl = ""
93
 
$ orig_def = f$environment( "DEFAULT")
 
134
$ orig_def = f$environment("DEFAULT")
94
135
$ on error then goto Common_Exit
95
136
$ on control_y then goto Common_Exit
96
137
$!
97
138
$ ctrl_y  = 1556
98
 
$ proc = f$environment( "PROCEDURE")
99
 
$ proc_dev_dir = -
100
 
   f$parse( proc, , , "DEVICE")+ f$parse( proc, , , "DIRECTORY")
 
139
$ proc = f$environment("PROCEDURE")
 
140
$ proc_fid = f$file_attributes(proc, "FID")
 
141
$ proc_dev = f$parse(proc, , , "DEVICE")
 
142
$ proc_dir = f$parse(proc, , , "DIRECTORY")
 
143
$ proc_name = f$parse(proc, , , "NAME")
 
144
$ proc_type = f$parse(proc, , , "TYPE")
 
145
$ proc_dev_dir = proc_dev + proc_dir
 
146
$!
 
147
$! Have to manually parse the device for a search list.
 
148
$! Can not use the f$parse() as it will return the first name
 
149
$! in the search list.
 
150
$!
 
151
$ orig_def_dev = f$element(0, ":", orig_def) + ":"
 
152
$ if orig_def_dev .eqs. "::" then orig_def_dev = "sys$disk:"
 
153
$ test_proc = orig_def_dev + proc_dir + proc_name + proc_type
 
154
$!
 
155
$! If we can find this file using the default directory
 
156
$! then we know that we should use the original device from the
 
157
$! default directory which could be a search list.
 
158
$!
 
159
$ test_proc_fid = f$file_attributes(test_proc, "FID")
 
160
$!
 
161
$ if (test_proc_fid .eq. proc_fid)
 
162
$ then
 
163
$   proc_dev_dir = orig_def_dev + proc_dir
 
164
$ endif
 
165
$!
101
166
$!
102
167
$! Verbose output message stuff.  Define symbol to "write sys$output" or "!".
103
168
$! vo_c - verbose output for compile
104
169
$! vo_l - link
105
170
$! vo_o - object check
106
171
$!
107
 
$ vo_c = "write sys$output"
108
 
$ vo_l = "write sys$output"
109
 
$ vo_o = "!"
 
172
$ vo_c := "write sys$output"
 
173
$ vo_l := "write sys$output"
 
174
$ vo_o := "!"
110
175
$!
111
176
$! Determine the main distribution directory ("[--]") in an
112
177
$! ODS5-tolerant (case-insensitive) way.  (We do assume that the only
113
 
$! "]" is the one at the end.)
 
178
$! "]" or ">" is the one at the end.)
 
179
$!
 
180
$! Some non-US VMS installations report ">" for the directory delimiter
 
181
$! so do not assume that it is "]".
 
182
$!
 
183
$ orig_def_len = f$length(orig_def)
 
184
$ delim = f$extract(orig_def_len - 1, 1, orig_def)
114
185
$!
115
186
$ set default 'proc_dev_dir'
116
187
$ set default [--]
117
 
$ top_dev_dir = f$environment( "DEFAULT")- "]"
 
188
$ base_dev_dir = f$environment("default")
 
189
$ top_dev_dir = base_dev_dir - delim
 
190
$!
 
191
$!
118
192
$!
119
193
$! Define the architecture-specific product file destination directory
120
194
$! name(s).
121
195
$!
122
 
$ if (f$getsyi( "HW_MODEL") .lt. 1024)
 
196
$ if (f$getsyi("HW_MODEL") .lt. 1024)
123
197
$ then
124
198
$    arch_name = "VAX"
125
199
$ else
126
200
$    arch_name = ""
127
 
$    arch_name = arch_name+ f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 
201
$    arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
128
202
$    if (arch_name .eqs. "") then arch_name = "UNK"
129
203
$ endif
130
204
$!
131
 
$ exedir = proc_dev_dir- "]"+ ".''arch_name']"
 
205
$ exedir = proc_dev_dir - delim + ".''arch_name'" + delim
132
206
$ lisdir = exedir
133
207
$ objdir = exedir
134
208
$!
 
209
$! When building on a search list, need to do a create to make sure that
 
210
$! the output directory exists, since the clean procedure tries to delete
 
211
$! it.
 
212
$ create/dir 'exedir'/prot=o:rwed
 
213
$!
135
214
$! Interpret command-line options.
136
215
$!
137
216
$ hpssl = 0
138
 
$ ldap = 0
 
217
$ ldap = 1
139
218
$ list = 0
 
219
$ full_list = 0
140
220
$ nohpssl = 0
141
221
$ nossl = 0
142
222
$ openssl = 0
143
223
$ osslolb = 0
 
224
$ nozlib = 0
 
225
$ nokerberos = 0
 
226
$ cc_names = "/names=(shortened, as_is)/repository='exedir'
 
227
$ cc_defs = "HAVE_CONFIG_H=1"
 
228
$ cc_list = "/list='objdir'/show=(expan, includ)/machine
 
229
$ cc_full_list = "list='objdir'/show=(all, nomessages)/machine
 
230
$ link_qual = ""
 
231
$ if arch_name .eqs. "VAX"
 
232
$ then
 
233
$    cc_debug = "/nodebug/optimize"
 
234
$    !cc_defs = cc_defs + ""
 
235
$    cc_float = ""
 
236
$    cc_large = ""
 
237
$ else
 
238
$    cc_debug = "/debug/optimize"
 
239
$    cc_defs = cc_defs + ",_USE_STD_STAT"
 
240
$    cc_float = "/float=ieee/ieee_mode=denorm_results"
 
241
$    cc_large = ",_LARGEFILE"
 
242
$ endif
144
243
$ cc_qual1 = ""
145
244
$ cc_qual2 = ""
146
 
$ cc_defs = "HAVE_CONFIG_H=1"
147
 
$ if (f$type( CURL_CCDEFS) .nes. "")
 
245
$ if (f$type(CURL_CCDEFS) .nes. "")
148
246
$ then
149
 
$    CURL_CCDEFS = f$edit( CURL_CCDEFS, "TRIM")
150
 
$    cc_defs = cc_defs+ ", "+ CURL_CCDEFS
 
247
$    CURL_CCDEFS = f$edit(CURL_CCDEFS, "TRIM")
 
248
$    cc_defs = cc_defs + ", " + CURL_CCDEFS
151
249
$ endif
152
 
$ link_qual = ""
153
250
$ msg_qual = "/object = ''objdir'"
154
251
$ ssl_opt = ""
155
252
$!
156
 
$ arg = 1
157
 
$arg_loop:
158
 
$    p = "p''arg'"
159
 
$    arg_val = 'p'
160
 
$    if (arg_val .eqs. "") then goto arg_loop_out
161
 
$    arg_val = f$edit( arg_val, "upcase")
162
 
$!
163
 
$    if (arg_val .eqs. "CLEAN")
 
253
$! Allow arguments to be grouped together with comma or separated by spaces
 
254
$! Do no know if we will need more than 8.
 
255
$ args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
 
256
$ args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
 
257
$!
 
258
$! Provide lower case version to simplify parsing.
 
259
$ args_lower = f$edit(args, "LOWERCASE,COLLAPSE")
 
260
$!
 
261
$ args_len = f$length(args)
 
262
$ args_lower_len = f$length(args_lower)
 
263
$!
 
264
$ if f$locate(",clean,", args_lower) .lt. args_lower_len
164
265
$    then
165
266
$       prods = "''exedir'*.*;*"
166
 
$       if (f$search( prods) .nes. "") then delete /log 'prods'
167
 
$       prods = proc_dev_dir+ arch_name+ ".DIR;1"
168
 
$       if (f$search( prods) .nes. "") then delete /log 'prods'
169
 
$       goto Common_Exit
170
 
$    endif
171
 
$!
172
 
$    if (arg_val .eqs. "CLEAN_ALL")
173
 
$    then
174
 
$       prods = proc_dev_dir- "]"+ ".ALPHA]*.*;*"
175
 
$       if (f$search( prods) .nes. "") then delete /log 'prods'
176
 
$       prods = proc_dev_dir+ "ALPHA"+ ".DIR;1"
177
 
$       if (f$search( prods) .nes. "") then delete /log 'prods'
178
 
$       prods = proc_dev_dir- "]"+ ".IA64]*.*;*"
179
 
$       if (f$search( prods) .nes. "") then delete /log 'prods'
180
 
$       prods = proc_dev_dir+ "IA64"+ ".DIR;1"
181
 
$       if (f$search( prods) .nes. "") then delete /log 'prods'
182
 
$       prods = proc_dev_dir- "]"+ ".VAX]*.*;*"
183
 
$       if (f$search( prods) .nes. "") then delete /log 'prods'
184
 
$       prods = proc_dev_dir+ "VAX"+ ".DIR;1"
185
 
$       if (f$search( prods) .nes. "") then delete /log 'prods'
186
 
$       goto Common_Exit
187
 
$    endif
188
 
$!
189
 
$    if (arg_val .eqs. "64")
190
 
$    then
191
 
$       cc_qual1 = cc_qual1+ " /POINTER = 64"
192
 
$       goto arg_loop_end
193
 
$    endif
194
 
$!
195
 
$    if (f$extract( 0, 6, arg_val) .eqs. "CCQUAL")
196
 
$    then
197
 
$       opts = f$edit( arg_val, "COLLAPSE")
198
 
$       eq = f$locate( "=", opts)
199
 
$       cc_qual2 = f$extract( (eq+ 1), 1000, opts)
200
 
$       goto arg_loop_end
201
 
$    endif
202
 
$!
203
 
$    if (arg_val .eqs. "DEBUG")
204
 
$    then
205
 
$       cc_qual1 = cc_qual1+ " /debug /nooptimize"
206
 
$       link_qual = link_qual+ " /debug"
207
 
$       goto arg_loop_end
208
 
$    endif
209
 
$!
210
 
$    if (arg_val .eqs. "IEEE")
211
 
$    then
212
 
$       cc_qual1 = cc_qual1+ " /FLOAT = IEEE_FLOAT"
213
 
$       goto arg_loop_end
214
 
$    endif
215
 
$!
216
 
$    if (arg_val .eqs. "LARGE")
217
 
$    then
218
 
$       if (arch_name .eqs. "VAX")
219
 
$       then
220
 
$          write sys$output """LARGE"" is ignored on VAX."
221
 
$       else
222
 
$          cc_defs = cc_defs+ ", _LARGEFILE=1"
 
267
$   if (f$search(prods) .nes. "") then delete /log 'prods'
 
268
$   prods = proc_dev_dir + arch_name + ".DIR;1"
 
269
$   if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
 
270
$   if (f$search(prods) .nes. "") then delete /log 'prods'
 
271
$   file = "[]config_vms.h"
 
272
$   if f$search(file) .nes. "" then delete/log 'file';*
 
273
$   file = "[.include.curl]curlbuild.h"
 
274
$   if f$search(file) .nes. "" then delete/log 'file';*
 
275
$   file = "[.lib]config_vms.h"
 
276
$   if f$search(file) .nes. "" then delete/log 'file';*
 
277
$       goto Common_Exit
 
278
$    endif
 
279
$!
 
280
$ if f$locate(",clean_all,", args_lower) .lt. args_lower_len
 
281
$    then
 
282
$   prods = proc_dev_dir - delim + ".ALPHA" + delim + "*.*;*"
 
283
$   if (f$search(prods) .nes. "") then delete /log 'prods'
 
284
$   prods = proc_dev_dir + "ALPHA" + ".DIR;1"
 
285
$   if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
 
286
$   if (f$search(prods) .nes. "") then delete /log 'prods'
 
287
$   prods = proc_dev_dir - delim + ".IA64" + delim + "*.*;*"
 
288
$   if (f$search(prods) .nes. "") then delete /log 'prods'
 
289
$   prods = proc_dev_dir + "IA64" + ".DIR;1"
 
290
$   if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
 
291
$   if (f$search(prods) .nes. "") then delete /log 'prods'
 
292
$   prods = proc_dev_dir - delim + ".VAX" + delim + "*.*;*"
 
293
$   if (f$search(prods) .nes. "") then delete /log 'prods'
 
294
$   prods = proc_dev_dir + "VAX"+ ".DIR;1"
 
295
$   if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
 
296
$   if (f$search(prods) .nes. "") then delete /log 'prods'
 
297
$       goto Common_Exit
 
298
$    endif
 
299
$!
 
300
$ build_64 = 0
 
301
$ if f$locate(",64,", args_lower) .lt. args_lower_len
 
302
$    then
 
303
$   cc_qual1 = cc_qual1 + " /POINTER = 64"
 
304
$   build_64 = 1
 
305
$    endif
 
306
$!
 
307
$ args_loc = f$locate(",ccqual=", args_lower)
 
308
$ if args_loc .lt. args_lower_len
 
309
$    then
 
310
$   arg = f$extract(args_loc + 1, args_lower_len, args_lower)
 
311
$   arg_val = f$element(0, ",", arg)
 
312
$   cc_qual2 = f$element(1, "=", arg_val);
 
313
$    endif
 
314
$!
 
315
$! On Alpha/IA64 no size penalty for compiling /debug/optimize
 
316
$! by default.
 
317
$ if f$locate(",debug,", args_lower) .lt. args_lower_len
 
318
$    then
 
319
$   cc_debug = "/debug/nooptimize"
 
320
$       goto arg_loop_end
 
321
$    endif
 
322
$!
 
323
$! We normally want IEEE float if it is available.  Programs that are
 
324
$! calling libcurl will typically prefer IEEE behavior, unless on the
 
325
$! VAX where we have no choice.
 
326
$!
 
327
$ if f$locate(",noieee,", args_lower) .lt. args_lower_len
 
328
$    then
 
329
$   cc_float = ""
 
330
$       goto arg_loop_end
 
331
$    endif
 
332
$!
 
333
$! Normally we want large file if it is available.
 
334
$ if f$locate(",nolarge,", args_lower) .lt. args_lower_len
 
335
$    then
 
336
$   write sys$output "Handling of large files disabled."
 
337
$   cc_large = ""
223
338
$       endif
224
 
$       goto arg_loop_end
 
339
$ if cc_large .nes. ""
 
340
$ then
 
341
$   cc_defs = cc_defs + cc_large
225
342
$    endif
226
343
$!
227
 
$    if (arg_val .eqs. "LDAP")
 
344
$ if f$locate(",noldap,", args_lower) .lt. args_lower_len
228
345
$    then
229
 
$       ldap = 1
230
 
$       goto arg_loop_end
 
346
$   ldap = 0
231
347
$    endif
232
348
$!
233
 
$    if (f$extract( 0, 4, arg_val) .eqs. "LIST")
 
349
$ if f$locate(",list,", args_lower) .lt. args_lower_len
234
350
$    then
235
351
$       list = 1
236
 
$       cc_qual1 = cc_qual1+ " /list = ''lisdir' /show = (all, nomessages)"
237
 
$       link_qual = link_qual+ " /map = ''lisdir'"
238
 
$       msg_qual = msg_qual+ " /list = ''lisdir'"
239
 
$       goto arg_loop_end
 
352
$ endif
 
353
$ if f$locate(",fulllist,", args_lower) .lt. args_lower_len
 
354
$ then
 
355
$    list = 1
 
356
$    full_list = 1
240
357
$    endif
241
358
$!
242
 
$    if (arg_val .eqs. "NOHPSSL")
 
359
$ if f$locate(",nohpssl,", args_lower) .lt. args_lower_len
243
360
$    then
244
361
$       nohpssl = 1
245
 
$       goto arg_loop_end
246
362
$    endif
247
363
$!
248
 
$    if (arg_val .eqs. "NOSSL")
 
364
$ if f$locate(",nossl,", args_lower) .lt. args_lower_len
249
365
$    then
250
366
$       nossl = 1
251
 
$       goto arg_loop_end
252
367
$    endif
253
368
$!
254
 
$    if (arg_val .eqs. "OSSLOLB")
 
369
$ if f$locate(",osslolb,", args_lower) .lt. args_lower_len
255
370
$    then
256
371
$       osslolb = 1
257
 
$       goto arg_loop_end
258
372
$    endif
259
373
$!
260
 
$    write sys$output "Unrecognized command-line option: ''arg_val'"
261
 
$    goto Common_Exit
262
 
$!
263
 
$arg_loop_end:
264
 
$ arg = arg+ 1
265
 
$ goto arg_loop
266
 
$arg_loop_out:
 
374
$ if f$locate(",nozlib,", args_lower) .lt. args_lower_len
 
375
$ then
 
376
$   nozlib = 1
 
377
$ endif
 
378
$!
 
379
$ if f$locate(",nokerberos,", args_lower) .lt. args_lower_len
 
380
$ then
 
381
$   nokerberos = 1
 
382
$ endif
 
383
$!
267
384
$!
268
385
$! CC /LIST, LINK /MAP, and MESSAGE /LIST are defaults in batch mode,
269
386
$! so be explicit when they're not desired.
270
387
$!
271
 
$ if (list .eq. 0)
272
 
$ then
273
 
$    cc_qual1 = cc_qual1+ " /nolist"
274
 
$    link_qual = link_qual+ " /nomap"
275
 
$    msg_qual = msg_qual+ " /nolist"
 
388
$
 
389
$ if list .eq. 0
 
390
$ then
 
391
$   cc_qual1 = cc_qual1 + "/nolist"
 
392
$   msg_qual = msg_qual + "/nolist"
 
393
$ else
 
394
$   msg_qual = msg_qual + "/list='objdir'"
 
395
$   if (full_list .ne. 0)
 
396
$ then
 
397
$       cc_qual1 = cc_qual1 + cc_full_list
 
398
$   else
 
399
$       cc_qual1 = cc_qual1 + cc_list
 
400
$   endif
276
401
$ endif
 
402
$ cc_qual1 = cc_qual1 + cc_names + cc_float + cc_debug
277
403
$!
278
404
$! Create product directory, if needed.
279
405
$!
280
 
$ if (f$search( proc_dev_dir+ arch_name+ ".DIR;1") .eqs. "")
 
406
$ if (f$search(proc_dev_dir + arch_name + ".DIR;1") .eqs. "")
281
407
$ then
282
408
$    create /directory 'exedir'
283
409
$ endif
284
410
$!
285
411
$! Detect available (but not prohibited) SSL software.
286
412
$!
 
413
$ libsslshr_line = ""
 
414
$ libcryptoshr_line = ""
287
415
$ if (.not. nossl)
288
416
$ then
289
 
$    if (f$trnlnm( "OPENSSL") .nes. "")
 
417
$    if (f$trnlnm("OPENSSL") .nes. "")
290
418
$    then
291
 
$       cc_defs = cc_defs+ ", USE_SSLEAY=1"
292
 
$       if ((f$trnlnm( "SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
 
419
$!       cc_defs = cc_defs + ", USE_SSLEAY=1"
 
420
$       if ((f$trnlnm("SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
293
421
$       then
294
422
$!         Use HP SSL.
295
423
$          hpssl = 1
296
 
$          ssl_opt = ", ''proc_dev_dir'hpssl_"+ -
297
 
            f$getsyi("ARCH_NAME")+ ".opt /options"
 
424
$!
 
425
$!          Older SSL only has lib*_shr32 images
 
426
$!-----------------------------------------------
 
427
$           libsslshr = "sys$share:ssl$libssl_shr"
 
428
$           if (f$search("''libsslshr'.exe") .eqs. "") .or. (.not. build_64)
 
429
$           then
 
430
$               libsslshr = libsslshr + "32"
 
431
$           endif
 
432
$           libcryptoshr = "sys$share:ssl$libcrypto_shr"
 
433
$           if (f$search("''libcryptoshr'.exe") .eqs. "") .or. (.not. build_64)
 
434
$           then
 
435
$               libcryptoshr = libcryptoshr + "32"
 
436
$           endif
 
437
$           libsslshr_line = "''libsslshr'.exe/share"
 
438
$           libcryptoshr_line = "''libcryptoshr'.exe/share"
298
439
$       else
299
440
$!         Use OpenSSL.  Assume object libraries, unless shared images
300
441
$!         are found (and not prohibited).
 
442
$!         TODO: We do not know how to automatically choose based on the
 
443
$!         pointer size.
 
444
$!
301
445
$          openssl = 1
302
 
$          ssl_opt = ", ssllib:libssl.olb /library"+ -
 
446
$           libsslshr_line = "ssllib:libssl.olb/lib"
 
447
$           libcryptoshr_line = "ssllib:libcrypto.olb/lib"
 
448
$          ssl_opt = ", ssllib:libssl.olb /library" + -
303
449
            ", ssllib:libcrypto.olb /library"
304
450
$          if (osslolb .eq. 0)
305
451
$          then
306
 
              if ((f$search( "ssllib:ssl_libcrypto.exe") .nes. "") .and. -
307
 
               (f$search( "ssllib:ssl_libssl.exe") .nes. ""))
 
452
               if ((f$search("ssllib:ssl_libcrypto.exe") .nes. "")  .and. -
 
453
                  (f$search("ssllib:ssl_libssl.exe") .nes. ""))
308
454
$             then
309
455
$!               OpenSSL shared images with "SSL_xxx.EXE names.
310
456
$                openssl = 2
311
 
$                ssl_opt = ", ''proc_dev_dir'openssl_ssl_"+ -
312
 
                  f$getsyi("ARCH_NAME")+ ".opt /options"
 
457
$                  libsslshr_line = "ssllib:ssl_libssl_shr.exe/share"
 
458
$                  libcryptoshr_line = "ssllib:ssl_libcrypto_shr.exe/share"
313
459
$             else
314
 
$                if ((f$search( "ssllib:libcrypto.exe") .nes. "") .and. -
315
 
                  (f$search( "ssllib:libssl.exe") .nes. ""))
 
460
$                  if ((f$search("ssllib:libcrypto.exe") .nes. "") .and. -
 
461
                      (f$search("ssllib:libssl.exe") .nes. ""))
316
462
$                then
317
463
$!                  OpenSSL shared images with "xxx.EXE names.
318
464
$                   openssl = 3
319
 
$                   ssl_opt = ", ''proc_dev_dir'openssl_"+ -
320
 
                     f$getsyi("ARCH_NAME")+ ".opt /options"
 
465
$                      libsslshr_line = "ssllib:libssl_shr.exe/share"
 
466
$                      libcryptoshr_line = "ssllib:libcrypto_shr.exe/share"
321
467
$                endif
322
468
$             endif
323
469
$          endif
327
473
$!
328
474
$! LDAP.
329
475
$!
 
476
$ if f$search("SYS$SHARE:LDAP$SHR.EXE") .eqs. ""
 
477
$ then
 
478
$   ldap = 0
 
479
$ endif
330
480
$ if (ldap .eq. 0)
331
481
$ then
332
 
$    cc_defs = cc_defs+ ", CURL_DISABLE_LDAP=1"
333
 
$ endif
 
482
$!   cc_defs = cc_defs + ", CURL_DISABLE_LDAP=1"
 
483
$ else
 
484
$   'vo_c' "%CURL-I-BLDHPLDAP, building with HP LDAP support"
 
485
$ endif
 
486
$!
 
487
$! KERBEROS
 
488
$ gssrtlshr_line = ""
 
489
$ try_shr = "sys$share:gss$rtl"
 
490
$ if f$search("''try_shr'.exe") .eqs. ""
 
491
$ then
 
492
$   nokerberos = 1
 
493
$ endif
 
494
$ curl_sys_krbinc = ""
 
495
$ if nokerberos .eq. 0
 
496
$ then
 
497
$   'vo_c' "%CURL-I-BLDHPKERBEROS, building with HP KERBEROS support"
 
498
$   curl_sys_krbinc = "sys$sysroot:[kerberos.include]"
 
499
$   gssrtlshr_line = "''try_shr'/share"
 
500
$ endif
 
501
$!
 
502
$!
 
503
$! LIBZ
 
504
$ libzshr_line = ""
 
505
$ try_shr = "gnv$libzshr"
 
506
$ if f$search(try_shr) .eqs. ""
 
507
$ then
 
508
$   nozlib = 1
 
509
$ endif
 
510
$ curl_sys_zlibinc = ""
 
511
$ if nozlib .eq. 0
 
512
$ then
 
513
$   'vo_c' "%CURL-I-BLDGNVLIBZ, building with GNV LIBZ support"
 
514
$   libzshr_line = "''try_shr'/share"
 
515
$   curl_sys_zlibinc = "GNV$ZLIB_INCLUDE:"
 
516
$ endif
 
517
$!
334
518
$!
335
519
$! Form CC qualifiers.
336
520
$!
337
521
$ cc_defs = "/define = (''cc_defs')"
338
 
$ cc_qual2 = cc_qual2+ " /object = ''objdir'"+ -
339
 
   " /include = ([-.lib], [-.src],"+ -
340
 
   " [-.packages.vms], [-.packages.vms.''arch_name'])"
 
522
$ cc_qual2 = cc_qual2 + " /object = ''objdir'"
 
523
$ cc_qual2 = cc_qual2 + " /include = ([-.lib], [-.src],"
 
524
$ cc_qual2 = cc_qual2 + " [-.packages.vms], [-.packages.vms.''arch_name'])"
 
525
$ cc_qual2 = cc_qual2 + "/nested_include_directory=none"
341
526
$!
342
527
$ 'vo_c' "CC opts:", -
343
528
  " ''cc_defs'", -
372
557
$!
373
558
$ if (openssl .ne. 0)
374
559
$ then
375
 
$    ssllib = f$trnlnm( "ssllib")
 
560
$    ssllib = f$trnlnm("ssllib")
376
561
$    if (ssllib .eqs. "")
377
562
$    then
378
563
$        ssllib = "(undefined)"
379
564
$    endif
380
565
$    'vo_c' "   SSLLIB = ''ssllib'"
381
566
$!
 
567
$! TODO: Why are we translating the logical name?
 
568
$! The logical aname used to find the shared image should just be used
 
569
$! as translating it could result in the wrong location at run time.
382
570
$    if (openssl .eq. 1)
383
571
$    then
384
 
$       ossl_lib1 = f$trnlnm( "ssllib")+ "LIBSSL.OLB"
385
 
$       ossl_lib2 = f$trnlnm( "ssllib")+ "LIBCRYPTO.OLB"
 
572
$       ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.OLB"
 
573
$       ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.OLB"
386
574
$       msg = "object libraries"
387
575
$    else
388
576
$       if (openssl .eq. 2)
389
577
$       then
390
 
$          ossl_lib1 = f$trnlnm( "ssllib")+ "SSL_LIBSSL.EXE"
391
 
$          ossl_lib2 = f$trnlnm( "ssllib")+ "SSL_LIBCRYPTO.EXE"
 
578
$          ossl_lib1 = f$trnlnm("ssllib")+ "SSL_LIBSSL.EXE"
 
579
$          ossl_lib2 = f$trnlnm("ssllib")+ "SSL_LIBCRYPTO.EXE"
392
580
$       else
393
 
$          ossl_lib1 = f$trnlnm( "ssllib")+ "LIBSSL.EXE"
394
 
$          ossl_lib2 = f$trnlnm( "ssllib")+ "LIBCRYPTO.EXE"
 
581
$          ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.EXE"
 
582
$          ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.EXE"
395
583
$       endif
396
584
$       msg = "shared images"
397
585
$    endif
398
 
$    if ((f$search( ossl_lib1) .eqs. "") .or. -
399
 
      (f$search( ossl_lib2) .eqs. ""))
 
586
$    if ((f$search(ossl_lib1) .eqs. "") .or. -
 
587
      (f$search(ossl_lib2) .eqs. ""))
400
588
$    then
401
589
$       write sys$output "Can't find OpenSSL ''msg':"
402
590
$       write sys$output "   ''ossl_lib1'"
407
595
$!
408
596
$! Define the "curl" (process) logical name for "#include <curl/xxx.h>".
409
597
$!
410
 
$ curl = f$trnlnm( "curl", "LNM$PROCESS")
 
598
$ curl = f$trnlnm("curl", "LNM$PROCESS")
411
599
$ if (curl .nes. "")
412
600
$ then
413
601
$    write sys$output ""
422
610
$    write sys$output ""
423
611
$    goto Common_Exit
424
612
$ endif
425
 
$ define curl 'top_dev_dir'.include.curl]
426
 
$!
427
 
$! Copy the VMS-specific config file into the product directory.
428
 
$!
429
 
$ call MoveIfDiff 'top_dev_dir'.lib]config-vms.h 'objdir'curl_config.h
 
613
$ curl_logical = top_dev_dir + ".include.curl" + delim
 
614
$ curl_sys_inc2 = curl_logical
 
615
$ curl_sys_inc1 = top_dev_dir + ".include" + delim
 
616
$! define curl 'top_dev_dir'.include.curl'delim'
 
617
$!
 
618
$! Generate config file into the product directory.
 
619
$!
 
620
$! call MoveIfDiff [.lib]config-vms.h 'objdir'curl_config.h
 
621
$!
 
622
$conf_params = ""
 
623
$if nossl .ne. 0 then conf_params = conf_params + ",nossl"
 
624
$if nohpssl .ne. 0 then conf_params = conf_params + ",nohpssl,"
 
625
$if ldap .eq. 0 then conf_params = conf_params + ",noldap,"
 
626
$if nozlib .ne. 0 then conf_params = conf_params + ",nozlib,"
 
627
$if nokerberos .ne. 0 then conf_params = conf_params + ",nokerberos"
 
628
$conf_params = conf_params - ","
 
629
$!
 
630
$!
 
631
$new_conf = f$search("''objdir'curl_config.h")
 
632
$if new_conf .eqs. ""
 
633
$then
 
634
$!   set ver
 
635
$   write sys$output "Generating curl custom config_vms.h"
 
636
$   @'proc_dev_dir'generate_config_vms_h_curl.com ''conf_params'
 
637
$!
 
638
$   write sys$output "Generating curl_config.h"
 
639
$   conf_in = f$search("[.lib]curl_config*.*in")
 
640
$   if conf_in .eqs. ""
 
641
$   then
 
642
$       write sys$output "Can not find [.lib]curl_config*.*in file!"
 
643
$       goto common_exit
 
644
$   endif
 
645
$   @'proc_dev_dir'config_h.com 'conf_in'
 
646
$   copy config.h 'objdir'curl_config.h
 
647
$   delete config.h;
 
648
$!   set nover
 
649
$endif
 
650
$!
 
651
$!
 
652
$write sys$output "Creating the new curlbuild.h"
 
653
$new_conf = f$search("[.include.curl]curlbuild.h")
 
654
$if new_conf .eqs. ""
 
655
$then
 
656
$!   set ver
 
657
$   @'proc_dev_dir'build_curlbuild_h.com
 
658
$!   set nover
 
659
$endif
 
660
$!
430
661
$!
431
662
$ on control_y then goto Common_Exit
432
663
$!
433
664
$ set default 'proc_dev_dir'
 
665
$ sys_inc = "''curl_sys_inc1', ''curl_sys_inc2', ''curl_logical'"
 
666
$ if curl_sys_krbinc .nes. ""
 
667
$ then
 
668
$   sys_inc = sys_inc + ",''curl_sys_krbinc'"
 
669
$ endif
 
670
$ if curl_sys_zlibinc .nes. ""
 
671
$ then
 
672
$   curl_sys_inc = sys_inc + ",''curl_sys_zlibinc'"
 
673
$ endif
434
674
$ call build "[--.lib]" "*.c" "''objdir'CURLLIB.OLB" "amigaos, nwlib, nwos"
435
675
$ if ($status .eq. ctrl_y) then goto Common_Exit
436
676
$ call build "[--.src]" "*.c" "''objdir'CURLSRC.OLB"
438
678
$ call build "[]" "*.msg" "''objdir'CURLSRC.OLB"
439
679
$ if ($status .eq. ctrl_y) then goto Common_Exit
440
680
$!
441
 
$ ldap_opt = ""
442
 
$ if (ldap .ne. 0) then ldap_opt = ", ''proc_dev_dir'ldap.opt /options"
443
681
$!
444
682
$ if (openssl .ne. 0)
445
683
$ then
458
696
$    endif
459
697
$ endif
460
698
$!
461
 
$ link 'link_qual' /executable = 'exedir'CURL.EXE -
462
 
   'objdir'curlsrc.olb /library /include = (main, curlmsg), -
463
 
   'objdir'curllib.olb /library -
464
 
   'ssl_opt' -
465
 
   'ldap_opt'
 
699
$!
 
700
$! GNV helper files for building the test curl binary.
 
701
$!-----------------------------------------------
 
702
$create 'exedir'gnv$curl.opt
 
703
$open/append opt 'exedir'gnv$curl.opt
 
704
$if libzshr_line .nes. "" then write opt libzshr_line
 
705
$if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
 
706
$if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
 
707
$if libsslshr_line .nes. "" then write opt libsslshr_line
 
708
$close opt
 
709
$!
 
710
$!
 
711
$! Create the libcurl
 
712
$!------------------------------------------------------
 
713
$create 'exedir'gnv_libcurl_linker.opt
 
714
$open/append opt 'exedir'gnv_libcurl_linker.opt
 
715
$if libzshr_line .nes. "" then write opt libzshr_line
 
716
$if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
 
717
$if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
 
718
$if libsslshr_line .nes. "" then write opt libsslshr_line
 
719
$close opt
 
720
$!
 
721
$!
 
722
$! If we are not on VAX, then we want the debug symbol table in
 
723
$! a separate file.
 
724
$! VAX needs the tool_main unquoted in uppercase,
 
725
$! Alpha and IA64 need tool_main quoted in exact case.
 
726
$ link_dsf1 = ""
 
727
$ link_dsf2 = ""
 
728
$ tool_main = "tool_main"
 
729
$ if arch_name .nes. "VAX"
 
730
$ then
 
731
$   tool_main = """tool_main"""
 
732
$   link_dsf1 = "/dsf=" + exedir + "CURL.DSF"
 
733
$   link_dsf2 = "/dsf=" + exedir + "CURL_DEBUG.DSF"
 
734
$ endif
 
735
$ if (list .eq. 0)
 
736
$ then
 
737
$   link_map1 = "/nomap"
 
738
$   link_map2 = "/nomap"
 
739
$ else
 
740
$   link_map1 = "/map=" + exedir + "CURL.MAP"
 
741
$   link_map2 = "/map=" + exedir + "CURL_DEBUG.MAP"
 
742
$ endif
 
743
$!
 
744
$!
 
745
$! Make a normal image.
 
746
$ set ver
 
747
$ link 'link_map1' 'link_dsf1' /executable = 'exedir'CURL.EXE -
 
748
   'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
 
749
   'objdir'curllib.olb /library, -
 
750
   'exedir'gnv$curl.opt/opt
 
751
$!
 
752
$! Also make a debug copy.
 
753
$ link/debug 'link_map2' 'link_dsf2' /executable = 'exedir'CURL_DEBUG.EXE -
 
754
   'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
 
755
   'objdir'curllib.olb /library, -
 
756
   'exedir'gnv$curl.opt/opt
 
757
$set nover
466
758
$!
467
759
$ goto Common_Exit
468
760
$!
471
763
$! via P3.  Exclude items in P4.
472
764
$!
473
765
$build:   subroutine
474
 
$    build_def = f$environment( "default")
 
766
$    build_def = f$environment("default")
475
767
$    on control_y then goto EndLoop ! SS$_CONTROLY
476
768
$    sts = 1 ! SS$_NORMAL.
477
769
$!    set noon
482
774
$    then
483
775
$       librarian /create /object 'p3'
484
776
$    endif
485
 
$    reject_list__ = ","+ f$edit( p4, "COLLAPSE, UPCASE")+ ","
486
 
$    reject_list___len = f$length( reject_list__)
 
777
$    reject_list__ = "," + f$edit(p4, "COLLAPSE, UPCASE") + ","
 
778
$    reject_list___len = f$length(reject_list__)
487
779
$    reset = f$search( "reset", 1)
488
780
$Loop:
489
781
$    file = f$search( search, 1)
491
783
$!      Skip a name if it's in the P4 exclusion list.
492
784
$       if (p4 .nes. "")
493
785
$       then
494
 
$          name__ = ","+ -
495
 
            f$edit( f$parse( file, , , "NAME", "SYNTAX_ONLY"), "UPCASE")+ -
 
786
$          name__ = "," + -
 
787
            f$edit(f$parse(file, , , "NAME", "SYNTAX_ONLY"), "UPCASE") + -
496
788
            ","
497
 
$          if (f$locate( name__, reject_list__) .lt. reject_list___len)
 
789
$          if (f$locate(name__, reject_list__) .lt. reject_list___len)
498
790
$          then
499
791
$             goto Loop
500
792
$          endif
501
793
$       endif
502
 
$       objfile = f$parse( "''objdir'.OBJ;", file)
503
 
$       obj = f$search( objfile, 2)
 
794
$       objfile = f$parse("''objdir'.OBJ;", file)
 
795
$       obj = f$search(objfile, 2)
504
796
$       if (obj .nes. "")
505
797
$       then
506
798
$          if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
540
832
$!    set noon
541
833
$    file = p1
542
834
$    qual = p2+ p3+ p4+ p5+ p6+ p7+ p8
543
 
$    typ = f$edit( f$parse( file, , , "TYPE"), "UPCASE") - "."
 
835
$    typ = f$edit(f$parse(file, , , "TYPE"), "UPCASE") - "."
544
836
$    if (typ .eqs. "C")
545
837
$    then
546
838
$       'vo_c' "CC (opts) ", file
 
839
$       define/user curl 'curl_logical'
 
840
$       if curl_sys_krbinc .nes. "" then define/user gssapi 'curl_sys_krbinc'
 
841
$       define/user decc$system_include 'curl_sys_inc'
547
842
$       CC 'cc_defs' -
548
843
         'cc_qual1' -
549
844
         'cc_qual2' -
550
845
         'file'
551
846
$    else
552
 
$       cmd_msg = "MESSAGE "+ msg_qual
 
847
$       cmd_msg = "MESSAGE " + msg_qual
553
848
$       x = cmd_'typ'
554
 
$       'vo_c' x," ",file
 
849
$       'vo_c' x, " ", file
555
850
$       'x' 'file'
556
851
$    endif
557
852
$ ENDSUBROUTINE   ! Compile
566
861
$    define /user_mode sys$output nl:
567
862
$    differences 'p1' 'p2'
568
863
$    status = $status
569
 
$    if ( status .ne. %X006C8009) ! if status is not "no diff"
 
864
$    if (status .ne. %X006C8009) ! if status is not "no diff"
570
865
$    then
571
866
$       copy 'p1' 'p2'
572
867
$       purge /nolog 'p2'
576
871
$!
577
872
$Common_Exit:
578
873
$ set default 'orig_def'
579
 
$ if ((curl .eqs. "") .and. (f$trnlnm( "curl", "LNM$PROCESS") .nes. ""))
580
 
$ then
581
 
$    deassign curl
582
 
$ endif
583
874
$ exit