master
1$! File: GENERATE_CONFIG_H_CURL.COM
2$!
3$! curl like most open source products uses a variant of a config.h file.
4$! Depending on the curl version, this could be config.h or curl_config.h.
5$!
6$! For GNV based builds, the configure script is run and that produces
7$! a [curl_]config.h file. Configure scripts on VMS generally do not
8$! know how to do everything, so there is also a [-.lib]config-vms.h file
9$! that has VMS specific code that compensates for bugs in some of the
10$! VMS shared images.
11$!
12$! This generates a [curl_]config.h file and also a config_vms.h file,
13$! which is used to supplement that file. Note that the config_vms.h file
14$! and the [.lib]config-vms.h file do two different tasks and that the
15$! filenames are slightly different.
16$!
17$! Copyright (C) John Malmberg
18$!
19$! Permission to use, copy, modify, and/or distribute this software for any
20$! purpose with or without fee is hereby granted, provided that the above
21$! copyright notice and this permission notice appear in all copies.
22$!
23$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
24$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
25$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
26$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
27$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
28$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
29$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
30$!
31$! SPDX-License-Identifier: ISC
32$!
33$!=========================================================================
34$!
35$! Allow arguments to be grouped together with comma or separated by spaces
36$! Do no know if we will need more than 8.
37$args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
38$args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
39$!
40$! Provide lower case version to simplify parsing.
41$args_lower = f$edit(args, "LOWERCASE")
42$!
43$args_len = f$length(args)
44$!
45$if (f$getsyi("HW_MODEL") .lt. 1024)
46$then
47$ arch_name = "VAX"
48$else
49$ arch_name = ""
50$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
51$ if (arch_name .eqs. "") then arch_name = "UNK"
52$endif
53$!
54$!
55$nossl = 0
56$nohpssl = 1
57$hpssl = 0
58$libidn = 0
59$libssh2 = 0
60$noldap = 0
61$nozlib = 0
62$nokerberos = 0
63$!
64$! First check to see if SSL is disabled.
65$!---------------------------------------
66$if f$locate(",nossl,", args_lower) .lt. args_len then nossl = 1
67$if .not. nossl
68$then
69$!
70$! ssl$* logicals means HP SSL is present
71$!----------------------------------------
72$ if f$trnlnm("ssl$root") .nes. ""
73$ then
74$ nohpssl = 0
75$ hpssl = 1
76$ endif
77$!
78$! HP defines OPENSSL as SSL$INCLUDE as a convenience for linking.
79$! As it is a violation of VMS standards for this to be provided,
80$! some sites may have removed it, but if present, assume that
81$! it indicates which OpenSSL to use.
82$!------------------------------------
83$ openssl_lnm = f$trnlnm("OPENSSL")
84$ if (openssl_lnm .nes. "SYS$INCLUDE")
85$ then
86$! Non HP SSL is installed, default to use it.
87$ nohpssl = 1
88$ hpssl = 0
89$ endif
90$!
91$! Now check to see if hpssl has been specifically disabled
92$!----------------------------------------------------------
93$ if f$locate(",nohpssl,", args_lower) .lt. args_len
94$ then
95$ nohpssl = 1
96$ hpssl = 0
97$ endif
98$!
99$! Finally check to see if HP SSL has been specifically included.
100$!----------------------------------------------------------------
101$ if f$locate(",nohpssl,", args_lower) .lt. args_len
102$ then
103$ nohpssl = 1
104$ hpssl = 0
105$ endif
106$endif
107$!
108$! Did someone port LIBIDN in the GNV compatible way?
109$!------------------------------------------------------
110$if f$trnlnm("GNV$LIBIDNSHR") .nes. ""
111$then
112$ write sys$output "NOTICE: A LIBIDN port has been detected."
113$ write sys$output " This port of curl for VMS has not been tested with it."
114$ if f$locate(",libidn,", args_lower) .lt. args_len
115$ then
116$ libidn = 1
117$ endif
118$ if .not. libidn
119$ then
120$ write sys$output " LIBIDN support is not enabled."
121$ write sys$output "Run with the ""libidn"" parameter to attempt to use."
122$ else
123$ write sys$output " Untested LIBIDN support requested."
124$ endif
125$endif
126$!
127$! Did someone port LIBSSH2 in the GNV compatible way?
128$!------------------------------------------------------
129$if f$trnlnm("GNV$LIBSSH2SHR") .nes. ""
130$then
131$ write sys$output "NOTICE: A LIBSSH2 port has been detected."
132$ write sys$output " This port of curl for VMS has not been tested with it."
133$ if f$locate(",libssh2,", args_lower) .lt. args_len
134$ then
135$ libssh2 = 1
136$ endif
137$ if .not. libssh2
138$ then
139$ write sys$output " LIBSSH2 support is not enabled."
140$ write sys$output "Run with the ""libssh2"" parameter to attempt to use."
141$ else
142$ write sys$output " Untested LIBSSH2 support requested."
143$ endif
144$endif
145$!
146$! LDAP suppressed?
147$if f$locate(",noldap,", args_lower) .lt. args_len
148$then
149$ noldap = 1
150$endif
151$if f$search("SYS$SHARE:LDAP$SHR.EXE") .eqs. ""
152$then
153$ noldap = 1
154$endif
155$!
156$if f$locate(",nokerberos,", args_lower) .lt. args_len then nokerberos = 1
157$if .not. nokerberos
158$then
159$! If kerberos is installed: sys$share:gss$rtl.exe exists.
160$ if f$search("sys$shsare:gss$rtl.exe") .eqs. ""
161$ then
162$ nokerberos = 1
163$ endif
164$endif
165$!
166$!
167$! Is GNV compatible LIBZ present?
168$!------------------------------------------------------
169$if f$trnlnm("GNV$LIBZSHR") .nes. ""
170$then
171$ if f$locate(",nozlib,", args_lower) .lt. args_len
172$ then
173$ nozlib = 1
174$ endif
175$! if .not. nozlib
176$! then
177$! write sys$output " GNV$LIBZSHR support is enabled."
178$! else
179$! write sys$output " GNV$LIBZSHR support is disabled by nozlib."
180$! endif
181$else
182$ nozlib = 1
183$endif
184$!
185$!
186$! Start the configuration file.
187$! Need to do a create and then an append to make the file have the
188$! typical file attributes of a VMS text file.
189$create sys$disk:[curl.lib]config_vms.h
190$open/append cvh sys$disk:[curl.lib]config_vms.h
191$!
192$! Write the defines to prevent multiple includes.
193$! These are probably not needed in this case,
194$! but are best practice to put on all header files.
195$write cvh "#ifndef __CONFIG_VMS_H__"
196$write cvh "#define __CONFIG_VMS_H__"
197$write cvh ""
198$write cvh "/* Define cpu-machine-OS */"
199$!
200$! curl uses an OS macro to set the build environment.
201$!----------------------------------------------------
202$! Now the DCL builds usually say xxx-HP-VMS and configure scripts
203$! may put DEC or COMPAQ or HP for the middle part.
204$!
205$write cvh "#if defined(__alpha)"
206$write cvh "#define CURL_OS ""ALPHA-HP-VMS"""
207$write cvh "#elif defined(__vax)"
208$write cvh "#define CURL_OS ""VAX-HP-VMS"""
209$write cvh "#elif defined(__ia64)"
210$write cvh "#define CURL_OS ""IA64-HP-VMS""
211$write cvh "#else"
212$write cvh "#define CURL_OS ""UNKNOWN-HP-VMS""
213$write cvh "#endif"
214$write cvh ""
215$!
216$! We are now setting this on the GNV build, so also do this
217$! for compatibility.
218$write cvh "/* Location of default CA path */"
219$write cvh "#define curl_ca_path ""gnv$curl_ca_path"""
220$!
221$! The config_h.com finds a bunch of default disable commands in
222$! configure and will incorrectly disable these options. The config_h.com
223$! is a generic procedure and it would break more things to try to fix it
224$! to special case it for curl. So we will fix it here.
225$!
226$! We do them all here, even the ones that config_h.com currently gets correct.
227$!
228$write cvh "#ifdef CURL_DISABLE_COOKIES"
229$write cvh "#undef CURL_DISABLE_COOKIES"
230$write cvh "#endif"
231$write cvh "#ifdef CURL_DISABLE_DICT"
232$write cvh "#undef CURL_DISABLE_DICT"
233$write cvh "#endif"
234$write cvh "#ifdef CURL_DISABLE_FILE"
235$write cvh "#undef CURL_DISABLE_FILE"
236$write cvh "#endif"
237$write cvh "#ifdef CURL_DISABLE_FTP"
238$write cvh "#undef CURL_DISABLE_FTP"
239$write cvh "#endif"
240$write cvh "#ifdef CURL_DISABLE_GOPHER"
241$write cvh "#undef CURL_DISABLE_GOPHER"
242$write cvh "#endif"
243$write cvh "#ifdef CURL_DISABLE_HTTP"
244$write cvh "#undef CURL_DISABLE_HTTP"
245$write cvh "#endif"
246$write cvh "#ifdef CURL_DISABLE_IMAP"
247$write cvh "#undef CURL_DISABLE_IMAP"
248$write cvh "#endif"
249$if .not. noldap
250$then
251$ write cvh "#ifdef CURL_DISABLE_LDAP"
252$ write cvh "#undef CURL_DISABLE_LDAP"
253$ write cvh "#endif"
254$ if .not. nossl
255$ then
256$ write cvh "#ifdef CURL_DISABLE_LDAPS"
257$ write cvh "#undef CURL_DISABLE_LDAPS"
258$ write cvh "#endif"
259$ endif
260$endif
261$write cvh "#ifdef CURL_DISABLE_LIBCURL_OPTION"
262$write cvh "#undef CURL_DISABLE_LIBCURL_OPTION"
263$write cvh "#endif"
264$write cvh "#ifndef __VAX"
265$write cvh "#else"
267$write cvh "#ifdef __DECC
268$write cvh "#endif"
269$write cvh "#endif"
270$write cvh "#ifdef CURL_DISABLE_POP3"
271$write cvh "#undef CURL_DISABLE_POP3"
272$write cvh "#endif"
273$write cvh "#ifdef CURL_DISABLE_PROXY"
274$write cvh "#undef CURL_DISABLE_PROXY"
275$write cvh "#endif"
276$write cvh "#ifdef CURL_DISABLE_RTSP"
277$write cvh "#undef CURL_DISABLE_RTSP"
278$write cvh "#endif"
279$write cvh "#ifdef CURL_DISABLE_SMTP"
280$write cvh "#undef CURL_DISABLE_SMTP"
281$write cvh "#endif"
282$write cvh "#ifdef CURL_DISABLE_TELNET"
283$write cvh "#undef CURL_DISABLE_TELNET"
284$write cvh "#endif"
285$write cvh "#ifdef CURL_DISABLE_TFTP"
286$write cvh "#undef CURL_DISABLE_TFTP"
287$write cvh "#endif"
288$write cvh "#ifdef CURL_DISABLE_POP3"
289$write cvh "#undef CURL_DISABLE_POP3"
290$write cvh "#endif"
291$if .not. nossl
292$then
293$ write cvh "#ifdef CURL_DISABLE_TLS_SRP"
294$ write cvh "#undef CURL_DISABLE_TLS_SRP"
295$ write cvh "#endif"
296$!
297$endif
298$write cvh "#ifdef CURL_DISABLE_VERBOSE_STRINGS"
299$write cvh "#undef CURL_DISABLE_VERBOSE_STRINGS"
300$write cvh "#endif"
301$!
302$! configure defaults to USE_*, a real configure on VMS chooses different.
303$write cvh "#ifdef USE_ARES"
304$write cvh "#undef USE_ARES"
305$write cvh "#endif"
306$write cvh "#ifdef USE_WOLFSSL"
307$write cvh "#undef USE_WOLFSSL"
308$write cvh "#endif"
309$write cvh "#ifdef USE_GNUTLS"
310$write cvh "#undef USE_GNUTLS"
311$write cvh "#endif"
312$write cvh "#ifdef USE_MANUAL"
313$write cvh "#undef USE_MANUAL"
314$write cvh "#endif"
315$write cvh "#ifdef USE_NGHTTP2"
316$write cvh "#undef USE_NGHTTP2"
317$write cvh "#endif"
318$write cvh "#ifdef USE_OPENLDAP"
319$write cvh "#undef USE_OPENLDAP"
320$write cvh "#endif"
321$write cvh "#ifdef USE_RESOLV_THREADED"
322$write cvh "#undef USE_RESOLV_THREADED"
323$write cvh "#endif"
324$write cvh "#ifdef USE_TLS_SRP"
325$write cvh "#undef USE_TLS_SRP"
326$write cvh "#endif"
327$write cvh "#ifdef USE_UNIX_SOCKETS"
328$write cvh "#undef USE_UNIX_SOCKETS"
329$write cvh "#endif"
330$!
331$! Note:
332$! The CURL_EXTERN_SYMBOL is used for platforms that need the compiler
333$! to know about universal symbols. VMS does not need this support so
334$! we do not set it here.
335$!
336$!
337$! I can not figure out where the C compiler is finding the ALLOCA.H file
338$! in the text libraries, so CONFIG_H.COM can not find it either.
339$! Usually the header filename is the module name in the text library.
340$! It does not appear to hurt anything to not find header file, so we
341$! are not overriding it here.
342$!
343$!
344$! Check to see if OpenSSL is present.
345$!----------------------------------
346$ssl_include = f$trnlnm("OPENSSL")
347$if ssl_include .eqs. ""
348$then
349$ ssl_include = f$trnlnm("ssl$include")
350$endif
351$if ssl_include .eqs. "" then nossl = 1
352$!
353$if .not. nossl
354$then
355$!
356$ write cvh "#ifndef USE_OPENSSL"
357$ write cvh "#define USE_OPENSSL 1"
358$ write cvh "#endif"
359$ if arch_name .eqs. "VAX"
360$ then
361$ old_mes = f$environment("message")
362$ set message/notext/nofaci/noseve/noident
363$ search/output=nla0: ssl$include:*.h CONF_MFLAGS_IGNORE_MISSING_FILE
364$ status = $severity
365$ set message'old_mes'
366$ if status .nes. "1"
367$ then
368$ write cvh "#define VMS_OLD_SSL 1"
369$ endif
370$ endif
371$endif
372$!
373$!
374$! libidn not ported to VMS at this time.
375$! This is for international domain name support.
376$! Allow explicit experimentation.
377$if libidn
378$then
379$ write cvh "#define HAVE_IDNA_STRERROR 1"
380$ write cvh "#define HAVE_IDNA_FREE 1"
381$ write cvh "#define HAVE_IDNA_FREE_H 1"
382$ write cvh "#define HAVE_LIBIDN 1"
383$else
384$ write cvh "#ifdef HAVE_LIBIDN"
385$ write cvh "#undef HAVE_LIBIDN"
386$ write cvh "#endif"
387$endif
388$!
389$!
390$! libssh2 not ported to VMS at this time.
391$! Allow explicit experimentation.
392$if libssh2
393$then
394$ write cvh "#define HAVE_LIBSSH2_EXIT 1"
395$ write cvh "#define HAVE_LIBSSH2_INIT 1"
396$ write cvh "#define HAVE_LIBSSH2_SCP_SEND64 1"
397$ write cvh "#define HAVE_LIBSSH2_SESSION_HANDSHAKE 1"
398$ write cvh "#define HAVE_LIBSSH2_VERSION 1
399$!
400$ write cvh "#ifndef USE_LIBSSH2"
401$ write cvh "#define USE_LIBSSH2 1"
402$ write cvh "#endif"
403$else
404$ write cvh "#ifdef USE_LIBSSH2"
405$ write cvh "#undef USE_LIBSSH2"
406$ write cvh "#endif"
407$endif
408$!
409$!
410$!
411$if .not. nozlib
412$then
413$ write cvh "#define HAVE_LIBZ 1"
414$endif
415$!
416$!
417$! Suppress a message in curl_gssapi.c compile.
418$write cvh "#pragma message disable notconstqual"
419$!
420$! Close out the file
421$!
422$write cvh ""
423$write cvh "#endif /* __CONFIG_VMS_H__ */"
424$close cvh
425$!
426$all_exit:
427$exit
Diagnostics4 git calls · 32 ms
CallStatusSizeTime032 ms
discover200152 B3 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=3 git.response.bytes=152 git.server.agent=gitty/1.0 git.server.object_format=sha1 git.server.caps=agent ls-refs fetch object-format git.server.fetch=shallow filter sideband-all git.protocol.version=2 git.pkt.frames=8 git.pkt.data=6 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=152 git.pkt.payload.max=34
ls-refs200149 B · hit3 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=3 git.response.bytes=149 git.response.cache=HIT git.response.duration_ms=3 git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=149 git.pkt.payload.max=78 git.ls_refs.count=2 git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=293470 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=blob:none git.fetch.filter.requested=tree:0 git.fetch.filter.fallback=blob:none git.fetch.filter.learned=false git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d git.fetch.haves.count=0 git.fetch.deepen=10 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=10 git.pkt.data=8 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=293470 git.pkt.payload.max=65516 git.sideband.band1.bytes=293354 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=87 git.pack.bytes=293354 git.pack.ofs_delta=0 git.pack.ref_delta=1 git.pack.chain.max=1 git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0 git.pack.full=86Open pack map
fetch2004.1 KiB · hit26 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=26 git.response.bytes=4167 git.response.cache=HIT git.response.duration_ms=26 git.fetch.wants=a7acaade4aeb13aba258e3829752329d7bf4365d git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=4167 git.pkt.payload.max=4146 git.sideband.band1.bytes=4145 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
- Ref
- refs/heads/master
- Commit
- 31c911efe5652725e930f4d2e60c9060e5f6646d
- cf-ray
- a5e3587d0af72c38
- Request
- 58853c35…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format